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

Unified Diff: media/formats/mp2t/es_parser_h264.cc

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more ddorwin comments 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/mp2t/es_parser_h264.cc
diff --git a/media/formats/mp2t/es_parser_h264.cc b/media/formats/mp2t/es_parser_h264.cc
index dc8315c27d2dd596d08d0205fd4fdc54559875b0..24ff6cc56eef7193bb4af70a51ccfefc6ce042ca 100644
--- a/media/formats/mp2t/es_parser_h264.cc
+++ b/media/formats/mp2t/es_parser_h264.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
+#include "media/base/encryption_scheme.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/timestamp_constants.h"
#include "media/base/video_frame.h"
@@ -262,7 +263,7 @@ bool EsParserH264::EmitFrame(int64_t access_unit_pos,
const H264SPS* sps = h264_parser_->GetSPS(pps->seq_parameter_set_id);
if (!sps)
return false;
- RCHECK(UpdateVideoDecoderConfig(sps));
+ RCHECK(UpdateVideoDecoderConfig(sps, EncryptionScheme::Unencrypted()));
}
// Emit a frame.
@@ -287,7 +288,8 @@ bool EsParserH264::EmitFrame(int64_t access_unit_pos,
return es_adapter_.OnNewBuffer(stream_parser_buffer);
}
-bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps) {
+bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps,
+ const EncryptionScheme& scheme) {
// Set the SAR to 1 when not specified in the H264 stream.
int sar_width = (sps->sar_width == 0) ? 1 : sps->sar_width;
int sar_height = (sps->sar_height == 0) ? 1 : sps->sar_height;
@@ -314,7 +316,7 @@ bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps) {
VideoDecoderConfig video_decoder_config(
kCodecH264, ProfileIDCToVideoCodecProfile(sps->profile_idc),
PIXEL_FORMAT_YV12, COLOR_SPACE_HD_REC709, coded_size, visible_rect,
- natural_size, std::vector<uint8_t>(), false);
+ natural_size, std::vector<uint8_t>(), scheme);
xhwang 2016/03/03 22:33:01 We can use EmptyExtraData() here for std::vector<u
dougsteed 2016/03/04 19:07:30 Done.
if (!video_decoder_config.Matches(last_video_decoder_config_)) {
DVLOG(1) << "Profile IDC: " << sps->profile_idc;

Powered by Google App Engine
This is Rietveld 408576698