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

Side by Side Diff: webrtc/api/mediastreaminterface.h

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 13 matching lines...) Expand all
24 #include "webrtc/base/refcount.h" 24 #include "webrtc/base/refcount.h"
25 #include "webrtc/base/scoped_ref_ptr.h" 25 #include "webrtc/base/scoped_ref_ptr.h"
26 #include "webrtc/base/optional.h" 26 #include "webrtc/base/optional.h"
27 #include "webrtc/media/base/mediachannel.h" 27 #include "webrtc/media/base/mediachannel.h"
28 #include "webrtc/media/base/videosinkinterface.h" 28 #include "webrtc/media/base/videosinkinterface.h"
29 #include "webrtc/media/base/videosourceinterface.h" 29 #include "webrtc/media/base/videosourceinterface.h"
30 30
31 namespace cricket { 31 namespace cricket {
32 32
33 class AudioRenderer; 33 class AudioRenderer;
34 class VideoCapturer;
35 class VideoRenderer; 34 class VideoRenderer;
36 class VideoFrame; 35 class VideoFrame;
37 36
38 } // namespace cricket 37 } // namespace cricket
39 38
40 namespace webrtc { 39 namespace webrtc {
41 40
42 // Generic observer interface. 41 // Generic observer interface.
43 class ObserverInterface { 42 class ObserverInterface {
44 public: 43 public:
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // The same source can be used in multiple VideoTracks. 107 // The same source can be used in multiple VideoTracks.
109 class VideoTrackSourceInterface 108 class VideoTrackSourceInterface
110 : public MediaSourceInterface, 109 : public MediaSourceInterface,
111 public rtc::VideoSourceInterface<cricket::VideoFrame> { 110 public rtc::VideoSourceInterface<cricket::VideoFrame> {
112 public: 111 public:
113 struct Stats { 112 struct Stats {
114 // Original size of captured frame, before video adaptation. 113 // Original size of captured frame, before video adaptation.
115 int input_width; 114 int input_width;
116 int input_height; 115 int input_height;
117 }; 116 };
118 // Get access to the source implementation of cricket::VideoCapturer.
119 // This can be used for receiving frames and state notifications.
120 // But it should not be used for starting or stopping capturing.
121 // TODO(perkj): We are currently trying to replace all internal use of
122 // cricket::VideoCapturer with rtc::VideoSourceInterface. Once that
123 // refactoring is done,
124 // remove this method.
125 virtual cricket::VideoCapturer* GetVideoCapturer() = 0;
126 117
127 virtual void Stop() = 0; 118 virtual void Stop() = 0;
128 virtual void Restart() = 0; 119 virtual void Restart() = 0;
129 120
130 // Indicates that parameters suitable for screencasts should be automatically 121 // Indicates that parameters suitable for screencasts should be automatically
131 // applied to RtpSenders. 122 // applied to RtpSenders.
132 // TODO(perkj): Remove these once all known applications have moved to 123 // TODO(perkj): Remove these once all known applications have moved to
133 // explicitly setting suitable parameters for screencasts and dont' need this 124 // explicitly setting suitable parameters for screencasts and dont' need this
134 // implicit behavior. 125 // implicit behavior.
135 virtual bool is_screencast() const = 0; 126 virtual bool is_screencast() const = 0;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; 273 virtual bool RemoveTrack(AudioTrackInterface* track) = 0;
283 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; 274 virtual bool RemoveTrack(VideoTrackInterface* track) = 0;
284 275
285 protected: 276 protected:
286 virtual ~MediaStreamInterface() {} 277 virtual ~MediaStreamInterface() {}
287 }; 278 };
288 279
289 } // namespace webrtc 280 } // namespace webrtc
290 281
291 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ 282 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698