Remove the restriction that key response contains all keys
Also set fragment_duration in mvex. Change-Id: I9584c17569b2eb9b75d060284288c44f64b76821
This commit is contained in:
parent
f5e71b62b5
commit
fe9c4201f3
|
@ -332,7 +332,7 @@ Demux video from the input and generate an encrypted fragmented mp4 using Widevi
|
|||
packager input=sintel.mp4,stream=video,output=encrypted_sintel.mp4 \
|
||||
--enable_widevine_encryption \
|
||||
--key_server_url "https://license.uat.widevine.com/cenc/getcontentkey/widevine_test" \
|
||||
--content_id "content_sintel" \
|
||||
--content_id "3031323334353637" \
|
||||
--signer "widevine_test" \
|
||||
--rsa_signing_key_path "widevine_test_private.der"
|
||||
```
|
||||
|
@ -342,7 +342,7 @@ The program also supports AES signing. Here is an example with encryption key ro
|
|||
packager input=sintel.mp4,stream=video,output=encrypted_sintel.mp4 \
|
||||
--enable_widevine_encryption \
|
||||
--key_server_url "https://license.uat.widevine.com/cenc/getcontentkey/widevine_test" \
|
||||
--content_id "content_sintel" \
|
||||
--content_id "3031323334353637" \
|
||||
--signer "widevine_test" \
|
||||
--aes_signing_key "1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9" \
|
||||
--aes_signing_iv "d58ce954203b7c9a9a9d467f59839249" \
|
||||
|
@ -355,7 +355,7 @@ packager input=sintel.wvm,stream=video,output=encrypted_sintel.mp4 \
|
|||
--enable_widevine_decryption \
|
||||
--enable_widevine_encryption \
|
||||
--key_server_url "https://license.uat.widevine.com/cenc/getcontentkey/widevine_test" \
|
||||
--content_id "01020304050607" \
|
||||
--content_id "3031323334353637" \
|
||||
--signer "widevine_test" \
|
||||
--rsa_signing_key_path "widevine_test_private.der"
|
||||
```
|
||||
|
|
|
@ -111,6 +111,8 @@ KeySource::TrackType KeySource::GetTrackTypeFromString(
|
|||
return TRACK_TYPE_HD;
|
||||
if (track_type_string == "AUDIO")
|
||||
return TRACK_TYPE_AUDIO;
|
||||
if (track_type_string == "UNSPECIFIED")
|
||||
return TRACK_TYPE_UNSPECIFIED;
|
||||
LOG(WARNING) << "Unexpected track type: " << track_type_string;
|
||||
return TRACK_TYPE_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ class KeySource {
|
|||
TRACK_TYPE_SD = 1,
|
||||
TRACK_TYPE_HD = 2,
|
||||
TRACK_TYPE_AUDIO = 3,
|
||||
NUM_VALID_TRACK_TYPES = 3
|
||||
TRACK_TYPE_UNSPECIFIED = 4,
|
||||
NUM_VALID_TRACK_TYPES = 4
|
||||
};
|
||||
|
||||
virtual ~KeySource();
|
||||
|
|
|
@ -459,9 +459,9 @@ bool WidevineKeySource::ExtractEncryptionKey(
|
|||
|
||||
const base::ListValue* tracks;
|
||||
RCHECK(license_dict->GetList("tracks", &tracks));
|
||||
RCHECK(enable_key_rotation
|
||||
? tracks->GetSize() >= NUM_VALID_TRACK_TYPES * crypto_period_count_
|
||||
: tracks->GetSize() >= NUM_VALID_TRACK_TYPES);
|
||||
// Should have at least one track per crypto_period.
|
||||
RCHECK(enable_key_rotation ? tracks->GetSize() >= 1 * crypto_period_count_
|
||||
: tracks->GetSize() >= 1);
|
||||
|
||||
int current_crypto_period_index = first_crypto_period_index_;
|
||||
|
||||
|
|
|
@ -230,6 +230,7 @@ Status Segmenter::Finalize() {
|
|||
if (track->header.duration > moov_->header.duration)
|
||||
moov_->header.duration = track->header.duration;
|
||||
}
|
||||
moov_->extends.header.fragment_duration = moov_->header.duration;
|
||||
|
||||
return DoFinalize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue