Changeset 2829:d22cf56280bd in roaraudio for roard/container_framework.c
- Timestamp:
- 10/02/09 23:45:18 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/container_framework.c
r2716 r2829 52 52 self->state = ROAR_STREAMSTATE_INITING; 53 53 54 if ( cont_pvio_open(&(self->vio), self) == -1 ) { 55 free(self); 56 return -1; 57 } 58 54 59 *inst = self; 55 60 return 0; … … 104 109 } 105 110 106 // VIO s:111 // VIO Client: 107 112 int cont_fw_new_child(struct cont_fw_parent_inst * inst, int id) { 108 113 struct cont_fw_child_vio_inst * self; … … 229 234 230 235 int cont_fw_ctl (struct roar_vio_calls * vio, int cmd, void * data); 236 237 // VIO Parent: 238 int 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 254 ssize_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 258 ssize_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 262 off_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 266 int 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 270 int 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 274 int 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 278 int cont_pvio_close (struct roar_vio_calls * vio) { 279 return roar_vio_close(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio)); 280 } 231 281 232 282 // CF:
Note: See TracChangeset
for help on using the changeset viewer.