OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CAPTURE_VIDEO_DECODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <deque> | |
9 | |
10 #include "base/time.h" | 8 #include "base/time.h" |
11 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
12 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
13 #include "media/base/filters.h" | 11 #include "media/base/filters.h" |
14 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
15 #include "media/video/capture/video_capture.h" | 13 #include "media/video/capture/video_capture.h" |
16 | 14 |
17 namespace base { | 15 namespace base { |
18 class MessageLoopProxy; | 16 class MessageLoopProxy; |
19 } | 17 } |
(...skipping 10 matching lines...) Expand all Loading... |
30 media::VideoCaptureSessionId video_stream_id, | 28 media::VideoCaptureSessionId video_stream_id, |
31 VideoCaptureImplManager* vc_manager, | 29 VideoCaptureImplManager* vc_manager, |
32 const media::VideoCapture::VideoCaptureCapability& capability); | 30 const media::VideoCapture::VideoCaptureCapability& capability); |
33 virtual ~CaptureVideoDecoder(); | 31 virtual ~CaptureVideoDecoder(); |
34 | 32 |
35 // Filter implementation. | 33 // Filter implementation. |
36 virtual void Play(const base::Closure& callback) OVERRIDE; | 34 virtual void Play(const base::Closure& callback) OVERRIDE; |
37 virtual void Seek(base::TimeDelta time, | 35 virtual void Seek(base::TimeDelta time, |
38 const media::FilterStatusCB& cb) OVERRIDE; | 36 const media::FilterStatusCB& cb) OVERRIDE; |
39 virtual void Pause(const base::Closure& callback) OVERRIDE; | 37 virtual void Pause(const base::Closure& callback) OVERRIDE; |
| 38 virtual void Flush(const base::Closure& callback) OVERRIDE; |
40 virtual void Stop(const base::Closure& callback) OVERRIDE; | 39 virtual void Stop(const base::Closure& callback) OVERRIDE; |
41 | 40 |
42 // Decoder implementation. | 41 // Decoder implementation. |
43 virtual void Initialize( | 42 virtual void Initialize( |
44 media::DemuxerStream* demuxer_stream, | 43 media::DemuxerStream* demuxer_stream, |
45 const base::Closure& filter_callback, | 44 const base::Closure& filter_callback, |
46 const media::StatisticsCallback& stat_callback) OVERRIDE; | 45 const media::StatisticsCallback& stat_callback) OVERRIDE; |
47 virtual void Read(const ReadCB& callback) OVERRIDE; | 46 virtual void Read(const ReadCB& callback) OVERRIDE; |
48 virtual const gfx::Size& natural_size() OVERRIDE; | 47 virtual const gfx::Size& natural_size() OVERRIDE; |
49 | 48 |
(...skipping 17 matching lines...) Expand all Loading... |
67 kUnInitialized, | 66 kUnInitialized, |
68 kNormal, | 67 kNormal, |
69 kStopped, | 68 kStopped, |
70 kPaused | 69 kPaused |
71 }; | 70 }; |
72 | 71 |
73 void PlayOnDecoderThread(const base::Closure& callback); | 72 void PlayOnDecoderThread(const base::Closure& callback); |
74 void SeekOnDecoderThread(base::TimeDelta time, | 73 void SeekOnDecoderThread(base::TimeDelta time, |
75 const media::FilterStatusCB& cb); | 74 const media::FilterStatusCB& cb); |
76 void PauseOnDecoderThread(const base::Closure& callback); | 75 void PauseOnDecoderThread(const base::Closure& callback); |
| 76 void FlushOnDecoderThread(const base::Closure& callback); |
77 void StopOnDecoderThread(const base::Closure& callback); | 77 void StopOnDecoderThread(const base::Closure& callback); |
78 | 78 |
79 void InitializeOnDecoderThread( | 79 void InitializeOnDecoderThread( |
80 media::DemuxerStream* demuxer_stream, | 80 media::DemuxerStream* demuxer_stream, |
81 const base::Closure& filter_callback, | 81 const base::Closure& filter_callback, |
82 const media::StatisticsCallback& stat_callback); | 82 const media::StatisticsCallback& stat_callback); |
83 void ReadOnDecoderThread(const ReadCB& callback); | 83 void ReadOnDecoderThread(const ReadCB& callback); |
84 | 84 |
85 void OnStoppedOnDecoderThread(media::VideoCapture* capture); | 85 void OnStoppedOnDecoderThread(media::VideoCapture* capture); |
86 void OnBufferReadyOnDecoderThread( | 86 void OnBufferReadyOnDecoderThread( |
(...skipping 16 matching lines...) Expand all Loading... |
103 media::StatisticsCallback statistics_callback_; | 103 media::StatisticsCallback statistics_callback_; |
104 | 104 |
105 media::VideoCaptureSessionId video_stream_id_; | 105 media::VideoCaptureSessionId video_stream_id_; |
106 media::VideoCapture* capture_engine_; | 106 media::VideoCapture* capture_engine_; |
107 base::Time start_time_; | 107 base::Time start_time_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 109 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 112 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
OLD | NEW |