From 8aa62cfef7e4f581f88eeaad1cb82f39546bec88 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sun, 27 Jul 2014 12:51:20 -0400 Subject: Initialize codec session with right values. Audio decoder and encoder channel values are sepparate values, the decoder should be set to the number of channels the other peer has his encoder set. --- toxav/codec.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'toxav/codec.h') diff --git a/toxav/codec.h b/toxav/codec.h index 755673f3..dceeea7a 100644 --- a/toxav/codec.h +++ b/toxav/codec.h @@ -64,9 +64,11 @@ typedef struct _CodecState { OpusEncoder *audio_encoder; int audio_bitrate; int audio_sample_rate; + int audio_encoder_channels; /* audio decoding */ OpusDecoder *audio_decoder; + int audio_decoder_channels; uint64_t capabilities; /* supports*/ @@ -93,11 +95,12 @@ RTPMessage *dequeue(JitterBuffer *q, int *success); CodecState *codec_init_session ( uint32_t audio_bitrate, uint16_t audio_frame_duration, uint32_t audio_sample_rate, - uint32_t audio_channels, + uint32_t encoder_audio_channels, + uint32_t decoder_audio_channels, uint32_t audio_VAD_tolerance_ms, - uint16_t video_width, - uint16_t video_height, - uint32_t video_bitrate); + uint16_t max_video_width, + uint16_t max_video_height, + uint32_t video_bitrate ); void codec_terminate_session(CodecState *cs); -- cgit v1.2.3