Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: talk/media/base/mediachannel.h

Issue 1327933002: Full impl of NnChannel::SetSendParameters and NnChannel::SetRecvParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/media/base/mediachannel.h
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h
index cfeb2d8c919c9cea16f80f0c75d69a9984cf35b1..2d3856549df77ef77b5ad9ab6b24fa6bdb41baba 100644
--- a/talk/media/base/mediachannel.h
+++ b/talk/media/base/mediachannel.h
@@ -566,17 +566,10 @@ class MediaChannel : public sigslot::has_slots<> {
// multiple SSRCs.
virtual bool RemoveRecvStream(uint32 ssrc) = 0;
- // Sets the RTP extension headers and IDs to use when sending RTP.
- virtual bool SetRecvRtpHeaderExtensions(
- const std::vector<RtpHeaderExtension>& extensions) = 0;
- virtual bool SetSendRtpHeaderExtensions(
- const std::vector<RtpHeaderExtension>& extensions) = 0;
// Returns the absoulte sendtime extension id value from media channel.
virtual int GetRtpSendTimeExtnId() const {
return -1;
}
- // Sets the maximum allowed bandwidth to use when sending data.
- virtual bool SetMaxSendBandwidth(int bps) = 0;
// Base method to send packet using NetworkInterface.
bool SendPacket(rtc::Buffer* packet) {
@@ -1070,26 +1063,8 @@ 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.
- virtual bool SetSendCodecs(const std::vector<AudioCodec>& codecs) = 0;
+ virtual bool SetSendParameters(const AudioSendParameters& params) = 0;
+ virtual bool SetRecvParameters(const AudioRecvParameters& params) = 0;
// Starts or stops playout of received audio.
virtual bool SetPlayout(bool playout) = 0;
// Starts or stops sending (and potentially capture) of local audio.
@@ -1131,8 +1106,6 @@ class VoiceMediaChannel : public MediaChannel {
ASSERT(error != NULL);
*error = ERROR_NONE;
}
- // Sets the media options to use.
- virtual bool SetOptions(const AudioOptions& options) = 0;
// Signal errors from MediaChannel. Arguments are:
// ssrc(uint32), and error(VoiceMediaChannel::Error).
@@ -1166,26 +1139,8 @@ 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.
- virtual bool SetSendCodecs(const std::vector<VideoCodec>& codecs) = 0;
+ virtual bool SetSendParameters(const VideoSendParameters& params) = 0;
+ virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0;
// Gets the currently set codecs/payload types to be used for outgoing media.
virtual bool GetSendCodec(VideoCodec* send_codec) = 0;
// Sets the format of a specified outgoing stream.
@@ -1209,8 +1164,6 @@ class VideoMediaChannel : public MediaChannel {
virtual bool SendIntraFrame() = 0;
// Reuqest each of the remote senders to send an intra frame.
virtual bool RequestIntraFrame() = 0;
- // Sets the media options to use.
- virtual bool SetOptions(const VideoOptions& options) = 0;
virtual void UpdateAspectRatio(int ratio_w, int ratio_h) = 0;
// Signal errors from MediaChannel. Arguments are:
@@ -1322,21 +1275,8 @@ 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;
+ virtual bool SetSendParameters(const DataSendParameters& params) = 0;
+ virtual bool SetRecvParameters(const DataRecvParameters& params) = 0;
// TODO(pthatcher): Implement this.
virtual bool GetStats(DataMediaInfo* info) { return true; }

Powered by Google App Engine
This is Rietveld 408576698