| 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/video/video_decode_accelerator.h" | 5 #include "media/video/video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| 11 | 11 |
| 12 VideoDecodeAccelerator::Config::Config(VideoCodecProfile video_codec_profile) | 12 VideoDecodeAccelerator::Config::Config(VideoCodecProfile video_codec_profile) |
| 13 : profile(video_codec_profile) {} | 13 : profile(video_codec_profile) {} |
| 14 | 14 |
| 15 VideoDecodeAccelerator::Config::Config( | 15 VideoDecodeAccelerator::Config::Config( |
| 16 const VideoDecoderConfig& video_decoder_config) | 16 const VideoDecoderConfig& video_decoder_config) |
| 17 : profile(video_decoder_config.profile()), | 17 : profile(video_decoder_config.profile()), |
| 18 is_encrypted(video_decoder_config.is_encrypted()) {} | 18 is_encrypted(video_decoder_config.is_encrypted()) {} |
| 19 | 19 |
| 20 std::string VideoDecodeAccelerator::Config::AsHumanReadableString() const { |
| 21 std::ostringstream s; |
| 22 s << "profile: " << VideoDecoderConfig::GetHumanReadableProfile(profile) |
| 23 << " encrypted? " << (is_encrypted ? "true" : "false"); |
| 24 return s.str(); |
| 25 } |
| 26 |
| 20 void VideoDecodeAccelerator::Client::NotifyCdmAttached(bool success) { | 27 void VideoDecodeAccelerator::Client::NotifyCdmAttached(bool success) { |
| 21 NOTREACHED() << "By default CDM is not supported."; | 28 NOTREACHED() << "By default CDM is not supported."; |
| 22 } | 29 } |
| 23 | 30 |
| 24 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} | 31 VideoDecodeAccelerator::~VideoDecodeAccelerator() {} |
| 25 | 32 |
| 26 void VideoDecodeAccelerator::SetCdm(int cdm_id) { | 33 void VideoDecodeAccelerator::SetCdm(int cdm_id) { |
| 27 NOTREACHED() << "By default CDM is not supported."; | 34 NOTREACHED() << "By default CDM is not supported."; |
| 28 } | 35 } |
| 29 | 36 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 47 } // namespace media | 54 } // namespace media |
| 48 | 55 |
| 49 namespace std { | 56 namespace std { |
| 50 | 57 |
| 51 void default_delete<media::VideoDecodeAccelerator>::operator()( | 58 void default_delete<media::VideoDecodeAccelerator>::operator()( |
| 52 media::VideoDecodeAccelerator* vda) const { | 59 media::VideoDecodeAccelerator* vda) const { |
| 53 vda->Destroy(); | 60 vda->Destroy(); |
| 54 } | 61 } |
| 55 | 62 |
| 56 } // namespace std | 63 } // namespace std |
| OLD | NEW |