Skip to content

Commit

Permalink
Made the EME PSSH box optional
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Jan 27, 2015
1 parent 15c8db1 commit 1af8c47
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/C++/Core/Ap4CommonEncryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ AP4_CencEncryptingProcessor::Initialize(AP4_AtomParent& top_lev
if (moov) {
// create a 'standard EME' pssh atom
AP4_PsshAtom* eme_pssh = NULL;
if (m_Variant == AP4_CENC_VARIANT_MPEG) {
if (m_Variant == AP4_CENC_VARIANT_MPEG && AP4_GlobalOptions::GetBool("mpeg-cenc.eme-pssh")) {
AP4_DataBuffer kids;
AP4_UI32 kid_count = 0;
const AP4_List<AP4_TrackPropertyMap::Entry>& prop_entries = m_PropertyMap.GetEntries();
Expand Down
5 changes: 3 additions & 2 deletions Source/Python/utils/mp4-dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ def main():
parser.add_option('', "--widevine", dest="widevine", action="store_true", default=False,
help="Add Widevine signaling to the MPD (requires an encrypted input, or the --encryption-key option)")
parser.add_option('', "--widevine-header", dest="widevine_header", metavar='<widevine-header>', default=None,
help="Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments. The use of this option implies the --widevine option." +
"The <widebine-header> argument can be either: " +
help="Add a Widevine entry in the MPD, and a Widevine PSSH box in the init segments. The use of this option implies the --widevine option. " +
"The <widevine-header> argument can be either: " +
"(1) the character '#' followed by a Widevine header encoded in Base64, or " +
"(2) one or more <name>:<value> pair(s) (separated by '#' if more than one) specifying fields of a Widevine header (field names include 'provider' [string], 'content_id' [byte array in hex], 'policy' [string])")
parser.add_option('', "--exec-dir", metavar="<exec_dir>", dest="exec_dir", default=path.join(SCRIPT_PATH, 'bin', platform),
Expand All @@ -719,6 +719,7 @@ def main():
options.use_segment_timeline = True
if options.use_segment_list:
raise Exception('ERROR: --smooth and --use-segment-list are mutually exclusive')

if options.hippo:
options.split = False
options.use_segment_timeline = True
Expand Down
2 changes: 1 addition & 1 deletion Source/Python/utils/mp4utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def ComputeWidevineHeader(header_spec, kid_hex, key_hex):
if 'content_id' in fields:
protobuf_fields.append((4, fields['content_id'].decode('hex')))
if 'policy' in fields:
protobuf_fields.append((6, fields['policy'].decode('hex')))
protobuf_fields.append((6, fields['policy']))
return WidevineMakeHeader(protobuf_fields)

return ""
Empty file added Test/Data/DASH/README.txt
Empty file.

0 comments on commit 1af8c47

Please sign in to comment.