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: " << GetProfileName(profile) << " encrypted? " |
| 23 << (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 19 matching lines...) Expand all Loading... |
49 } // namespace media | 56 } // namespace media |
50 | 57 |
51 namespace std { | 58 namespace std { |
52 | 59 |
53 void default_delete<media::VideoDecodeAccelerator>::operator()( | 60 void default_delete<media::VideoDecodeAccelerator>::operator()( |
54 media::VideoDecodeAccelerator* vda) const { | 61 media::VideoDecodeAccelerator* vda) const { |
55 vda->Destroy(); | 62 vda->Destroy(); |
56 } | 63 } |
57 | 64 |
58 } // namespace std | 65 } // namespace std |
OLD | NEW |