diff options
Diffstat (limited to 'talk/media/base/codec.cc')
-rw-r--r-- | talk/media/base/codec.cc | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/talk/media/base/codec.cc b/talk/media/base/codec.cc index 5b747d1917..59708b37dd 100644 --- a/talk/media/base/codec.cc +++ b/talk/media/base/codec.cc @@ -163,13 +163,15 @@ void Codec::IntersectFeedbackParams(const Codec& other) { feedback_params.Intersect(other.feedback_params); } -AudioCodec::AudioCodec(int pt, - const std::string& nm, - int cr, - int br, - int cs, - int pr) - : Codec(pt, nm, cr, pr), bitrate(br), channels(cs) { +AudioCodec::AudioCodec(int id, + const std::string& name, + int clockrate, + int bitrate, + size_t channels, + int preference) + : Codec(id, name, clockrate, preference), + bitrate(bitrate), + channels(channels) { } AudioCodec::AudioCodec() : Codec(), bitrate(0), channels(0) { @@ -219,20 +221,20 @@ std::string VideoCodec::ToString() const { return os.str(); } -VideoCodec::VideoCodec(int pt, - const std::string& nm, - int w, - int h, - int fr, - int pr) - : Codec(pt, nm, kVideoCodecClockrate, pr), - width(w), - height(h), - framerate(fr) { +VideoCodec::VideoCodec(int id, + const std::string& name, + int width, + int height, + int framerate, + int preference) + : Codec(id, name, kVideoCodecClockrate, preference), + width(width), + height(height), + framerate(framerate) { } -VideoCodec::VideoCodec(int pt, const std::string& nm) - : Codec(pt, nm, kVideoCodecClockrate, 0), +VideoCodec::VideoCodec(int id, const std::string& name) + : Codec(id, name, kVideoCodecClockrate, 0), width(0), height(0), framerate(0) { @@ -334,6 +336,11 @@ bool HasRemb(const VideoCodec& codec) { FeedbackParam(kRtcpFbParamRemb, kParamValueEmpty)); } +bool HasTransportCc(const VideoCodec& codec) { + return codec.HasFeedbackParam( + FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty)); +} + bool CodecNamesEq(const std::string& name1, const std::string& name2) { return _stricmp(name1.c_str(), name2.c_str()) == 0; } |