summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/binding/MoofParser.cpp
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-07-25 22:39:12 -0500
committertrav90 <travawine@palemoon.org>2018-07-25 22:39:12 -0500
commit165a8d5057687bbcfc14ccdc084579372faf9860 (patch)
treef617de9b9cda4e0697efd4d2cd1c13290f249c49 /media/libstagefright/binding/MoofParser.cpp
parent512dcfac01d5395855cf2aff96ecd62ededb05aa (diff)
downloadUXP-165a8d5057687bbcfc14ccdc084579372faf9860.tar
UXP-165a8d5057687bbcfc14ccdc084579372faf9860.tar.gz
UXP-165a8d5057687bbcfc14ccdc084579372faf9860.tar.lz
UXP-165a8d5057687bbcfc14ccdc084579372faf9860.tar.xz
UXP-165a8d5057687bbcfc14ccdc084579372faf9860.zip
[EME] Add support for sbgp and sgpd boxes occuring in the sampletable
Diffstat (limited to 'media/libstagefright/binding/MoofParser.cpp')
-rw-r--r--media/libstagefright/binding/MoofParser.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/media/libstagefright/binding/MoofParser.cpp b/media/libstagefright/binding/MoofParser.cpp
index 970bc2325..4abad747b 100644
--- a/media/libstagefright/binding/MoofParser.cpp
+++ b/media/libstagefright/binding/MoofParser.cpp
@@ -332,6 +332,18 @@ MoofParser::ParseStbl(Box& aBox)
for (Box box = aBox.FirstChild(); box.IsAvailable(); box = box.Next()) {
if (box.IsType("stsd")) {
ParseStsd(box);
+ } else if (box.IsType("sgpd")) {
+ Sgpd sgpd(box);
+ if (sgpd.IsValid() && sgpd.mGroupingType == "seig") {
+ mTrackSampleEncryptionInfoEntries.Clear();
+ mTrackSampleEncryptionInfoEntries.AppendElements(sgpd.mEntries);
+ }
+ } else if (box.IsType("sbgp")) {
+ Sbgp sbgp(box);
+ if (sbgp.IsValid() && sbgp.mGroupingType == "seig") {
+ mTrackSampleToGroupEntries.Clear();
+ mTrackSampleToGroupEntries.AppendElements(sbgp.mEntries);
+ }
}
}
}
@@ -497,6 +509,7 @@ Moof::ParseTraf(Box& aBox, Trex& aTrex, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, S
MOZ_ASSERT(aDecodeTime);
Tfhd tfhd(aTrex);
Tfdt tfdt;
+
for (Box box = aBox.FirstChild(); box.IsAvailable(); box = box.Next()) {
if (box.IsType("tfhd")) {
tfhd = Tfhd(box, aTrex);
@@ -506,14 +519,14 @@ Moof::ParseTraf(Box& aBox, Trex& aTrex, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, S
} else if (box.IsType("sgpd")) {
Sgpd sgpd(box);
if (sgpd.IsValid() && sgpd.mGroupingType == "seig") {
- mSampleEncryptionInfoEntries.Clear();
- mSampleEncryptionInfoEntries.AppendElements(sgpd.mEntries);
+ mFragmentSampleEncryptionInfoEntries.Clear();
+ mFragmentSampleEncryptionInfoEntries.AppendElements(sgpd.mEntries);
}
} else if (box.IsType("sbgp")) {
Sbgp sbgp(box);
if (sbgp.IsValid() && sbgp.mGroupingType == "seig") {
- mSampleToGroupEntries.Clear();
- mSampleToGroupEntries.AppendElements(sbgp.mEntries);
+ mFragmentSampleToGroupEntries.Clear();
+ mFragmentSampleToGroupEntries.AppendElements(sbgp.mEntries);
}
} else if (box.IsType("saiz")) {
mSaizs.AppendElement(Saiz(box, aSinf.mDefaultEncryptionType));