summaryrefslogtreecommitdiff
path: root/toxav/media.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@tox.im>2014-03-10 19:49:29 -0400
committerirungentoo <irungentoo@tox.im>2014-03-10 19:49:29 -0400
commit6858d6387d76dd7e61cba147b8c492a33d91c9d5 (patch)
tree53d702f0a7d4517d41cf78a19f8f9cf8dea91317 /toxav/media.c
parent7b87975dec3eaa555ec10747db37cd3f992fa279 (diff)
parentd1fbbae5e91bec322cd358b6e4d3d1f3f3c67669 (diff)
Merge pull request #795 from mannol1/master
Added custom callback data and capability identifier
Diffstat (limited to 'toxav/media.c')
-rw-r--r--toxav/media.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/toxav/media.c b/toxav/media.c
index 59ca49b7..f6c33309 100644
--- a/toxav/media.c
+++ b/toxav/media.c
@@ -273,12 +273,12 @@ CodecState *codec_init_session ( uint32_t audio_bitrate,
273 video_height = 240; */ 273 video_height = 240; */
274 } 274 }
275 else { 275 else {
276 retu->supported_actions |= ( 0 == init_video_encoder(retu, video_width, video_height, video_bitrate) ) ? v_encoding : 0; 276 retu->capabilities |= ( 0 == init_video_encoder(retu, video_width, video_height, video_bitrate) ) ? v_encoding : 0;
277 retu->supported_actions |= ( 0 == init_video_decoder(retu) ) ? v_decoding : 0; 277 retu->capabilities |= ( 0 == init_video_decoder(retu) ) ? v_decoding : 0;
278 } 278 }
279 279
280 retu->supported_actions |= ( 0 == init_audio_encoder(retu, audio_channels) ) ? a_encoding : 0; 280 retu->capabilities |= ( 0 == init_audio_encoder(retu, audio_channels) ) ? a_encoding : 0;
281 retu->supported_actions |= ( 0 == init_audio_decoder(retu, audio_channels) ) ? a_decoding : 0; 281 retu->capabilities |= ( 0 == init_audio_decoder(retu, audio_channels) ) ? a_decoding : 0;
282 282
283 return retu; 283 return retu;
284} 284}
@@ -295,9 +295,9 @@ void codec_terminate_session ( CodecState *cs )
295 /* TODO: Terminate video 295 /* TODO: Terminate video
296 * Do what??? 296 * Do what???
297 */ 297 */
298 if ( cs->supported_actions & v_decoding ) 298 if ( cs->capabilities & v_decoding )
299 vpx_codec_destroy(&cs->v_decoder); 299 vpx_codec_destroy(&cs->v_decoder);
300 300
301 if ( cs->supported_actions & v_encoding ) 301 if ( cs->capabilities & v_encoding )
302 vpx_codec_destroy(&cs->v_encoder); 302 vpx_codec_destroy(&cs->v_encoder);
303} 303}