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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 | 75 |
76 protected: | 76 protected: |
77 virtual void DoStopSource() OVERRIDE; | 77 virtual void DoStopSource() OVERRIDE; |
78 | 78 |
79 // Sets ready state and notifies the ready state to all registered tracks. | 79 // Sets ready state and notifies the ready state to all registered tracks. |
80 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); | 80 virtual void SetReadyState(blink::WebMediaStreamSource::ReadyState state); |
81 | 81 |
82 // Delivers |frame| to registered tracks according to their constraints. | 82 // Delivers |frame| to registered tracks according to their constraints. |
83 // Note: current implementation assumes |frame| be contiguous layout of image | 83 // Note: current implementation assumes |frame| be contiguous layout of image |
84 // planes and I420. | 84 // planes and I420. |
85 virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame); | 85 virtual void DeliverVideoFrame(const scoped_refptr<media::VideoFrame>& frame, |
86 const media::VideoCaptureFormat& format, | |
87 const base::TimeTicks& timestamp); | |
Ami GONE FROM CHROMIUM
2014/04/24 21:04:31
media::VideoFrame has a timestamp field. Why is t
Alpha Left Google
2014/04/24 22:50:34
Done.
Alpha Left Google
2014/04/24 22:50:34
It is there to allow synchronization with other so
| |
86 | 88 |
87 // An implementation must fetch the formats that can currently be used by | 89 // An implementation must fetch the formats that can currently be used by |
88 // the source and call OnSupportedFormats when done. | 90 // the source and call OnSupportedFormats when done. |
89 // |max_requested_height| and |max_requested_width| is the max height and | 91 // |max_requested_height| and |max_requested_width| is the max height and |
90 // width set as a mandatory constraint if set when calling | 92 // width set as a mandatory constraint if set when calling |
91 // MediaStreamVideoSource::AddTrack. If max height and max width is not set | 93 // MediaStreamVideoSource::AddTrack. If max height and max width is not set |
92 // |max_requested_height| and |max_requested_width| are 0. | 94 // |max_requested_height| and |max_requested_width| are 0. |
93 virtual void GetCurrentSupportedFormats(int max_requested_width, | 95 virtual void GetCurrentSupportedFormats(int max_requested_width, |
94 int max_requested_height) = 0; | 96 int max_requested_height) = 0; |
95 void OnSupportedFormats(const media::VideoCaptureFormats& formats); | 97 void OnSupportedFormats(const media::VideoCaptureFormats& formats); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 | 165 |
164 // Tracks that currently are receiving video frames. | 166 // Tracks that currently are receiving video frames. |
165 std::vector<MediaStreamVideoTrack*> tracks_; | 167 std::vector<MediaStreamVideoTrack*> tracks_; |
166 | 168 |
167 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); | 169 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoSource); |
168 }; | 170 }; |
169 | 171 |
170 } // namespace content | 172 } // namespace content |
171 | 173 |
172 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ | 174 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_SOURCE_H_ |
OLD | NEW |