Changeset 2675:8b6547df9647 in roaraudio


Ignore:
Timestamp:
09/12/09 23:46:24 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added most of the cf functions, open is still missing

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/container_framework.c

    r2673 r2675  
    213213int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data); 
    214214 
     215// CF: 
     216int cont_fw_cf_open(CODECFILTER_USERDATA_T * inst, int codec, 
     217                                             struct roar_stream_server * info, 
     218                                             struct roar_codecfilter   * filter); 
     219 
     220int cont_fw_cf_close(CODECFILTER_USERDATA_T   inst) { 
     221 return cont_fw_delete(inst); 
     222} 
     223 
     224int cont_fw_cf_pause(CODECFILTER_USERDATA_T   inst, int newstate); 
     225 
     226 
     227// no direct read or writing... 
     228int cont_fw_cf_write(CODECFILTER_USERDATA_T   inst, char * buf, int len) { 
     229 return -1; 
     230} 
     231 
     232int cont_fw_cf_read (CODECFILTER_USERDATA_T   inst, char * buf, int len) { 
     233 return -1; 
     234} 
     235 
     236int cont_fw_cf_flush(CODECFILTER_USERDATA_T   inst) { 
     237 struct cont_fw_parent_inst * self = (void*)inst; 
     238 
     239 if ( self->pcb.flush != NULL ) 
     240  return self->pcb.flush(self); 
     241 
     242 return 0; 
     243} 
     244 
     245int cont_fw_cf_delay(CODECFILTER_USERDATA_T   inst, uint_least32_t * delay); 
     246 
     247int cont_fw_cf_ctl  (CODECFILTER_USERDATA_T   inst, int cmd, void * data) { 
     248 return -1; 
     249} 
     250 
    215251//ll 
  • roard/include/container_framework.h

    r2672 r2675  
    4848 } ccb; 
    4949 struct { 
     50  int     (*open     )(struct cont_fw_parent_inst * self); 
    5051  int     (*close    )(struct cont_fw_parent_inst * self); 
     52  int     (*flush    )(struct cont_fw_parent_inst * self); 
    5153  int     (*new_child)(struct cont_fw_parent_inst * self, struct cont_fw_child_vio_inst * child); 
    5254 } pcb; 
    5355}; 
    5456 
     57// Parent: 
    5558int     cont_fw_new      (struct cont_fw_parent_inst ** inst); 
    5659int     cont_fw_delete   (struct cont_fw_parent_inst  * inst); 
     
    5861int     cont_fw_get_uinst(struct cont_fw_parent_inst  * inst, void ** u_inst); 
    5962 
     63// Child: 
    6064int     cont_fw_new_child(struct cont_fw_parent_inst  * inst, int id); 
    6165int     cont_fw_init_vio(struct roar_vio_calls * vio, void * inst); 
     66 
     67// VIO: 
    6268ssize_t cont_fw_read    (struct roar_vio_calls * vio, void *buf, size_t count); 
    6369ssize_t cont_fw_write   (struct roar_vio_calls * vio, void *buf, size_t count); 
     
    6874int     cont_fw_close   (struct roar_vio_calls * vio); 
    6975 
     76// CF: 
     77int cont_fw_cf_open(CODECFILTER_USERDATA_T * inst, int codec, 
     78                                             struct roar_stream_server * info, 
     79                                             struct roar_codecfilter   * filter); 
     80int cont_fw_cf_close(CODECFILTER_USERDATA_T   inst); 
     81int cont_fw_cf_pause(CODECFILTER_USERDATA_T   inst, int newstate); 
     82int cont_fw_cf_write(CODECFILTER_USERDATA_T   inst, char * buf, int len); 
     83int cont_fw_cf_read (CODECFILTER_USERDATA_T   inst, char * buf, int len); 
     84int cont_fw_cf_flush(CODECFILTER_USERDATA_T   inst); 
     85int cont_fw_cf_delay(CODECFILTER_USERDATA_T   inst, uint_least32_t * delay); 
     86int cont_fw_cf_ctl  (CODECFILTER_USERDATA_T   inst, int cmd, void * data); 
     87 
    7088#endif 
    7189 
Note: See TracChangeset for help on using the changeset viewer.