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 "base/time.h" | 8 #include "base/time.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
11 #include "media/base/filters.h" | 11 #include "media/base/filters.h" |
12 #include "media/base/pipeline_status.h" | |
13 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
14 #include "media/video/capture/video_capture.h" | 13 #include "media/video/capture/video_capture.h" |
15 | 14 |
16 namespace base { | 15 namespace base { |
17 class MessageLoopProxy; | 16 class MessageLoopProxy; |
18 } | 17 } |
19 class VideoCaptureImplManager; | 18 class VideoCaptureImplManager; |
20 | 19 |
21 // A filter takes raw frames from video capture engine and passes them to media | 20 // A filter takes raw frames from video capture engine and passes them to media |
22 // engine as a video decoder filter. | 21 // engine as a video decoder filter. |
(...skipping 12 matching lines...) Expand all Loading... |
35 virtual void Play(const base::Closure& callback) OVERRIDE; | 34 virtual void Play(const base::Closure& callback) OVERRIDE; |
36 virtual void Seek(base::TimeDelta time, | 35 virtual void Seek(base::TimeDelta time, |
37 const media::FilterStatusCB& cb) OVERRIDE; | 36 const media::FilterStatusCB& cb) OVERRIDE; |
38 virtual void Pause(const base::Closure& callback) OVERRIDE; | 37 virtual void Pause(const base::Closure& callback) OVERRIDE; |
39 virtual void Flush(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 media::PipelineStatusCB& 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 |
50 // VideoCapture::EventHandler implementation. | 49 // VideoCapture::EventHandler implementation. |
51 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; | 50 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; |
52 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; | 51 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; |
53 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; | 52 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; |
54 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; | 53 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; |
55 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; | 54 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; |
(...skipping 16 matching lines...) Expand all Loading... |
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); |
77 void FlushOnDecoderThread(const base::Closure& callback); | 76 void FlushOnDecoderThread(const base::Closure& callback); |
78 void StopOnDecoderThread(const base::Closure& callback); | 77 void StopOnDecoderThread(const base::Closure& callback); |
79 | 78 |
80 void InitializeOnDecoderThread( | 79 void InitializeOnDecoderThread( |
81 media::DemuxerStream* demuxer_stream, | 80 media::DemuxerStream* demuxer_stream, |
82 const media::PipelineStatusCB& filter_callback, | 81 const base::Closure& filter_callback, |
83 const media::StatisticsCallback& stat_callback); | 82 const media::StatisticsCallback& stat_callback); |
84 void ReadOnDecoderThread(const ReadCB& callback); | 83 void ReadOnDecoderThread(const ReadCB& callback); |
85 | 84 |
86 void OnStoppedOnDecoderThread(media::VideoCapture* capture); | 85 void OnStoppedOnDecoderThread(media::VideoCapture* capture); |
87 void OnBufferReadyOnDecoderThread( | 86 void OnBufferReadyOnDecoderThread( |
88 media::VideoCapture* capture, | 87 media::VideoCapture* capture, |
89 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); | 88 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); |
90 void OnDeviceInfoReceivedOnDecoderThread( | 89 void OnDeviceInfoReceivedOnDecoderThread( |
91 media::VideoCapture* capture, | 90 media::VideoCapture* capture, |
92 const media::VideoCaptureParams& device_info); | 91 const media::VideoCaptureParams& device_info); |
(...skipping 11 matching lines...) Expand all Loading... |
104 media::StatisticsCallback statistics_callback_; | 103 media::StatisticsCallback statistics_callback_; |
105 | 104 |
106 media::VideoCaptureSessionId video_stream_id_; | 105 media::VideoCaptureSessionId video_stream_id_; |
107 media::VideoCapture* capture_engine_; | 106 media::VideoCapture* capture_engine_; |
108 base::Time start_time_; | 107 base::Time start_time_; |
109 | 108 |
110 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 109 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
111 }; | 110 }; |
112 | 111 |
113 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 112 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
OLD | NEW |