| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 void InitializeOnDecoderThread( | 70 void InitializeOnDecoderThread( |
| 71 const scoped_refptr<media::DemuxerStream>& stream, | 71 const scoped_refptr<media::DemuxerStream>& stream, |
| 72 const media::PipelineStatusCB& status_cb, | 72 const media::PipelineStatusCB& status_cb, |
| 73 const media::StatisticsCB& statistics_cb); | 73 const media::StatisticsCB& statistics_cb); |
| 74 void ReadOnDecoderThread(const ReadCB& read_cb); | 74 void ReadOnDecoderThread(const ReadCB& read_cb); |
| 75 void ResetOnDecoderThread(const base::Closure& closure); | 75 void ResetOnDecoderThread(const base::Closure& closure); |
| 76 void StopOnDecoderThread(const base::Closure& closure); | 76 void StopOnDecoderThread(const base::Closure& closure); |
| 77 | 77 |
| 78 void OnStoppedOnDecoderThread(media::VideoCapture* capture); | 78 void OnStoppedOnDecoderThread(media::VideoCapture* capture); |
| 79 void OnPausedOnDecoderThread(media::VideoCapture* capture); |
| 79 void OnBufferReadyOnDecoderThread( | 80 void OnBufferReadyOnDecoderThread( |
| 80 media::VideoCapture* capture, | 81 media::VideoCapture* capture, |
| 81 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); | 82 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); |
| 82 void OnDeviceInfoReceivedOnDecoderThread( | 83 void OnDeviceInfoReceivedOnDecoderThread( |
| 83 media::VideoCapture* capture, | 84 media::VideoCapture* capture, |
| 84 const media::VideoCaptureParams& device_info); | 85 const media::VideoCaptureParams& device_info); |
| 85 | 86 |
| 86 // Delivers the frame to |read_cb_| and resets the callback. | 87 // Delivers the frame to |read_cb_| and resets the callback. |
| 87 void DeliverFrame(const scoped_refptr<media::VideoFrame>& video_frame); | 88 void DeliverFrame(const scoped_refptr<media::VideoFrame>& video_frame); |
| 88 | 89 |
| 89 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 90 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 90 scoped_refptr<VideoCaptureImplManager> vc_manager_; | 91 scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 91 media::VideoCaptureCapability capability_; | 92 media::VideoCaptureCapability capability_; |
| 92 gfx::Size natural_size_; | 93 gfx::Size natural_size_; |
| 93 DecoderState state_; | 94 DecoderState state_; |
| 94 bool got_first_frame_; | 95 bool got_first_frame_; |
| 95 ReadCB read_cb_; | 96 ReadCB read_cb_; |
| 96 base::Closure pending_stop_cb_; | 97 base::Closure pending_stop_cb_; |
| 97 media::StatisticsCB statistics_cb_; | 98 media::StatisticsCB statistics_cb_; |
| 98 | 99 |
| 99 media::VideoCaptureSessionId video_stream_id_; | 100 media::VideoCaptureSessionId video_stream_id_; |
| 100 media::VideoCapture* capture_engine_; | 101 media::VideoCapture* capture_engine_; |
| 101 base::Time last_frame_timestamp_; | 102 base::Time last_frame_timestamp_; |
| 102 base::Time start_time_; | 103 base::Time start_time_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); | 105 DISALLOW_COPY_AND_ASSIGN(CaptureVideoDecoder); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ | 108 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_VIDEO_DECODER_H_ |
| OLD | NEW |