| OLD | NEW |
| 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 Loading... |
| 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 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0; | 113 virtual void StartSourceImpl(const media::VideoCaptureParams& params) = 0; |
| 114 void OnStartDone(bool success); | 114 void OnStartDone(bool success); |
| 115 | 115 |
| 116 // An implementation must immediately stop capture video frames and must not | 116 // An implementation must immediately stop capture video frames and must not |
| 117 // call OnSupportedFormats after this method has been called. After this | 117 // call OnSupportedFormats after this method has been called. After this |
| 118 // method has been called, MediaStreamVideoSource may be deleted. | 118 // method has been called, MediaStreamVideoSource may be deleted. |
| 119 virtual void StopSourceImpl() = 0; | 119 virtual void StopSourceImpl() = 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 MediaStreamDependencyFactory* factory_; | 171 MediaStreamDependencyFactory* factory_; |
| 172 scoped_refptr<webrtc::VideoSourceInterface> adapter_; | 172 scoped_refptr<webrtc::VideoSourceInterface> adapter_; |
| 173 WebRtcVideoCapturerAdapter* capture_adapter_; | 173 WebRtcVideoCapturerAdapter* capture_adapter_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); | 175 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace content | 178 } // namespace content |
| 179 | 179 |
| 180 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 180 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
| OLD | NEW |