OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cast/receiver/video_decoder.h" | 5 #include "media/cast/receiver/video_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "media/base/video_util.h" | 13 #include "media/base/video_util.h" |
14 #include "media/cast/cast_defines.h" | 14 #include "media/cast/cast_defines.h" |
15 #include "media/cast/cast_environment.h" | 15 #include "media/cast/cast_environment.h" |
16 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide | 16 // VPX_CODEC_DISABLE_COMPAT excludes parts of the libvpx API that provide |
17 // backwards compatibility for legacy applications using the library. | 17 // backwards compatibility for legacy applications using the library. |
18 #define VPX_CODEC_DISABLE_COMPAT 1 | 18 #define VPX_CODEC_DISABLE_COMPAT 1 |
19 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" | 19 #include "third_party/libvpx/source/libvpx/vpx/vp8dx.h" |
20 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" | 20 #include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h" |
21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/geometry/size.h" |
22 | 22 |
23 namespace media { | 23 namespace media { |
24 namespace cast { | 24 namespace cast { |
25 | 25 |
26 // Base class that handles the common problem of detecting dropped frames, and | 26 // Base class that handles the common problem of detecting dropped frames, and |
27 // then invoking the Decode() method implemented by the subclasses to convert | 27 // then invoking the Decode() method implemented by the subclasses to convert |
28 // the encoded payload data into a usable video frame. | 28 // the encoded payload data into a usable video frame. |
29 class VideoDecoder::ImplBase | 29 class VideoDecoder::ImplBase |
30 : public base::RefCountedThreadSafe<VideoDecoder::ImplBase> { | 30 : public base::RefCountedThreadSafe<VideoDecoder::ImplBase> { |
31 public: | 31 public: |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 cast_environment_->PostTask(CastEnvironment::VIDEO, | 256 cast_environment_->PostTask(CastEnvironment::VIDEO, |
257 FROM_HERE, | 257 FROM_HERE, |
258 base::Bind(&VideoDecoder::ImplBase::DecodeFrame, | 258 base::Bind(&VideoDecoder::ImplBase::DecodeFrame, |
259 impl_, | 259 impl_, |
260 base::Passed(&encoded_frame), | 260 base::Passed(&encoded_frame), |
261 callback)); | 261 callback)); |
262 } | 262 } |
263 | 263 |
264 } // namespace cast | 264 } // namespace cast |
265 } // namespace media | 265 } // namespace media |
OLD | NEW |