| 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 11 matching lines...) Expand all Loading... |
| 22 // engine as a video decoder filter. | 22 // engine as a video decoder filter. |
| 23 class CONTENT_EXPORT CaptureVideoDecoder | 23 class CONTENT_EXPORT CaptureVideoDecoder |
| 24 : public media::VideoDecoder, | 24 : public media::VideoDecoder, |
| 25 public media::VideoCapture::EventHandler { | 25 public media::VideoCapture::EventHandler { |
| 26 public: | 26 public: |
| 27 CaptureVideoDecoder( | 27 CaptureVideoDecoder( |
| 28 base::MessageLoopProxy* message_loop_proxy, | 28 base::MessageLoopProxy* message_loop_proxy, |
| 29 media::VideoCaptureSessionId video_stream_id, | 29 media::VideoCaptureSessionId video_stream_id, |
| 30 VideoCaptureImplManager* vc_manager, | 30 VideoCaptureImplManager* vc_manager, |
| 31 const media::VideoCapture::VideoCaptureCapability& capability); | 31 const media::VideoCapture::VideoCaptureCapability& capability); |
| 32 virtual ~CaptureVideoDecoder(); | |
| 33 | 32 |
| 34 // Filter implementation. | 33 // Filter implementation. |
| 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::PipelineStatusCB& cb) OVERRIDE; | 36 const media::PipelineStatusCB& 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. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 63 private: | 62 private: |
| 64 friend class CaptureVideoDecoderTest; | 63 friend class CaptureVideoDecoderTest; |
| 65 | 64 |
| 66 enum DecoderState { | 65 enum DecoderState { |
| 67 kUnInitialized, | 66 kUnInitialized, |
| 68 kNormal, | 67 kNormal, |
| 69 kStopped, | 68 kStopped, |
| 70 kPaused | 69 kPaused |
| 71 }; | 70 }; |
| 72 | 71 |
| 72 virtual ~CaptureVideoDecoder(); |
| 73 |
| 73 void PlayOnDecoderThread(const base::Closure& callback); | 74 void PlayOnDecoderThread(const base::Closure& callback); |
| 74 void SeekOnDecoderThread(base::TimeDelta time, | 75 void SeekOnDecoderThread(base::TimeDelta time, |
| 75 const media::PipelineStatusCB& cb); | 76 const media::PipelineStatusCB& cb); |
| 76 void PauseOnDecoderThread(const base::Closure& callback); | 77 void PauseOnDecoderThread(const base::Closure& callback); |
| 77 void FlushOnDecoderThread(const base::Closure& callback); | 78 void FlushOnDecoderThread(const base::Closure& callback); |
| 78 void StopOnDecoderThread(const base::Closure& callback); | 79 void StopOnDecoderThread(const base::Closure& callback); |
| 79 | 80 |
| 80 void InitializeOnDecoderThread( | 81 void InitializeOnDecoderThread( |
| 81 media::DemuxerStream* demuxer_stream, | 82 media::DemuxerStream* demuxer_stream, |
| 82 const media::PipelineStatusCB& status_cb, | 83 const media::PipelineStatusCB& status_cb, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 106 | 107 |
| 107 media::VideoCaptureSessionId video_stream_id_; | 108 media::VideoCaptureSessionId video_stream_id_; |
| 108 media::VideoCapture* capture_engine_; | 109 media::VideoCapture* capture_engine_; |
| 109 base::Time last_frame_timestamp_; | 110 base::Time last_frame_timestamp_; |
| 110 base::Time start_time_; | 111 base::Time start_time_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 113 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 116 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
| OLD | NEW |