| 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/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 VideoCaptureImplManager* vc_manager, | 32 VideoCaptureImplManager* vc_manager, |
| 33 const media::VideoCaptureCapability& capability); | 33 const media::VideoCaptureCapability& capability); |
| 34 | 34 |
| 35 // media::VideoDecoder implementation. | 35 // media::VideoDecoder implementation. |
| 36 virtual void Initialize(const scoped_refptr<media::DemuxerStream>& stream, | 36 virtual void Initialize(const scoped_refptr<media::DemuxerStream>& stream, |
| 37 const media::PipelineStatusCB& status_cb, | 37 const media::PipelineStatusCB& status_cb, |
| 38 const media::StatisticsCB& statistics_cb) OVERRIDE; | 38 const media::StatisticsCB& statistics_cb) OVERRIDE; |
| 39 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 39 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
| 40 virtual void Reset(const base::Closure& closure) OVERRIDE; | 40 virtual void Reset(const base::Closure& closure) OVERRIDE; |
| 41 virtual void Stop(const base::Closure& closure) OVERRIDE; | 41 virtual void Stop(const base::Closure& closure) OVERRIDE; |
| 42 virtual void PrepareForShutdownHack() OVERRIDE; | |
| 43 | 42 |
| 44 // VideoCapture::EventHandler implementation. | 43 // VideoCapture::EventHandler implementation. |
| 45 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; | 44 virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; |
| 46 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; | 45 virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; |
| 47 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; | 46 virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; |
| 48 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; | 47 virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; |
| 49 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; | 48 virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; |
| 50 virtual void OnBufferReady( | 49 virtual void OnBufferReady( |
| 51 media::VideoCapture* capture, | 50 media::VideoCapture* capture, |
| 52 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) OVERRIDE; | 51 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 86 |
| 88 // Delivers the frame to |read_cb_| and resets the callback. | 87 // Delivers the frame to |read_cb_| and resets the callback. |
| 89 void DeliverFrame(const scoped_refptr<media::VideoFrame>& video_frame); | 88 void DeliverFrame(const scoped_refptr<media::VideoFrame>& video_frame); |
| 90 | 89 |
| 91 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 90 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 92 scoped_refptr<VideoCaptureImplManager> vc_manager_; | 91 scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 93 media::VideoCaptureCapability capability_; | 92 media::VideoCaptureCapability capability_; |
| 94 gfx::Size natural_size_; | 93 gfx::Size natural_size_; |
| 95 DecoderState state_; | 94 DecoderState state_; |
| 96 bool got_first_frame_; | 95 bool got_first_frame_; |
| 97 bool shutting_down_; | |
| 98 ReadCB read_cb_; | 96 ReadCB read_cb_; |
| 99 base::Closure pending_stop_cb_; | 97 base::Closure pending_stop_cb_; |
| 100 media::StatisticsCB statistics_cb_; | 98 media::StatisticsCB statistics_cb_; |
| 101 | 99 |
| 102 media::VideoCaptureSessionId video_stream_id_; | 100 media::VideoCaptureSessionId video_stream_id_; |
| 103 media::VideoCapture* capture_engine_; | 101 media::VideoCapture* capture_engine_; |
| 104 base::Time last_frame_timestamp_; | 102 base::Time last_frame_timestamp_; |
| 105 base::Time start_time_; | 103 base::Time start_time_; |
| 106 | 104 |
| 107 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 105 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
| 108 }; | 106 }; |
| 109 | 107 |
| 110 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 108 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
| OLD | NEW |