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

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

Issue 2783703002: Declare intent to use sample-aes later in the stream. (Closed)
Patch Set: tweak needed for flush Created 3 years, 3 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
« no previous file with comments | « media/formats/mp2t/ts_section_cat.h ('k') | media/test/data/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/ts_section_cat.cc
diff --git a/media/formats/mp2t/ts_section_cat.cc b/media/formats/mp2t/ts_section_cat.cc
index 0f491fb125298a075aac1044744c7510d17f5855..3513ec6c8b3e2465d37f24807073dd69ab37c340 100644
--- a/media/formats/mp2t/ts_section_cat.cc
+++ b/media/formats/mp2t/ts_section_cat.cc
@@ -8,14 +8,19 @@
#include "base/logging.h"
#include "media/base/bit_reader.h"
+#include "media/base/encryption_scheme.h"
#include "media/formats/mp2t/descriptors.h"
#include "media/formats/mp2t/mp2t_common.h"
namespace media {
namespace mp2t {
-TsSectionCat::TsSectionCat(const RegisterCencPidsCb& register_cenc_ids_cb)
- : register_cenc_ids_cb_(register_cenc_ids_cb), version_number_(-1) {}
+TsSectionCat::TsSectionCat(
+ const RegisterCencPidsCb& register_cenc_ids_cb,
+ const RegisterEncryptionSchemeCb& register_encryption_scheme_cb)
+ : register_cenc_ids_cb_(register_cenc_ids_cb),
+ register_encryption_scheme_cb_(register_encryption_scheme_cb),
+ version_number_(-1) {}
TsSectionCat::~TsSectionCat() {}
@@ -54,8 +59,9 @@ bool TsSectionCat::ParsePsiSection(BitReader* bit_reader) {
Descriptors descriptors;
int ca_pid, pssh_pid;
+ EncryptionScheme scheme;
RCHECK(descriptors.Read(bit_reader, section_length - 4));
- RCHECK(descriptors.HasCADescriptorCenc(&ca_pid, &pssh_pid));
+ RCHECK(descriptors.HasCADescriptorCenc(&ca_pid, &pssh_pid, &scheme));
int crc32;
RCHECK(bit_reader->ReadBits(32, &crc32));
@@ -69,8 +75,9 @@ bool TsSectionCat::ParsePsiSection(BitReader* bit_reader) {
if (version_number == version_number_)
return true;
- // Can now register the PIDs.
+ // Can now register the PIDs and scheme.
register_cenc_ids_cb_.Run(ca_pid, pssh_pid);
+ register_encryption_scheme_cb_.Run(scheme);
version_number_ = version_number;
« no previous file with comments | « media/formats/mp2t/ts_section_cat.h ('k') | media/test/data/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698