OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/common/gpu/media/android_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/android_video_decode_accelerator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 if (make_context_current_cb_.is_null() || get_gles2_decoder_cb_.is_null()) { | 325 if (make_context_current_cb_.is_null() || get_gles2_decoder_cb_.is_null()) { |
326 NOTREACHED() << "GL callbacks are required for this VDA"; | 326 NOTREACHED() << "GL callbacks are required for this VDA"; |
327 return false; | 327 return false; |
328 } | 328 } |
329 | 329 |
330 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 330 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
331 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 331 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
332 return false; | 332 return false; |
333 } | 333 } |
334 | 334 |
| 335 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) { |
| 336 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented"; |
| 337 return false; |
| 338 } |
| 339 |
335 DCHECK(client); | 340 DCHECK(client); |
336 client_ = client; | 341 client_ = client; |
337 codec_config_ = new CodecConfig(); | 342 codec_config_ = new CodecConfig(); |
338 codec_config_->codec_ = VideoCodecProfileToVideoCodec(config.profile); | 343 codec_config_->codec_ = VideoCodecProfileToVideoCodec(config.profile); |
339 codec_config_->initial_expected_coded_size_ = | 344 codec_config_->initial_expected_coded_size_ = |
340 config.initial_expected_coded_size; | 345 config.initial_expected_coded_size; |
341 is_encrypted_ = config.is_encrypted; | 346 is_encrypted_ = config.is_encrypted; |
342 | 347 |
343 bool profile_supported = codec_config_->codec_ == media::kCodecVP8 || | 348 bool profile_supported = codec_config_->codec_ == media::kCodecVP8 || |
344 codec_config_->codec_ == media::kCodecVP9 || | 349 codec_config_->codec_ == media::kCodecVP9 || |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 media::VideoDecodeAccelerator::Capabilities:: | 1331 media::VideoDecodeAccelerator::Capabilities:: |
1327 SUPPORTS_EXTERNAL_OUTPUT_SURFACE | | 1332 SUPPORTS_EXTERNAL_OUTPUT_SURFACE | |
1328 media::VideoDecodeAccelerator::Capabilities:: | 1333 media::VideoDecodeAccelerator::Capabilities:: |
1329 SUPPORTS_DEFERRED_INITIALIZATION; | 1334 SUPPORTS_DEFERRED_INITIALIZATION; |
1330 } | 1335 } |
1331 | 1336 |
1332 return capabilities; | 1337 return capabilities; |
1333 } | 1338 } |
1334 | 1339 |
1335 } // namespace content | 1340 } // namespace content |
OLD | NEW |