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

Side by Side Diff: webrtc/media/base/mediachannel.h

Issue 1838413002: Combining SetVideoSend and SetSource into one method. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 SetFrom(&video_noise_reduction, change.video_noise_reduction); 271 SetFrom(&video_noise_reduction, change.video_noise_reduction);
272 SetFrom(&screencast_min_bitrate_kbps, change.screencast_min_bitrate_kbps); 272 SetFrom(&screencast_min_bitrate_kbps, change.screencast_min_bitrate_kbps);
273 SetFrom(&is_screencast, change.is_screencast); 273 SetFrom(&is_screencast, change.is_screencast);
274 } 274 }
275 275
276 bool operator==(const VideoOptions& o) const { 276 bool operator==(const VideoOptions& o) const {
277 return video_noise_reduction == o.video_noise_reduction && 277 return video_noise_reduction == o.video_noise_reduction &&
278 screencast_min_bitrate_kbps == o.screencast_min_bitrate_kbps && 278 screencast_min_bitrate_kbps == o.screencast_min_bitrate_kbps &&
279 is_screencast == o.is_screencast; 279 is_screencast == o.is_screencast;
280 } 280 }
281 bool operator!=(const VideoOptions& o) const { return !(*this == o); }
281 282
282 std::string ToString() const { 283 std::string ToString() const {
283 std::ostringstream ost; 284 std::ostringstream ost;
284 ost << "VideoOptions {"; 285 ost << "VideoOptions {";
285 ost << ToStringIfSet("noise reduction", video_noise_reduction); 286 ost << ToStringIfSet("noise reduction", video_noise_reduction);
286 ost << ToStringIfSet("screencast min bitrate kbps", 287 ost << ToStringIfSet("screencast min bitrate kbps",
287 screencast_min_bitrate_kbps); 288 screencast_min_bitrate_kbps);
288 ost << ToStringIfSet("is_screencast ", is_screencast); 289 ost << ToStringIfSet("is_screencast ", is_screencast);
289 ost << "}"; 290 ost << "}";
290 return ost.str(); 291 return ost.str();
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 virtual bool SetSendParameters(const VideoSendParameters& params) = 0; 980 virtual bool SetSendParameters(const VideoSendParameters& params) = 0;
980 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; 981 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0;
981 virtual webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const = 0; 982 virtual webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const = 0;
982 virtual bool SetRtpParameters(uint32_t ssrc, 983 virtual bool SetRtpParameters(uint32_t ssrc,
983 const webrtc::RtpParameters& parameters) = 0; 984 const webrtc::RtpParameters& parameters) = 0;
984 // Gets the currently set codecs/payload types to be used for outgoing media. 985 // Gets the currently set codecs/payload types to be used for outgoing media.
985 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; 986 virtual bool GetSendCodec(VideoCodec* send_codec) = 0;
986 // Starts or stops transmission (and potentially capture) of local video. 987 // Starts or stops transmission (and potentially capture) of local video.
987 virtual bool SetSend(bool send) = 0; 988 virtual bool SetSend(bool send) = 0;
988 // Configure stream for sending. 989 // Configure stream for sending.
990 // |ssrc| must be non-zero.
989 virtual bool SetVideoSend(uint32_t ssrc, 991 virtual bool SetVideoSend(uint32_t ssrc,
990 bool enable, 992 bool enable,
991 const VideoOptions* options) = 0; 993 const VideoOptions* options,
994 VideoCapturer* capturer) = 0;
992 // Sets the sink object to be used for the specified stream. 995 // Sets the sink object to be used for the specified stream.
993 // If SSRC is 0, the renderer is used for the 'default' stream. 996 // If SSRC is 0, the renderer is used for the 'default' stream.
994 virtual bool SetSink(uint32_t ssrc, 997 virtual bool SetSink(uint32_t ssrc,
995 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; 998 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0;
996 // If |ssrc| is 0, replace the default capturer (engine capturer) with
997 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC.
998 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0;
999 // Gets quality stats for the channel. 999 // Gets quality stats for the channel.
1000 virtual bool GetStats(VideoMediaInfo* info) = 0; 1000 virtual bool GetStats(VideoMediaInfo* info) = 0;
1001 }; 1001 };
1002 1002
1003 enum DataMessageType { 1003 enum DataMessageType {
1004 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID 1004 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID
1005 // values. 1005 // values.
1006 DMT_NONE = 0, 1006 DMT_NONE = 0,
1007 DMT_CONTROL = 1, 1007 DMT_CONTROL = 1,
1008 DMT_BINARY = 2, 1008 DMT_BINARY = 2,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 // Signal when the media channel is ready to send the stream. Arguments are: 1115 // Signal when the media channel is ready to send the stream. Arguments are:
1116 // writable(bool) 1116 // writable(bool)
1117 sigslot::signal1<bool> SignalReadyToSend; 1117 sigslot::signal1<bool> SignalReadyToSend;
1118 // Signal for notifying that the remote side has closed the DataChannel. 1118 // Signal for notifying that the remote side has closed the DataChannel.
1119 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1119 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1120 }; 1120 };
1121 1121
1122 } // namespace cricket 1122 } // namespace cricket
1123 1123
1124 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1124 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698