Changeset 2696:26ceae3107d4 in roaraudio


Ignore:
Timestamp:
09/13/09 03:26:00 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

get basics working together with RAUM

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/container_framework.c

    r2695 r2696  
    4949 memset(self, 0, sizeof(struct cont_fw_parent_inst)); 
    5050 
     51 self->stream.id = -1; 
     52 self->state     = ROAR_STREAMSTATE_INITING; 
     53 
    5154 *inst = self; 
    5255 return 0; 
     
    225228  return -1; 
    226229 
     230 self->stream.codec  = codec; 
     231 self->stream.id     = ROAR_STREAM(info)->id; 
     232 self->stream.stream = info; 
     233 self->stream.filter = filter; 
     234 
    227235 ROAR_DBG("cont_fw_cf_open(*) = ?"); 
    228236 
     
    236244 ROAR_DBG("cont_fw_cf_open(*) = ?"); 
    237245 
    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  
    247246 *inst = self; 
    248247 
     
    261260// no direct read or writing... 
    262261int 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 } 
    265280} 
    266281 
  • roard/include/container_framework.h

    r2683 r2696  
    4343 struct cont_fw_child_vio_inst * child[CONT_FW_MAX_CHILDS]; 
    4444 void * u_inst; 
     45 int state; 
     46 struct { 
     47  int id; 
     48  int codec; 
     49  struct roar_stream_server  * stream; 
     50  struct roar_codecfilter    * filter; 
     51 } stream; 
    4552 struct { 
    4653  ssize_t (*read) (struct cont_fw_parent_inst * self, struct cont_fw_child_vio_inst * child, void *buf, size_t len); 
Note: See TracChangeset for help on using the changeset viewer.