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

Unified Diff: media/formats/mp4/mp4_stream_parser.cc

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mojo changes; Message->base::Pickle Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: media/formats/mp4/mp4_stream_parser.cc
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index 7becdf941019ffca0378baf9e08a9702957f35cc..70623f810c78a251fecf421efa396d39d2c1aac0 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -14,6 +14,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/audio_decoder_config.h"
+#include "media/base/encryption_scheme.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/text_track_config.h"
#include "media/base/timestamp_constants.h"
@@ -301,9 +302,9 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
is_audio_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted;
DVLOG(1) << "is_audio_track_encrypted_: " << is_audio_track_encrypted_;
- audio_config.Initialize(codec, sample_format, channel_layout,
- sample_per_second, extra_data,
- is_audio_track_encrypted_, base::TimeDelta(), 0);
+ audio_config.Initialize(
+ codec, sample_format, channel_layout, sample_per_second, extra_data,
+ EncryptionScheme(is_audio_track_encrypted_), base::TimeDelta(), 0);
ddorwin 2016/03/01 02:17:42 For now, it's always CTR no pattern.
dougsteed 2016/03/02 18:07:53 Done.
has_audio_ = true;
audio_track_id_ = track->header.track_id;
}
@@ -344,7 +345,7 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
COLOR_SPACE_HD_REC709, coded_size, visible_rect, natural_size,
// No decoder-specific buffer needed for AVC;
// SPS/PPS are embedded in the video stream
- std::vector<uint8_t>(), is_video_track_encrypted_);
+ std::vector<uint8_t>(), EncryptionScheme(is_video_track_encrypted_));
ddorwin 2016/03/01 02:17:42 ditto
dougsteed 2016/03/02 18:07:53 Done.
has_video_ = true;
video_track_id_ = track->header.track_id;
}

Powered by Google App Engine
This is Rietveld 408576698