Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Side by Side Diff: media/video/video_decode_accelerator.cc

Issue 1469353010: Configure MediaCodec with CDM in ADVA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, used std::move, added VDA::Config::AsHumanReadableString Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« media/base/video_decoder_config.cc ('K') | « media/video/video_decode_accelerator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698