Changeset 2683:f1d2fc914658 in roaraudio


Ignore:
Timestamp:
09/13/09 01:54:55 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

call setup function if existing

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/container_framework.c

    r2678 r2683  
    218218                                             struct roar_codecfilter   * filter) { 
    219219 struct cont_fw_parent_inst * self; 
     220 CONT_FW_SETUP_TYPE((*setup)); 
    220221 
    221222 if ( cont_fw_new(&self) == -1 ) 
    222223  return -1; 
     224 
     225 if ( (setup = filter->setup) != NULL ) { 
     226  if ( setup(self, codec, filter) == -1 ) { 
     227   cont_fw_delete(self); 
     228   return -1; 
     229  } 
     230 } 
    223231 
    224232 if ( self->pcb.open != NULL ) { 
  • roard/include/container_framework.h

    r2677 r2683  
    2929 
    3030#define CONT_FW_MAX_CHILDS 8 
     31 
     32#define CONT_FW_SETUP_TYPE(f) int (f)(struct cont_fw_parent_inst * self, int codec, struct roar_codecfilter    * filter) 
    3133 
    3234struct cont_fw_parent_inst; 
Note: See TracChangeset for help on using the changeset viewer.