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

Side by Side Diff: content/renderer/media/media_stream_video_source.h

Issue 195363002: VideoCapturerDelegate: Retrieve supported/in-use format(s) for constraint negotiation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perkj@s comments Created 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // An implementation must fetch the formats that can currently be used by 94 // An implementation must fetch the formats that can currently be used by
95 // the source and call OnSupportedFormats when done. 95 // the source and call OnSupportedFormats when done.
96 // |max_requested_height| and |max_requested_width| is the max height and 96 // |max_requested_height| and |max_requested_width| is the max height and
97 // width set as a mandatory constraint if set when calling 97 // width set as a mandatory constraint if set when calling
98 // MediaStreamVideoSource::AddTrack. If max height and max width is not set 98 // MediaStreamVideoSource::AddTrack. If max height and max width is not set
99 // |max_requested_height| and |max_requested_width| are 0. 99 // |max_requested_height| and |max_requested_width| are 0.
100 virtual void GetCurrentSupportedFormats(int max_requested_width, 100 virtual void GetCurrentSupportedFormats(int max_requested_width,
101 int max_requested_height) = 0; 101 int max_requested_height) = 0;
102 void OnSupportedFormats(const media::VideoCaptureFormats& formats); 102 void OnSupportedFormats(const media::VideoCaptureFormats& formats);
103 103
104 // An implementation must starts capture frames using the resolution in 104 // An implementation must start capture frames using the resolution in
105 // |params|. When the source has started or the source failed to start 105 // |params|. When the source has started or the source failed to start
106 // OnStartDone must be called. An implementation must call 106 // OnStartDone must be called. An implementation must call
107 // DeliverVideoFrame with the captured frames. 107 // DeliverVideoFrame with the captured frames.
108 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0; 108 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0;
109 void OnStartDone(bool success); 109 void OnStartDone(bool success);
110 110
111 // An implementation must immediately stop capture video frames and must not 111 // An implementation must immediately stop capture video frames and must not
112 // call OnSupportedFormats after this method has been called. After this 112 // call OnSupportedFormats after this method has been called. After this
113 // method has been called, MediaStreamVideoSource may be deleted. 113 // method has been called, MediaStreamVideoSource may be deleted.
114 virtual void StopSourceImpl() = 0; 114 virtual void StopSourceImpl() = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 MediaStreamDependencyFactory* factory_; 163 MediaStreamDependencyFactory* factory_;
164 scoped_refptr<webrtc::VideoSourceInterface> adapter_; 164 scoped_refptr<webrtc::VideoSourceInterface> adapter_;
165 WebRtcVideoCapturerAdapter* capture_adapter_; 165 WebRtcVideoCapturerAdapter* capture_adapter_;
166 166
167 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 167 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
168 }; 168 };
169 169
170 } // namespace content 170 } // namespace content
171 171
172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698