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 #include "content/renderer/media/capture_video_decoder.h" | 5 #include "content/renderer/media/capture_video_decoder.h" |
6 | 6 |
7 #include "content/renderer/media/video_capture_impl_manager.h" | 7 #include "content/renderer/media/video_capture_impl_manager.h" |
8 #include "media/base/filter_host.h" | 8 #include "media/base/filter_host.h" |
9 #include "media/base/limits.h" | 9 #include "media/base/limits.h" |
10 #include "media/base/video_util.h" | 10 #include "media/base/video_util.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 void CaptureVideoDecoder::OnPaused(media::VideoCapture* capture) { | 103 void CaptureVideoDecoder::OnPaused(media::VideoCapture* capture) { |
104 NOTIMPLEMENTED(); | 104 NOTIMPLEMENTED(); |
105 } | 105 } |
106 | 106 |
107 void CaptureVideoDecoder::OnError(media::VideoCapture* capture, | 107 void CaptureVideoDecoder::OnError(media::VideoCapture* capture, |
108 int error_code) { | 108 int error_code) { |
109 NOTIMPLEMENTED(); | 109 NOTIMPLEMENTED(); |
110 } | 110 } |
111 | 111 |
| 112 void CaptureVideoDecoder::OnRemoved(media::VideoCapture* capture) { |
| 113 NOTIMPLEMENTED(); |
| 114 } |
| 115 |
112 void CaptureVideoDecoder::OnBufferReady( | 116 void CaptureVideoDecoder::OnBufferReady( |
113 media::VideoCapture* capture, | 117 media::VideoCapture* capture, |
114 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) { | 118 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf) { |
115 DCHECK(buf); | 119 DCHECK(buf); |
116 message_loop_proxy_->PostTask( | 120 message_loop_proxy_->PostTask( |
117 FROM_HERE, | 121 FROM_HERE, |
118 NewRunnableMethod(this, | 122 NewRunnableMethod(this, |
119 &CaptureVideoDecoder::OnBufferReadyOnDecoderThread, | 123 &CaptureVideoDecoder::OnBufferReadyOnDecoderThread, |
120 capture, | 124 capture, |
121 buf)); | 125 buf)); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 int uv_height = capability_.height / 2; // YV12 format. | 252 int uv_height = capability_.height / 2; // YV12 format. |
249 CopyYPlane(buffer, y_width, y_height, video_frame); | 253 CopyYPlane(buffer, y_width, y_height, video_frame); |
250 buffer += y_width * y_height; | 254 buffer += y_width * y_height; |
251 CopyUPlane(buffer, uv_width, uv_height, video_frame); | 255 CopyUPlane(buffer, uv_width, uv_height, video_frame); |
252 buffer += uv_width * uv_height; | 256 buffer += uv_width * uv_height; |
253 CopyVPlane(buffer, uv_width, uv_height, video_frame); | 257 CopyVPlane(buffer, uv_width, uv_height, video_frame); |
254 | 258 |
255 VideoFrameReady(video_frame); | 259 VideoFrameReady(video_frame); |
256 capture->FeedBuffer(buf); | 260 capture->FeedBuffer(buf); |
257 } | 261 } |
OLD | NEW |