Chromium Code Reviews| Index: webrtc/media/base/mediachannel.h |
| diff --git a/webrtc/media/base/mediachannel.h b/webrtc/media/base/mediachannel.h |
| index badec464cdbbb847a3eb624c1831ffa775a7488a..7414e9af7003abba19b27be30f5551b68286d4bf 100644 |
| --- a/webrtc/media/base/mediachannel.h |
| +++ b/webrtc/media/base/mediachannel.h |
| @@ -15,6 +15,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "webrtc/api/rtpparameters.h" |
| #include "webrtc/base/basictypes.h" |
| #include "webrtc/base/buffer.h" |
| #include "webrtc/base/dscp.h" |
| @@ -79,6 +80,15 @@ static std::string VectorToString(const std::vector<T>& vals) { |
| return ost.str(); |
| } |
| +template <typename T> |
| +static T MinPositive(T a, T b) { |
|
pthatcher1
2016/03/12 01:21:03
This would be more clear as the min of rtc::Option
skvlad
2016/03/15 21:18:18
I'm going to send a separate code review for the c
pthatcher1
2016/03/16 00:48:42
sure
|
| + if (a <= 0) |
|
Taylor Brandstetter
2016/03/12 01:57:06
nit: {}s
skvlad
2016/03/15 21:18:18
Done.
|
| + return b; |
| + if (b <= 0) |
| + return a; |
| + return std::min(a, b); |
| +} |
| + |
| // Construction-time settings, passed to |
| // MediaControllerInterface::Create, and passed on when creating |
| // MediaChannels. |
| @@ -892,6 +902,9 @@ class VoiceMediaChannel : public MediaChannel { |
| virtual ~VoiceMediaChannel() {} |
| virtual bool SetSendParameters(const AudioSendParameters& params) = 0; |
| virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0; |
| + virtual webrtc::RTCRtpParameters GetRtpParameters(uint32_t ssrc) = 0; |
|
Taylor Brandstetter
2016/03/12 01:57:06
Again, can probably be const.
skvlad
2016/03/15 21:18:18
Done.
|
| + virtual bool SetRtpParameters(uint32_t ssrc, |
| + const webrtc::RTCRtpParameters& parameters) = 0; |
| // Starts or stops playout of received audio. |
| virtual bool SetPlayout(bool playout) = 0; |
| // Starts or stops sending (and potentially capture) of local audio. |
| @@ -964,6 +977,9 @@ class VideoMediaChannel : public MediaChannel { |
| virtual bool SetSendParameters(const VideoSendParameters& params) = 0; |
| virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; |
| + virtual webrtc::RTCRtpParameters GetRtpParameters(uint32_t ssrc) = 0; |
| + virtual bool SetRtpParameters(uint32_t ssrc, |
| + const webrtc::RTCRtpParameters& parameters) = 0; |
| // Gets the currently set codecs/payload types to be used for outgoing media. |
| virtual bool GetSendCodec(VideoCodec* send_codec) = 0; |
| // Starts or stops transmission (and potentially capture) of local video. |