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

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

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make SetSource tolerate unknown ssrc and source == NULL. Created 4 years, 9 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
11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/basictypes.h" 18 #include "webrtc/base/basictypes.h"
19 #include "webrtc/base/buffer.h" 19 #include "webrtc/base/buffer.h"
20 #include "webrtc/base/dscp.h" 20 #include "webrtc/base/dscp.h"
21 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
22 #include "webrtc/base/optional.h" 22 #include "webrtc/base/optional.h"
23 #include "webrtc/base/sigslot.h" 23 #include "webrtc/base/sigslot.h"
24 #include "webrtc/base/socket.h" 24 #include "webrtc/base/socket.h"
25 #include "webrtc/base/window.h" 25 #include "webrtc/base/window.h"
26 #include "webrtc/media/base/codec.h" 26 #include "webrtc/media/base/codec.h"
27 #include "webrtc/media/base/mediaconstants.h" 27 #include "webrtc/media/base/mediaconstants.h"
28 #include "webrtc/media/base/streamparams.h" 28 #include "webrtc/media/base/streamparams.h"
29 #include "webrtc/media/base/videosinkinterface.h" 29 #include "webrtc/media/base/videosinkinterface.h"
30 #include "webrtc/media/base/videosourceinterface.h"
30 // TODO(juberti): re-evaluate this include 31 // TODO(juberti): re-evaluate this include
31 #include "webrtc/pc/audiomonitor.h" 32 #include "webrtc/pc/audiomonitor.h"
32 33
33 namespace rtc { 34 namespace rtc {
34 class Buffer; 35 class Buffer;
35 class RateLimiter; 36 class RateLimiter;
36 class Timing; 37 class Timing;
37 } 38 }
38 39
39 namespace webrtc { 40 namespace webrtc {
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 // Starts or stops transmission (and potentially capture) of local video. 976 // Starts or stops transmission (and potentially capture) of local video.
976 virtual bool SetSend(bool send) = 0; 977 virtual bool SetSend(bool send) = 0;
977 // Configure stream for sending. 978 // Configure stream for sending.
978 virtual bool SetVideoSend(uint32_t ssrc, 979 virtual bool SetVideoSend(uint32_t ssrc,
979 bool enable, 980 bool enable,
980 const VideoOptions* options) = 0; 981 const VideoOptions* options) = 0;
981 // Sets the sink object to be used for the specified stream. 982 // Sets the sink object to be used for the specified stream.
982 // If SSRC is 0, the renderer is used for the 'default' stream. 983 // If SSRC is 0, the renderer is used for the 'default' stream.
983 virtual bool SetSink(uint32_t ssrc, 984 virtual bool SetSink(uint32_t ssrc,
984 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0; 985 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0;
985 // If |ssrc| is 0, replace the default capturer (engine capturer) with 986 // Register a source. The |ssrc| must correspond to a registered
986 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC. 987 // send stream.
987 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0; 988 virtual void SetSource(
989 uint32_t ssrc,
990 rtc::VideoSourceInterface<cricket::VideoFrame>* source) = 0;
988 // Gets quality stats for the channel. 991 // Gets quality stats for the channel.
989 virtual bool GetStats(VideoMediaInfo* info) = 0; 992 virtual bool GetStats(VideoMediaInfo* info) = 0;
990 }; 993 };
991 994
992 enum DataMessageType { 995 enum DataMessageType {
993 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID 996 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID
994 // values. 997 // values.
995 DMT_NONE = 0, 998 DMT_NONE = 0,
996 DMT_CONTROL = 1, 999 DMT_CONTROL = 1,
997 DMT_BINARY = 2, 1000 DMT_BINARY = 2,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 // Signal when the media channel is ready to send the stream. Arguments are: 1113 // Signal when the media channel is ready to send the stream. Arguments are:
1111 // writable(bool) 1114 // writable(bool)
1112 sigslot::signal1<bool> SignalReadyToSend; 1115 sigslot::signal1<bool> SignalReadyToSend;
1113 // Signal for notifying that the remote side has closed the DataChannel. 1116 // Signal for notifying that the remote side has closed the DataChannel.
1114 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1117 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1115 }; 1118 };
1116 1119
1117 } // namespace cricket 1120 } // namespace cricket
1118 1121
1119 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1122 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698