Changeset 2921:d2fd1f7cdfa6 in roaraudio for libroardsp/transcode.c
- Timestamp:
- 10/16/09 17:47:00 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroardsp/transcode.c
r2643 r2921 33 33 static struct roar_xcoder_entry g_xcoders[] = { 34 34 {ROAR_CODEC_ALAW, roar_xcoder_dummy_inituninit, roar_xcoder_dummy_inituninit, roar_xcoder_dummy_packet_size_any, 35 roar_xcoder_alaw_encode, roar_xcoder_alaw_decode },35 roar_xcoder_alaw_encode, roar_xcoder_alaw_decode, NULL}, 36 36 {ROAR_CODEC_MULAW, roar_xcoder_dummy_inituninit, roar_xcoder_dummy_inituninit, roar_xcoder_dummy_packet_size_any, 37 roar_xcoder_mulaw_encode, roar_xcoder_mulaw_decode },37 roar_xcoder_mulaw_encode, roar_xcoder_mulaw_decode, NULL}, 38 38 #ifdef ROAR_HAVE_LIBCELT 39 39 {ROAR_CODEC_ROAR_CELT, roar_xcoder_celt_init, roar_xcoder_celt_uninit, roar_xcoder_celt_packet_size, 40 roar_xcoder_celt_encode, roar_xcoder_celt_decode },40 roar_xcoder_celt_encode, roar_xcoder_celt_decode, NULL}, 41 41 #endif 42 42 #ifdef ROAR_HAVE_LIBSPEEX 43 43 {ROAR_CODEC_ROAR_SPEEX, roar_xcoder_speex_init, roar_xcoder_speex_uninit, roar_xcoder_speex_packet_size, 44 roar_xcoder_speex_encode, roar_xcoder_speex_decode },44 roar_xcoder_speex_encode, roar_xcoder_speex_decode, NULL}, 45 45 #endif 46 {-1, NULL, NULL, NULL, NULL, NULL }46 {-1, NULL, NULL, NULL, NULL, NULL, NULL} 47 47 }; 48 48 … … 124 124 125 125 return _FUNC(uninit)(state); 126 } 127 128 int roar_xcoder_proc_header(struct roar_xcoder * state) { 129 _CHECK_BASIC(proc_header); 130 131 return _FUNC(proc_header)(state); 126 132 } 127 133 … … 367 373 } 368 374 375 int roar_bixcoder_read_header (struct roar_bixcoder * state) { 376 if ( state == NULL ) 377 return -1; 378 379 return roar_xcoder_proc_header(&(state->decoder)); 380 } 381 369 382 int roar_bixcoder_read_packet (struct roar_bixcoder * state, void * buf, size_t len) { 370 383 … … 382 395 383 396 return roar_xcoder_proc(&(state->decoder), buf, len); 397 } 398 399 int roar_bixcoder_write_header(struct roar_bixcoder * state) { 400 if ( state == NULL ) 401 return -1; 402 403 return roar_xcoder_proc_header(&(state->decoder)); 384 404 } 385 405
Note: See TracChangeset
for help on using the changeset viewer.