Index: talk/media/base/mediachannel.h |
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h |
index e7af7a76aa6368529a26d0dc19e53eaac2956824..bdf2e321c38692f9f890f20728692626527460fc 100644 |
--- a/talk/media/base/mediachannel.h |
+++ b/talk/media/base/mediachannel.h |
@@ -327,7 +327,6 @@ struct VideoOptions { |
change.system_low_adaptation_threshhold); |
system_high_adaptation_threshhold.SetFrom( |
change.system_high_adaptation_threshhold); |
- buffered_mode_latency.SetFrom(change.buffered_mode_latency); |
dscp.SetFrom(change.dscp); |
suspend_below_min_bitrate.SetFrom(change.suspend_below_min_bitrate); |
unsignalled_recv_stream_limit.SetFrom(change.unsignalled_recv_stream_limit); |
@@ -356,7 +355,7 @@ struct VideoOptions { |
o.system_low_adaptation_threshhold && |
system_high_adaptation_threshhold == |
o.system_high_adaptation_threshhold && |
- buffered_mode_latency == o.buffered_mode_latency && dscp == o.dscp && |
+ dscp == o.dscp && |
suspend_below_min_bitrate == o.suspend_below_min_bitrate && |
unsignalled_recv_stream_limit == o.unsignalled_recv_stream_limit && |
use_simulcast_adapter == o.use_simulcast_adapter && |
@@ -385,7 +384,6 @@ struct VideoOptions { |
ost << ToStringIfSet("process", process_adaptation_threshhold); |
ost << ToStringIfSet("low", system_low_adaptation_threshhold); |
ost << ToStringIfSet("high", system_high_adaptation_threshhold); |
- ost << ToStringIfSet("buffered mode latency", buffered_mode_latency); |
ost << ToStringIfSet("dscp", dscp); |
ost << ToStringIfSet("suspend below min bitrate", |
suspend_below_min_bitrate); |
@@ -439,8 +437,6 @@ struct VideoOptions { |
Settable<float> system_low_adaptation_threshhold; |
// High threshhold for cpu adaptation. (Adapt down) |
Settable<float> system_high_adaptation_threshhold; |
- // Specify buffered mode latency in milliseconds. |
- Settable<int> buffered_mode_latency; |
// Set DSCP value for packet sent from video channel. |
Settable<bool> dscp; |
// Enable WebRTC suspension of video. No video frames will be sent when the |
@@ -989,6 +985,21 @@ struct DataMediaInfo { |
std::vector<DataReceiverInfo> receivers; |
}; |
+struct AudioSendParameters { |
pbos-webrtc
2015/07/11 08:48:16
Can I has ToString() methods on all of these for l
pthatcher1
2015/07/13 22:58:27
Done.
|
+ std::vector<AudioCodec> codecs; |
+ std::vector<RtpHeaderExtension> extensions; |
+ // TODO(pthatcher): Move max_bandwidth_bps into AudioOptions. |
+ int max_bandwidth_bps; |
+ AudioOptions options; |
+ // TODO(pthatcher): Add "remote" streams. |
+}; |
+ |
+struct AudioRecvParameters { |
+ std::vector<AudioCodec> codecs; |
+ std::vector<RtpHeaderExtension> extensions; |
+ // TODO(pthatcher): Add "local" streams. |
+}; |
+ |
class VoiceMediaChannel : public MediaChannel { |
public: |
enum Error { |
@@ -1014,6 +1025,22 @@ class VoiceMediaChannel : public MediaChannel { |
VoiceMediaChannel() {} |
virtual ~VoiceMediaChannel() {} |
+ // TODO(pthatcher): Remove SetSendCodecs, |
+ // SetSendRtpHeaderExtensions, SetMaxSendBandwidth, and SetOptions |
+ // once all implementations implement SetSendParameters. |
+ virtual bool SetSendParameters(const AudioSendParameters& params) { |
+ return (SetSendCodecs(params.codecs) && |
+ SetSendRtpHeaderExtensions(params.extensions) && |
+ SetMaxSendBandwidth(params.max_bandwidth_bps) && |
+ SetOptions(params.options)); |
+ } |
+ // TODO(pthatcher): Remove SetRecvCodecs and |
+ // SetRecvRtpHeaderExtensions once all implementations implement |
+ // SetRecvParameters. |
+ virtual bool SetRecvParameters(const AudioRecvParameters& params) { |
+ return (SetRecvCodecs(params.codecs) && |
+ SetRecvRtpHeaderExtensions(params.extensions)); |
+ } |
// Sets the codecs/payload types to be used for incoming media. |
virtual bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) = 0; |
// Sets the codecs/payload types to be used for outgoing media. |
@@ -1069,6 +1096,21 @@ class VoiceMediaChannel : public MediaChannel { |
sigslot::signal2<uint32, VoiceMediaChannel::Error> SignalMediaError; |
}; |
+struct VideoSendParameters { |
+ std::vector<VideoCodec> codecs; |
+ std::vector<RtpHeaderExtension> extensions; |
+ // TODO(pthatcher): Move max_bandwidth_bps into VideoOptions. |
+ int max_bandwidth_bps; |
+ VideoOptions options; |
+ // TODO(pthatcher): Add "remote" streams. |
+}; |
+ |
+struct VideoRecvParameters { |
+ std::vector<VideoCodec> codecs; |
+ std::vector<RtpHeaderExtension> extensions; |
+ // TODO(pthatcher): Add "local" streams. |
+}; |
+ |
class VideoMediaChannel : public MediaChannel { |
public: |
enum Error { |
@@ -1090,6 +1132,22 @@ class VideoMediaChannel : public MediaChannel { |
virtual ~VideoMediaChannel() {} |
// Allow video channel to unhook itself from an associated voice channel. |
virtual void DetachVoiceChannel() = 0; |
+ // TODO(pthatcher): Remove SetSendCodecs, |
+ // SetSendRtpHeaderExtensions, SetMaxSendBandwidth, and SetOptions |
+ // once all implementations implement SetSendParameters. |
+ virtual bool SetSendParameters(const VideoSendParameters& params) { |
+ return (SetSendCodecs(params.codecs) && |
+ SetSendRtpHeaderExtensions(params.extensions) && |
+ SetMaxSendBandwidth(params.max_bandwidth_bps) && |
+ SetOptions(params.options)); |
+ } |
+ // TODO(pthatcher): Remove SetRecvCodecs and |
+ // SetRecvRtpHeaderExtensions once all implementations implement |
+ // SetRecvParameters. |
+ virtual bool SetRecvParameters(const VideoRecvParameters& params) { |
+ return (SetRecvCodecs(params.codecs) && |
+ SetRecvRtpHeaderExtensions(params.extensions)); |
+ } |
// Sets the codecs/payload types to be used for incoming media. |
virtual bool SetRecvCodecs(const std::vector<VideoCodec>& codecs) = 0; |
// Sets the codecs/payload types to be used for outgoing media. |
@@ -1193,6 +1251,18 @@ struct SendDataParams { |
enum SendDataResult { SDR_SUCCESS, SDR_ERROR, SDR_BLOCK }; |
+struct DataSendParameters { |
+ std::vector<DataCodec> codecs; |
+ // TODO(pthatcher): Move max_bandwidth_bps into DataOptions. |
+ int max_bandwidth_bps; |
+ // TODO(pthatcher): Add "remote" streams. |
+}; |
+ |
+struct DataRecvParameters { |
+ std::vector<DataCodec> codecs; |
+ // TODO(pthatcher): Add "local" streams. |
+}; |
+ |
class DataMediaChannel : public MediaChannel { |
public: |
enum Error { |
@@ -1207,6 +1277,19 @@ class DataMediaChannel : public MediaChannel { |
virtual ~DataMediaChannel() {} |
+ // TODO(pthatcher): Remove SetSendCodecs, |
+ // SetSendRtpHeaderExtensions, SetMaxSendBandwidth, and SetOptions |
+ // once all implementations implement SetSendParameters. |
+ virtual bool SetSendParameters(const DataSendParameters& params) { |
+ return (SetSendCodecs(params.codecs) && |
+ SetMaxSendBandwidth(params.max_bandwidth_bps)); |
+ } |
+ // TODO(pthatcher): Remove SetRecvCodecs and |
+ // SetRecvRtpHeaderExtensions once all implementations implement |
+ // SetRecvParameters. |
+ virtual bool SetRecvParameters(const DataRecvParameters& params) { |
+ return SetRecvCodecs(params.codecs); |
+ } |
virtual bool SetSendCodecs(const std::vector<DataCodec>& codecs) = 0; |
virtual bool SetRecvCodecs(const std::vector<DataCodec>& codecs) = 0; |