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_VIDEO_TRACK_ADAPTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 int max_width, int max_height, | 43 int max_width, int max_height, |
44 double min_aspect_ratio, | 44 double min_aspect_ratio, |
45 double max_aspect_ratio, | 45 double max_aspect_ratio, |
46 double max_frame_rate); | 46 double max_frame_rate); |
47 void RemoveTrack(const MediaStreamVideoTrack* track); | 47 void RemoveTrack(const MediaStreamVideoTrack* track); |
48 | 48 |
49 // Delivers |frame| to all tracks that have registered a callback. | 49 // Delivers |frame| to all tracks that have registered a callback. |
50 // Must be called on the IO-thread. | 50 // Must be called on the IO-thread. |
51 void DeliverFrameOnIO( | 51 void DeliverFrameOnIO( |
52 const scoped_refptr<media::VideoFrame>& frame, | 52 const scoped_refptr<media::VideoFrame>& frame, |
53 const media::VideoCaptureFormat& format, | |
54 const base::TimeTicks& estimated_capture_time); | 53 const base::TimeTicks& estimated_capture_time); |
55 | 54 |
56 const scoped_refptr<base::MessageLoopProxy>& io_message_loop() { | 55 const scoped_refptr<base::MessageLoopProxy>& io_message_loop() { |
57 DCHECK(thread_checker_.CalledOnValidThread()); | 56 DCHECK(thread_checker_.CalledOnValidThread()); |
58 return io_message_loop_; | 57 return io_message_loop_; |
59 } | 58 } |
60 | 59 |
61 // Start monitor that frames are delivered to this object. I.E, that | 60 // Start monitor that frames are delivered to this object. I.E, that |
62 // |DeliverFrameOnIO| is called with a frame rate of |source_frame_rate|. | 61 // |DeliverFrameOnIO| is called with a frame rate of |source_frame_rate|. |
63 // |on_muted_callback| is triggered on the main render thread. | 62 // |on_muted_callback| is triggered on the main render thread. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 117 |
119 // Frame rate configured on the video source, accessed on the IO-thread. | 118 // Frame rate configured on the video source, accessed on the IO-thread. |
120 float source_frame_rate_; | 119 float source_frame_rate_; |
121 | 120 |
122 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); | 121 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); |
123 }; | 122 }; |
124 | 123 |
125 } // namespace content | 124 } // namespace content |
126 | 125 |
127 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ | 126 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ |
OLD | NEW |