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

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: 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 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 78b7dcdae86fcda364f40f69d8404010e65c84cb..7ad9911552fac24d6c3f61f1790d97e4f0605d45 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/time/time.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"
@@ -268,9 +269,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 2015/12/10 18:36:02 Perhaps we should have a member documenting the en
dougsteed 2015/12/14 21:19:02 I figured we could do that when we added support f
has_audio_ = true;
audio_track_id_ = track->header.track_id;
}
@@ -311,7 +312,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 2015/12/10 18:36:02 ditto
dougsteed 2015/12/14 21:19:02 See above comment. (Default is appropriately AES-C
has_video_ = true;
video_track_id_ = track->header.track_id;
}

Powered by Google App Engine
This is Rietveld 408576698