Module: sems Branch: master Commit: c7800eabce5aeb190dc57484d1b550a81035f409 URL: https://github.com/sems-server/sems/commit/c7800eabce5aeb190dc57484d1b550a81035f409
Author: Stefan Sayer <stefan.sa...@googlemail.com> Committer: Stefan Sayer <stefan.sa...@googlemail.com> Date: 2015-06-24T05:42:51+02:00 core:rtp stream: take fmt params in payload initialization --- Modified: core/AmRtpAudio.cpp Modified: core/AmRtpStream.cpp Modified: core/AmRtpStream.h --- Diff: https://github.com/sems-server/sems/commit/c7800eabce5aeb190dc57484d1b550a81035f409.diff Patch: https://github.com/sems-server/sems/commit/c7800eabce5aeb190dc57484d1b550a81035f409.patch --- diff --git a/core/AmRtpAudio.cpp b/core/AmRtpAudio.cpp index a6bd259..6df11e2 100644 --- a/core/AmRtpAudio.cpp +++ b/core/AmRtpAudio.cpp @@ -44,6 +44,10 @@ AmAudioRtpFormat::~AmAudioRtpFormat() int AmAudioRtpFormat::setCurrentPayload(Payload pl) { if (this->codec_id != pl.codec_id) { + DBG("setCurrentPayload({%u, '%s', %u, %u, %u, '%s'})\n", + pl.pt, pl.name.c_str(), pl.clock_rate, pl.advertised_clock_rate, + pl.codec_id, pl.format_parameters.c_str()); + log_demangled_stacktrace(3); this->codec_id = pl.codec_id; DBG("fmt.codec_id = %d", this->codec_id); this->channels = 1; @@ -52,6 +56,7 @@ int AmAudioRtpFormat::setCurrentPayload(Payload pl) this->advertized_rate = pl.advertised_clock_rate; DBG("fmt.advertized_rate = %d", this->advertized_rate); this->frame_size = 20*this->rate/1000; + this->sdp_format_parameters = pl.format_parameters; DBG("fmt.sdp_format_parameters = %s", this->sdp_format_parameters.c_str()); if (this->codec != NULL) { destroyCodec(); diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp index 00903cb..c580278 100644 --- a/core/AmRtpStream.cpp +++ b/core/AmRtpStream.cpp @@ -636,6 +636,7 @@ int AmRtpStream::init(const AmSdp& local, p_it->codec_id = a_pl->codec_id; p_it->clock_rate = a_pl->sample_rate; p_it->advertised_clock_rate = sdp_it->clock_rate; + p_it->format_parameters = sdp_it->sdp_format_parameters; pl_map[sdp_it->payload_type].index = i; pl_map[sdp_it->payload_type].remote_pt = -1; diff --git a/core/AmRtpStream.h b/core/AmRtpStream.h index d1eb270..8396ab0 100644 --- a/core/AmRtpStream.h +++ b/core/AmRtpStream.h @@ -137,6 +137,7 @@ struct Payload { unsigned int clock_rate; unsigned int advertised_clock_rate; // differs for G722 int codec_id; + string format_parameters; }; /** _______________________________________________ Semsdev mailing list Semsdev@lists.iptel.org http://lists.iptel.org/mailman/listinfo/semsdev