Changeset 2696:26ceae3107d4 in roaraudio for roard/container_framework.c
- Timestamp:
- 09/13/09 03:26:00 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/container_framework.c
r2695 r2696 49 49 memset(self, 0, sizeof(struct cont_fw_parent_inst)); 50 50 51 self->stream.id = -1; 52 self->state = ROAR_STREAMSTATE_INITING; 53 51 54 *inst = self; 52 55 return 0; … … 225 228 return -1; 226 229 230 self->stream.codec = codec; 231 self->stream.id = ROAR_STREAM(info)->id; 232 self->stream.stream = info; 233 self->stream.filter = filter; 234 227 235 ROAR_DBG("cont_fw_cf_open(*) = ?"); 228 236 … … 236 244 ROAR_DBG("cont_fw_cf_open(*) = ?"); 237 245 238 if ( self->pcb.open != NULL ) {239 if ( self->pcb.open(self, codec, info, filter) == -1 ) {240 cont_fw_delete(self);241 return -1;242 }243 }244 245 ROAR_DBG("cont_fw_cf_open(*) = ?");246 247 246 *inst = self; 248 247 … … 261 260 // no direct read or writing... 262 261 int cont_fw_cf_write(CODECFILTER_USERDATA_T inst, char * buf, int len) { 263 ROAR_DBG("cont_fw_cf_write(*) = -1"); 264 return -1; 262 struct cont_fw_parent_inst * self = (void*)inst; 263 264 ROAR_DBG("cont_fw_cf_write(*) = ?"); 265 266 if ( self->state == ROAR_STREAMSTATE_INITING ) { 267 if ( self->pcb.open != NULL ) { 268 if ( self->pcb.open(self, self->stream.codec, self->stream.stream, self->stream.filter) == -1 ) { 269 return -1; 270 } 271 } 272 self->state = ROAR_STREAMSTATE_NEW; 273 274 ROAR_DBG("cont_fw_cf_write(*) = 0"); 275 return 0; 276 } else { 277 ROAR_DBG("cont_fw_cf_write(*) = -1"); 278 return -1; 279 } 265 280 } 266 281
Note: See TracChangeset
for help on using the changeset viewer.