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