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" | 10 #include "base/task.h" |
11 #include "media/base/demuxer.h" | 11 #include "media/base/demuxer.h" |
12 #include "media/base/filter_host.h" | 12 #include "media/base/filter_host.h" |
13 #include "media/base/filters.h" | 13 #include "media/base/filters.h" |
14 #include "media/base/limits.h" | 14 #include "media/base/limits.h" |
15 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
16 #include "media/base/video_util.h" | 16 #include "media/base/video_util.h" |
17 #include "third_party/libjingle/source/talk/session/phone/videoframe.h" | 17 #include "third_party/libjingle/source/talk/session/phone/videoframe.h" |
18 | 18 |
19 using media::CopyUPlane; | 19 using media::CopyUPlane; |
20 using media::CopyVPlane; | 20 using media::CopyVPlane; |
21 using media::CopyYPlane; | 21 using media::CopyYPlane; |
22 using media::DemuxerStream; | 22 using media::DemuxerStream; |
23 using media::FilterStatusCB; | 23 using media::FilterStatusCB; |
24 using media::kNoTimestamp; | 24 using media::kNoTimestamp; |
25 using media::Limits; | |
26 using media::PIPELINE_OK; | 25 using media::PIPELINE_OK; |
27 using media::StatisticsCallback; | 26 using media::StatisticsCallback; |
28 using media::VideoDecoder; | 27 using media::VideoDecoder; |
29 using media::VideoFrame; | 28 using media::VideoFrame; |
30 | 29 |
31 RTCVideoDecoder::RTCVideoDecoder(MessageLoop* message_loop, | 30 RTCVideoDecoder::RTCVideoDecoder(MessageLoop* message_loop, |
32 const std::string& url) | 31 const std::string& url) |
33 : message_loop_(message_loop), | 32 : message_loop_(message_loop), |
34 visible_size_(176, 144), | 33 visible_size_(176, 144), |
35 url_(url), | 34 url_(url), |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 202 |
204 int y_rows = frame->GetHeight(); | 203 int y_rows = frame->GetHeight(); |
205 int uv_rows = frame->GetHeight() / 2; // YV12 format. | 204 int uv_rows = frame->GetHeight() / 2; // YV12 format. |
206 CopyYPlane(frame->GetYPlane(), frame->GetYPitch(), y_rows, video_frame); | 205 CopyYPlane(frame->GetYPlane(), frame->GetYPitch(), y_rows, video_frame); |
207 CopyUPlane(frame->GetUPlane(), frame->GetUPitch(), uv_rows, video_frame); | 206 CopyUPlane(frame->GetUPlane(), frame->GetUPitch(), uv_rows, video_frame); |
208 CopyVPlane(frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame); | 207 CopyVPlane(frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame); |
209 | 208 |
210 read_cb.Run(video_frame); | 209 read_cb.Run(video_frame); |
211 return true; | 210 return true; |
212 } | 211 } |
OLD | NEW |