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

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: Corrected min fps from 30 to 10 in a test. Created 6 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 | « content/renderer/media/media_stream_video_capturer_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // An implementation must fetch the formats that can currently be used by 99 // An implementation must fetch the formats that can currently be used by
100 // the source and call OnSupportedFormats when done. 100 // the source and call OnSupportedFormats when done.
101 // |max_requested_height| and |max_requested_width| is the max height and 101 // |max_requested_height| and |max_requested_width| is the max height and
102 // width set as a mandatory constraint if set when calling 102 // width set as a mandatory constraint if set when calling
103 // MediaStreamVideoSource::AddTrack. If max height and max width is not set 103 // MediaStreamVideoSource::AddTrack. If max height and max width is not set
104 // |max_requested_height| and |max_requested_width| are 0. 104 // |max_requested_height| and |max_requested_width| are 0.
105 virtual void GetCurrentSupportedFormats(int max_requested_width, 105 virtual void GetCurrentSupportedFormats(int max_requested_width,
106 int max_requested_height) = 0; 106 int max_requested_height) = 0;
107 void OnSupportedFormats(const media::VideoCaptureFormats& formats); 107 void OnSupportedFormats(const media::VideoCaptureFormats& formats);
108 108
109 // An implementation must starts capture frames using the resolution in 109 // An implementation must start capture frames using the resolution in
110 // |params|. When the source has started or the source failed to start 110 // |params|. When the source has started or the source failed to start
111 // OnStartDone must be called. An implementation must call 111 // OnStartDone must be called. An implementation must call
112 // DeliverVideoFrame with the captured frames. 112 // DeliverVideoFrame with the captured frames.
113 // TODO(perkj): pass a VideoCaptureFormats instead of VideoCaptureParams for 113 // TODO(perkj): pass a VideoCaptureFormats instead of VideoCaptureParams for
114 // subclasses to customize. 114 // subclasses to customize.
115 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0; 115 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0;
116 void OnStartDone(bool success); 116 void OnStartDone(bool success);
117 117
118 // An implementation must immediately stop capture video frames and must not 118 // An implementation must immediately stop capture video frames and must not
119 // call OnSupportedFormats after this method has been called. After this 119 // call OnSupportedFormats after this method has been called. After this
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 MediaStreamDependencyFactory* factory_; 173 MediaStreamDependencyFactory* factory_;
174 scoped_refptr<webrtc::VideoSourceInterface> adapter_; 174 scoped_refptr<webrtc::VideoSourceInterface> adapter_;
175 WebRtcVideoCapturerAdapter* capture_adapter_; 175 WebRtcVideoCapturerAdapter* capture_adapter_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); 177 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource);
178 }; 178 };
179 179
180 } // namespace content 180 } // namespace content
181 181
182 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ 182 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698