OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/video_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" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 | 203 |
204 int last_decoded_id_; | 204 int last_decoded_id_; |
205 | 205 |
206 DISALLOW_COPY_AND_ASSIGN(FakeImpl); | 206 DISALLOW_COPY_AND_ASSIGN(FakeImpl); |
207 }; | 207 }; |
208 #endif | 208 #endif |
209 | 209 |
210 VideoDecoder::VideoDecoder( | 210 VideoDecoder::VideoDecoder( |
211 const scoped_refptr<CastEnvironment>& cast_environment, | 211 const scoped_refptr<CastEnvironment>& cast_environment, |
212 const FrameReceiverConfig& video_config) | 212 transport::VideoCodec codec) |
213 : cast_environment_(cast_environment) { | 213 : cast_environment_(cast_environment) { |
214 switch (video_config.codec.video) { | 214 switch (codec) { |
215 #ifndef OFFICIAL_BUILD | 215 #ifndef OFFICIAL_BUILD |
216 case transport::kFakeSoftwareVideo: | 216 case transport::kFakeSoftwareVideo: |
217 impl_ = new FakeImpl(cast_environment); | 217 impl_ = new FakeImpl(cast_environment); |
218 break; | 218 break; |
219 #endif | 219 #endif |
220 case transport::kVp8: | 220 case transport::kVp8: |
221 impl_ = new Vp8Impl(cast_environment); | 221 impl_ = new Vp8Impl(cast_environment); |
222 break; | 222 break; |
223 case transport::kH264: | 223 case transport::kH264: |
224 // TODO(miu): Need implementation. | 224 // TODO(miu): Need implementation. |
(...skipping 25 matching lines...) Expand all Loading... |
250 cast_environment_->PostTask(CastEnvironment::VIDEO, | 250 cast_environment_->PostTask(CastEnvironment::VIDEO, |
251 FROM_HERE, | 251 FROM_HERE, |
252 base::Bind(&VideoDecoder::ImplBase::DecodeFrame, | 252 base::Bind(&VideoDecoder::ImplBase::DecodeFrame, |
253 impl_, | 253 impl_, |
254 base::Passed(&encoded_frame), | 254 base::Passed(&encoded_frame), |
255 callback)); | 255 callback)); |
256 } | 256 } |
257 | 257 |
258 } // namespace cast | 258 } // namespace cast |
259 } // namespace media | 259 } // namespace media |
OLD | NEW |