From 07e276c8d54ecee97452af3a9aae85d314523700 Mon Sep 17 00:00:00 2001 From: johan Date: Tue, 13 Dec 2016 02:23:03 -0800 Subject: [PATCH] Rename RtpStreamReceiver::SetCodec() to ::AddCodec(). AddCodec represents better what this function actually does. BUG=None Review-Url: https://codereview.webrtc.org/2573593003 Cr-Commit-Position: refs/heads/master@{#15565} --- webrtc/video/rtp_stream_receiver.cc | 6 +++--- webrtc/video/rtp_stream_receiver.h | 2 +- webrtc/video/video_receive_stream.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webrtc/video/rtp_stream_receiver.cc b/webrtc/video/rtp_stream_receiver.cc index 972e6dea92..73ca531b12 100644 --- a/webrtc/video/rtp_stream_receiver.cc +++ b/webrtc/video/rtp_stream_receiver.cc @@ -173,7 +173,7 @@ RtpStreamReceiver::RtpStreamReceiver( ulpfec_codec.codecType = kVideoCodecULPFEC; strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; - RTC_CHECK(SetReceiveCodec(ulpfec_codec)); + RTC_CHECK(AddReceiveCodec(ulpfec_codec)); } if (IsRedEnabled()) { @@ -181,7 +181,7 @@ RtpStreamReceiver::RtpStreamReceiver( red_codec.codecType = kVideoCodecRED; strncpy(red_codec.plName, "red", sizeof(red_codec.plName)); red_codec.plType = config_.rtp.ulpfec.red_payload_type; - RTC_CHECK(SetReceiveCodec(red_codec)); + RTC_CHECK(AddReceiveCodec(red_codec)); if (config_.rtp.ulpfec.red_rtx_payload_type != -1) { rtp_payload_registry_.SetRtxPayloadType( config_.rtp.ulpfec.red_rtx_payload_type, @@ -223,7 +223,7 @@ RtpStreamReceiver::~RtpStreamReceiver() { UpdateHistograms(); } -bool RtpStreamReceiver::SetReceiveCodec(const VideoCodec& video_codec) { +bool RtpStreamReceiver::AddReceiveCodec(const VideoCodec& video_codec) { int8_t old_pltype = -1; if (rtp_payload_registry_.ReceivePayloadType(video_codec, &old_pltype) != -1) { diff --git a/webrtc/video/rtp_stream_receiver.h b/webrtc/video/rtp_stream_receiver.h index 082f1056da..6968cc6428 100644 --- a/webrtc/video/rtp_stream_receiver.h +++ b/webrtc/video/rtp_stream_receiver.h @@ -82,7 +82,7 @@ class RtpStreamReceiver : public RtpData, VCMTiming* timing); ~RtpStreamReceiver(); - bool SetReceiveCodec(const VideoCodec& video_codec); + bool AddReceiveCodec(const VideoCodec& video_codec); uint32_t GetRemoteSsrc() const; int GetCsrcs(uint32_t* csrcs) const; diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc index 1a4edeb166..b67e2951a2 100644 --- a/webrtc/video/video_receive_stream.cc +++ b/webrtc/video/video_receive_stream.cc @@ -317,7 +317,7 @@ void VideoReceiveStream::Start() { decoder.payload_type); VideoCodec codec = CreateDecoderVideoCodec(decoder); - RTC_CHECK(rtp_stream_receiver_.SetReceiveCodec(codec)); + RTC_CHECK(rtp_stream_receiver_.AddReceiveCodec(codec)); RTC_CHECK_EQ(VCM_OK, video_receiver_.RegisterReceiveCodec( &codec, num_cpu_cores_, false)); }