diff options
author | irungentoo <irungentoo@gmail.com> | 2014-07-27 12:51:20 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-07-27 12:51:20 -0400 |
commit | 8aa62cfef7e4f581f88eeaad1cb82f39546bec88 (patch) | |
tree | b4944ec5ac87ffaac3f0ce9dd9a1f88df1331053 /toxav/codec.h | |
parent | 26bec89287d767afcd395cae89dc51103a6555fc (diff) |
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.
Diffstat (limited to 'toxav/codec.h')
-rw-r--r-- | toxav/codec.h | 11 |
1 files changed, 7 insertions, 4 deletions
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 { | |||
64 | OpusEncoder *audio_encoder; | 64 | OpusEncoder *audio_encoder; |
65 | int audio_bitrate; | 65 | int audio_bitrate; |
66 | int audio_sample_rate; | 66 | int audio_sample_rate; |
67 | int audio_encoder_channels; | ||
67 | 68 | ||
68 | /* audio decoding */ | 69 | /* audio decoding */ |
69 | OpusDecoder *audio_decoder; | 70 | OpusDecoder *audio_decoder; |
71 | int audio_decoder_channels; | ||
70 | 72 | ||
71 | uint64_t capabilities; /* supports*/ | 73 | uint64_t capabilities; /* supports*/ |
72 | 74 | ||
@@ -93,11 +95,12 @@ RTPMessage *dequeue(JitterBuffer *q, int *success); | |||
93 | CodecState *codec_init_session ( uint32_t audio_bitrate, | 95 | CodecState *codec_init_session ( uint32_t audio_bitrate, |
94 | uint16_t audio_frame_duration, | 96 | uint16_t audio_frame_duration, |
95 | uint32_t audio_sample_rate, | 97 | uint32_t audio_sample_rate, |
96 | uint32_t audio_channels, | 98 | uint32_t encoder_audio_channels, |
99 | uint32_t decoder_audio_channels, | ||
97 | uint32_t audio_VAD_tolerance_ms, | 100 | uint32_t audio_VAD_tolerance_ms, |
98 | uint16_t video_width, | 101 | uint16_t max_video_width, |
99 | uint16_t video_height, | 102 | uint16_t max_video_height, |
100 | uint32_t video_bitrate); | 103 | uint32_t video_bitrate ); |
101 | 104 | ||
102 | void codec_terminate_session(CodecState *cs); | 105 | void codec_terminate_session(CodecState *cs); |
103 | 106 | ||