aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_audio_stream.cpp
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-07-07 17:16:05 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-07-09 21:16:28 +0000
commitd871c6c6afad0e634e5d411debe5d8db75218d6b (patch)
tree57a1ddc967428d0f445ae8f672157e33256f2ebe /ui/qt/rtp_audio_stream.cpp
parent56c34de93d8581514bf98cd19fe201ba2df63cb8 (diff)
codecs: Change interface, use SDP information for dynamic codecs
RTP static registered payload types fully describe the codec, including clock rate and channels. For the payload formats that use dynamic payload type number assignment, while some formats have a fixed (or normal) clock rate and number of audio channels, there are some codecs that can accept several possible values. Change the codec plugin interface to accept these parameters, and move the codec-specific state to a member of a new struct. As an example, use this to implement the L16 media type for other clock rates and number of audio channels, both the standard PT=10 stereo type as well as other clock rates negotiated via a dynamic type. (See sip-rtp-l16.pcap on the SampleCaptures wiki page for an example.) Note that RTP Player doesn't support codecs returning output with more than one channel currently, so downmix to mono. The next step is adding the format parameters from fmtp to this. (See #17608)
Diffstat (limited to 'ui/qt/rtp_audio_stream.cpp')
-rw-r--r--ui/qt/rtp_audio_stream.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
index a63815b9ae..5ceb809fc7 100644
--- a/ui/qt/rtp_audio_stream.cpp
+++ b/ui/qt/rtp_audio_stream.cpp
@@ -303,6 +303,8 @@ void RtpAudioStream::decodeAudio(QAudioDeviceInfo out_device)
}
size_t decoded_bytes = decode_rtp_packet(rtp_packet, &decode_buff, decoders_hash_, &channels, &sample_rate);
+ // XXX: We don't actually *do* anything with channels, and just treat
+ // everything as if it were mono
unsigned rtp_clock_rate = sample_rate;
if (rtp_packet->info->info_payload_type == PT_G722) {