diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-18 09:01:14 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-18 09:01:14 +0000 |
commit | 47263cb1a4253ff51e157749499b293c8399dd48 (patch) | |
tree | bc48dbed2f321cffdaf503b6607c9f8368449e25 /media/mp4 | |
parent | 25da68564633432c51f8b3e72d5a56a7af58066e (diff) | |
download | chromium_src-47263cb1a4253ff51e157749499b293c8399dd48.zip chromium_src-47263cb1a4253ff51e157749499b293c8399dd48.tar.gz chromium_src-47263cb1a4253ff51e157749499b293c8399dd48.tar.bz2 |
Add is_encrypted() in VideoDecoderConfig.
This is needed so that decoders can check if the video stream is encrypted or not and decide if it can support decrypting and/or decodeing the stream.
BUG=141784
TEST=media_unittest, encrypted media demo.
Review URL: https://chromiumcodereview.appspot.com/10910293
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mp4')
-rw-r--r-- | media/mp4/mp4_stream_parser.cc | 3 | ||||
-rw-r--r-- | media/mp4/mp4_stream_parser_unittest.cc | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc index 2f51321..8d9a9a5 100644 --- a/media/mp4/mp4_stream_parser.cc +++ b/media/mp4/mp4_stream_parser.cc @@ -227,11 +227,12 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) { gfx::Size natural_size = GetNaturalSize(visible_rect.size(), entry.pixel_aspect.h_spacing, entry.pixel_aspect.v_spacing); + bool is_encrypted = entry.sinf.info.track_encryption.is_encrypted; video_config.Initialize(kCodecH264, H264PROFILE_MAIN, VideoFrame::YV12, coded_size, visible_rect, natural_size, // No decoder-specific buffer needed for AVC; // SPS/PPS are embedded in the video stream - NULL, 0, true); + NULL, 0, is_encrypted, true); has_video_ = true; video_track_id_ = track->header.track_id; } diff --git a/media/mp4/mp4_stream_parser_unittest.cc b/media/mp4/mp4_stream_parser_unittest.cc index 20c32f1..6c577ad 100644 --- a/media/mp4/mp4_stream_parser_unittest.cc +++ b/media/mp4/mp4_stream_parser_unittest.cc @@ -58,8 +58,7 @@ class MP4StreamParserTest : public testing::Test { << ", dur=" << duration.InMilliseconds(); } - bool NewConfigF(const AudioDecoderConfig& ac, - const VideoDecoderConfig& vc) { + bool NewConfigF(const AudioDecoderConfig& ac, const VideoDecoderConfig& vc) { DVLOG(1) << "NewConfigF: audio=" << ac.IsValidConfig() << ", video=" << vc.IsValidConfig(); configs_received_ = true; |