Changeset 2829:d22cf56280bd in roaraudio for roard/container_framework.c


Ignore:
Timestamp:
10/02/09 23:45:18 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added vio thingy for parent stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/container_framework.c

    r2716 r2829  
    5252 self->state     = ROAR_STREAMSTATE_INITING; 
    5353 
     54 if ( cont_pvio_open(&(self->vio), self) == -1 ) { 
     55  free(self); 
     56  return -1; 
     57 } 
     58 
    5459 *inst = self; 
    5560 return 0; 
     
    104109} 
    105110 
    106 // VIOs: 
     111// VIO Client: 
    107112int     cont_fw_new_child(struct cont_fw_parent_inst  * inst, int id) { 
    108113 struct cont_fw_child_vio_inst * self; 
     
    229234 
    230235int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data); 
     236 
     237// VIO Parent: 
     238int     cont_pvio_open    (struct roar_vio_calls * vio, void * inst) { 
     239 memset(vio, 0, sizeof(struct roar_vio_calls)); 
     240 
     241 vio->inst  = inst; 
     242 
     243 vio->read     = cont_pvio_read; 
     244 vio->write    = cont_pvio_write; 
     245 vio->lseek    = cont_pvio_lseek; 
     246 vio->nonblock = cont_pvio_nonblock; 
     247 vio->sync     = cont_pvio_sync; 
     248 vio->ctl      = cont_pvio_ctl; 
     249 vio->close    = cont_pvio_close; 
     250 
     251 return 0; 
     252} 
     253 
     254ssize_t cont_pvio_read    (struct roar_vio_calls * vio, void *buf, size_t count) { 
     255 return stream_vio_s_read(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream, buf, count); 
     256} 
     257 
     258ssize_t cont_pvio_write   (struct roar_vio_calls * vio, void *buf, size_t count) { 
     259 return stream_vio_s_write(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream, buf, count); 
     260} 
     261 
     262off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) { 
     263 return roar_vio_lseek(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), offset, whence); 
     264} 
     265 
     266int     cont_pvio_nonblock(struct roar_vio_calls * vio, int state) { 
     267 return roar_vio_nonblock(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), state); 
     268} 
     269 
     270int     cont_pvio_sync    (struct roar_vio_calls * vio) { 
     271 return roar_vio_sync(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio)); 
     272} 
     273 
     274int     cont_pvio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) { 
     275 return roar_vio_ctl(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), cmd, data); 
     276} 
     277 
     278int     cont_pvio_close   (struct roar_vio_calls * vio) { 
     279 return roar_vio_close(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio)); 
     280} 
    231281 
    232282// CF: 
Note: See TracChangeset for help on using the changeset viewer.