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

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

Issue 2579993003: Add support for content hints to VideoTrack. (Closed)
Patch Set: rename test + add comments Created 4 years 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/mediastreamtrackproxy.h » ('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
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual bool GetStats(Stats* stats) = 0; 126 virtual bool GetStats(Stats* stats) = 0;
127 127
128 protected: 128 protected:
129 virtual ~VideoTrackSourceInterface() {} 129 virtual ~VideoTrackSourceInterface() {}
130 }; 130 };
131 131
132 class VideoTrackInterface 132 class VideoTrackInterface
133 : public MediaStreamTrackInterface, 133 : public MediaStreamTrackInterface,
134 public rtc::VideoSourceInterface<VideoFrame> { 134 public rtc::VideoSourceInterface<VideoFrame> {
135 public: 135 public:
136 // Video track content hint, used to override the source is_screencast
137 // property.
138 // See https://crbug.com/653531 and https://github.com/WICG/mst-content-hint.
139 enum class ContentHint { kNone, kFluid, kDetailed };
140
136 // Register a video sink for this track. 141 // Register a video sink for this track.
137 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, 142 void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
138 const rtc::VideoSinkWants& wants) override{}; 143 const rtc::VideoSinkWants& wants) override {}
139 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override{}; 144 void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override {}
140 145
141 virtual VideoTrackSourceInterface* GetSource() const = 0; 146 virtual VideoTrackSourceInterface* GetSource() const = 0;
142 147
148 virtual ContentHint content_hint() const { return ContentHint::kNone; }
149 virtual void set_content_hint(ContentHint hint) {}
150
143 protected: 151 protected:
144 virtual ~VideoTrackInterface() {} 152 virtual ~VideoTrackInterface() {}
145 }; 153 };
146 154
147 // Interface for receiving audio data from a AudioTrack. 155 // Interface for receiving audio data from a AudioTrack.
148 class AudioTrackSinkInterface { 156 class AudioTrackSinkInterface {
149 public: 157 public:
150 virtual void OnData(const void* audio_data, 158 virtual void OnData(const void* audio_data,
151 int bits_per_sample, 159 int bits_per_sample,
152 int sample_rate, 160 int sample_rate,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; 272 virtual bool RemoveTrack(AudioTrackInterface* track) = 0;
265 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; 273 virtual bool RemoveTrack(VideoTrackInterface* track) = 0;
266 274
267 protected: 275 protected:
268 virtual ~MediaStreamInterface() {} 276 virtual ~MediaStreamInterface() {}
269 }; 277 };
270 278
271 } // namespace webrtc 279 } // namespace webrtc
272 280
273 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ 281 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/mediastreamtrackproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698