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/rtc_video_decoder.h" | 5 #include "content/renderer/media/rtc_video_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/task.h" | |
11 #include "media/base/demuxer.h" | 10 #include "media/base/demuxer.h" |
12 #include "media/base/filter_host.h" | 11 #include "media/base/filter_host.h" |
13 #include "media/base/filters.h" | 12 #include "media/base/filters.h" |
14 #include "media/base/limits.h" | 13 #include "media/base/limits.h" |
15 #include "media/base/video_frame.h" | 14 #include "media/base/video_frame.h" |
16 #include "media/base/video_util.h" | 15 #include "media/base/video_util.h" |
17 #include "third_party/libjingle/source/talk/session/phone/videoframe.h" | 16 #include "third_party/libjingle/source/talk/session/phone/videoframe.h" |
18 | 17 |
19 using media::CopyUPlane; | 18 using media::CopyUPlane; |
20 using media::CopyVPlane; | 19 using media::CopyVPlane; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 201 |
203 int y_rows = frame->GetHeight(); | 202 int y_rows = frame->GetHeight(); |
204 int uv_rows = frame->GetHeight() / 2; // YV12 format. | 203 int uv_rows = frame->GetHeight() / 2; // YV12 format. |
205 CopyYPlane(frame->GetYPlane(), frame->GetYPitch(), y_rows, video_frame); | 204 CopyYPlane(frame->GetYPlane(), frame->GetYPitch(), y_rows, video_frame); |
206 CopyUPlane(frame->GetUPlane(), frame->GetUPitch(), uv_rows, video_frame); | 205 CopyUPlane(frame->GetUPlane(), frame->GetUPitch(), uv_rows, video_frame); |
207 CopyVPlane(frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame); | 206 CopyVPlane(frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame); |
208 | 207 |
209 read_cb.Run(video_frame); | 208 read_cb.Run(video_frame); |
210 return true; | 209 return true; |
211 } | 210 } |
OLD | NEW |