| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // engine as a video decoder filter. | 23 // engine as a video decoder filter. |
| 24 class CONTENT_EXPORT CaptureVideoDecoder | 24 class CONTENT_EXPORT CaptureVideoDecoder |
| 25 : public media::VideoDecoder, | 25 : public media::VideoDecoder, |
| 26 public media::VideoCapture::EventHandler { | 26 public media::VideoCapture::EventHandler { |
| 27 public: | 27 public: |
| 28 CaptureVideoDecoder( | 28 CaptureVideoDecoder( |
| 29 base::MessageLoopProxy* message_loop_proxy, | 29 base::MessageLoopProxy* message_loop_proxy, |
| 30 media::VideoCaptureSessionId video_stream_id, | 30 media::VideoCaptureSessionId video_stream_id, |
| 31 VideoCaptureImplManager* vc_manager, | 31 VideoCaptureImplManager* vc_manager, |
| 32 const media::VideoCaptureCapability& capability); | 32 const media::VideoCaptureCapability& capability); |
| 33 virtual ~CaptureVideoDecoder(); | |
| 34 | 33 |
| 35 // Filter implementation. | 34 // Filter implementation. |
| 36 virtual void Play(const base::Closure& callback) OVERRIDE; | 35 virtual void Play(const base::Closure& callback) OVERRIDE; |
| 37 virtual void Seek(base::TimeDelta time, | 36 virtual void Seek(base::TimeDelta time, |
| 38 const media::PipelineStatusCB& cb) OVERRIDE; | 37 const media::PipelineStatusCB& cb) OVERRIDE; |
| 39 virtual void Pause(const base::Closure& callback) OVERRIDE; | 38 virtual void Pause(const base::Closure& callback) OVERRIDE; |
| 40 virtual void Flush(const base::Closure& callback) OVERRIDE; | 39 virtual void Flush(const base::Closure& callback) OVERRIDE; |
| 41 virtual void Stop(const base::Closure& callback) OVERRIDE; | 40 virtual void Stop(const base::Closure& callback) OVERRIDE; |
| 42 | 41 |
| 43 // Decoder implementation. | 42 // Decoder implementation. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 54 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; | 53 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; |
| 55 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; | 54 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; |
| 56 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; | 55 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; |
| 57 virtual void OnBufferReady( | 56 virtual void OnBufferReady( |
| 58 media::VideoCapture* capture, | 57 media::VideoCapture* capture, |
| 59 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) OVERRIDE; | 58 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) OVERRIDE; |
| 60 virtual void OnDeviceInfoReceived( | 59 virtual void OnDeviceInfoReceived( |
| 61 media::VideoCapture* capture, | 60 media::VideoCapture* capture, |
| 62 const media::VideoCaptureParams& device_info) OVERRIDE; | 61 const media::VideoCaptureParams& device_info) OVERRIDE; |
| 63 | 62 |
| 63 protected: |
| 64 virtual ~CaptureVideoDecoder(); |
| 65 |
| 64 private: | 66 private: |
| 65 friend class CaptureVideoDecoderTest; | 67 friend class CaptureVideoDecoderTest; |
| 66 | 68 |
| 67 enum DecoderState { | 69 enum DecoderState { |
| 68 kUnInitialized, | 70 kUnInitialized, |
| 69 kNormal, | 71 kNormal, |
| 70 kStopped, | 72 kStopped, |
| 71 kPaused | 73 kPaused |
| 72 }; | 74 }; |
| 73 | 75 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 109 |
| 108 media::VideoCaptureSessionId video_stream_id_; | 110 media::VideoCaptureSessionId video_stream_id_; |
| 109 media::VideoCapture* capture_engine_; | 111 media::VideoCapture* capture_engine_; |
| 110 base::Time last_frame_timestamp_; | 112 base::Time last_frame_timestamp_; |
| 111 base::Time start_time_; | 113 base::Time start_time_; |
| 112 | 114 |
| 113 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 115 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 118 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
| OLD | NEW |