| 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 "media/filters/rtc_video_decoder.h" | 5 #include "content/renderer/media/rtc_video_decoder.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 | 8 |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "googleurl/src/gurl.h" | |
| 11 #include "media/base/callback.h" | 10 #include "media/base/callback.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/media_format.h" | 14 #include "media/base/media_format.h" |
| 16 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
| 17 | 16 |
| 18 namespace media { | 17 using media::DemuxerStream; |
| 19 | 18 using media::FilterCallback; |
| 20 static const char kMediaScheme[] = "media"; | 19 using media::FilterStatusCB; |
| 20 using media::kNoTimestamp; |
| 21 using media::Limits; |
| 22 using media::MediaFormat; |
| 23 using media::PIPELINE_OK; |
| 24 using media::StatisticsCallback; |
| 25 using media::VideoDecoder; |
| 26 using media::VideoFrame; |
| 21 | 27 |
| 22 RTCVideoDecoder::RTCVideoDecoder(MessageLoop* message_loop, | 28 RTCVideoDecoder::RTCVideoDecoder(MessageLoop* message_loop, |
| 23 const std::string& url) | 29 const std::string& url) |
| 24 : message_loop_(message_loop), | 30 : message_loop_(message_loop), |
| 25 width_(176), | 31 width_(176), |
| 26 height_(144), | 32 height_(144), |
| 27 url_(url), | 33 url_(url), |
| 28 state_(kUnInitialized) { | 34 state_(kUnInitialized) { |
| 29 } | 35 } |
| 30 | 36 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 FROM_HERE, | 267 FROM_HERE, |
| 262 NewRunnableMethod(this, | 268 NewRunnableMethod(this, |
| 263 &RTCVideoDecoder::VideoFrameReady, | 269 &RTCVideoDecoder::VideoFrameReady, |
| 264 video_frame)); | 270 video_frame)); |
| 265 } else { | 271 } else { |
| 266 VideoFrameReady(video_frame); | 272 VideoFrameReady(video_frame); |
| 267 } | 273 } |
| 268 | 274 |
| 269 return 0; | 275 return 0; |
| 270 } | 276 } |
| 271 | |
| 272 bool RTCVideoDecoder::IsUrlSupported(const std::string& url) { | |
| 273 GURL gurl(url); | |
| 274 return gurl.SchemeIs(kMediaScheme); | |
| 275 } | |
| 276 | |
| 277 } // namespace media | |
| OLD | NEW |