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

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

Issue 1842073002: Change VideoSourceInterface::needs_denoising() to return rtc::Optional<bool> (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
« no previous file with comments | « no previous file | webrtc/api/rtpsender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 // This file contains interfaces for MediaStream, MediaTrack and MediaSource. 11 // This file contains interfaces for MediaStream, MediaTrack and MediaSource.
12 // These interfaces are used for implementing MediaStream and MediaTrack as 12 // These interfaces are used for implementing MediaStream and MediaTrack as
13 // defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These 13 // defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These
14 // interfaces must be used only with PeerConnection. PeerConnectionManager 14 // interfaces must be used only with PeerConnection. PeerConnectionManager
15 // interface provides the factory methods to create MediaStream and MediaTracks. 15 // interface provides the factory methods to create MediaStream and MediaTracks.
16 16
17 #ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_ 17 #ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_
18 #define WEBRTC_API_MEDIASTREAMINTERFACE_H_ 18 #define WEBRTC_API_MEDIASTREAMINTERFACE_H_
19 19
20 #include <string> 20 #include <string>
21 #include <vector> 21 #include <vector>
22 22
23 #include "webrtc/base/basictypes.h" 23 #include "webrtc/base/basictypes.h"
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/media/base/mediachannel.h" 27 #include "webrtc/media/base/mediachannel.h"
27 #include "webrtc/media/base/videosinkinterface.h" 28 #include "webrtc/media/base/videosinkinterface.h"
28 #include "webrtc/media/base/videosourceinterface.h" 29 #include "webrtc/media/base/videosourceinterface.h"
29 30
30 namespace cricket { 31 namespace cricket {
31 32
32 class AudioRenderer; 33 class AudioRenderer;
33 class VideoCapturer; 34 class VideoCapturer;
34 class VideoRenderer; 35 class VideoRenderer;
35 class VideoFrame; 36 class VideoFrame;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Indicates that parameters suitable for screencasts should be automatically 121 // Indicates that parameters suitable for screencasts should be automatically
121 // applied to RtpSenders. 122 // applied to RtpSenders.
122 // TODO(perkj): Remove these once all known applications have moved to 123 // TODO(perkj): Remove these once all known applications have moved to
123 // explicitly setting suitable parameters for screencasts and dont' need this 124 // explicitly setting suitable parameters for screencasts and dont' need this
124 // implicit behavior. 125 // implicit behavior.
125 virtual bool is_screencast() const = 0; 126 virtual bool is_screencast() const = 0;
126 127
127 // Indicates that the encoder should denoise the video before encoding it. 128 // Indicates that the encoder should denoise the video before encoding it.
128 // TODO(perkj): Remove this once denoising is done by the source, and not by 129 // TODO(perkj): Remove this once denoising is done by the source, and not by
129 // the encoder. 130 // the encoder.
130 virtual bool needs_denoising() const = 0; 131 virtual rtc::Optional<bool> needs_denoising() const = 0;
pbos-webrtc 2016/03/31 14:30:08 Can we put a comment here on what unset means?
perkj_webrtc 2016/03/31 15:23:08 Done.
131 132
132 protected: 133 protected:
133 virtual ~VideoTrackSourceInterface() {} 134 virtual ~VideoTrackSourceInterface() {}
134 }; 135 };
135 136
136 class VideoTrackInterface 137 class VideoTrackInterface
137 : public MediaStreamTrackInterface, 138 : public MediaStreamTrackInterface,
138 public rtc::VideoSourceInterface<cricket::VideoFrame> { 139 public rtc::VideoSourceInterface<cricket::VideoFrame> {
139 public: 140 public:
140 // Register a video sink for this track. 141 // Register a video sink for this track.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; 266 virtual bool RemoveTrack(AudioTrackInterface* track) = 0;
266 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; 267 virtual bool RemoveTrack(VideoTrackInterface* track) = 0;
267 268
268 protected: 269 protected:
269 virtual ~MediaStreamInterface() {} 270 virtual ~MediaStreamInterface() {}
270 }; 271 };
271 272
272 } // namespace webrtc 273 } // namespace webrtc
273 274
274 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ 275 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/rtpsender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698