public class CencEncryptingTrackImpl extends Object implements CencEncryptedTrack
Constructor and Description |
---|
CencEncryptingTrackImpl(Track source,
UUID defaultKeyId,
Map<UUID,SecretKey> keys,
Map<CencSampleEncryptionInformationGroupEntry,long[]> keyRotation,
String encryptionAlgo,
boolean dummyIvs) |
CencEncryptingTrackImpl(Track source,
UUID defaultKeyId,
Map<UUID,SecretKey> keys,
Map<CencSampleEncryptionInformationGroupEntry,long[]> keyRotation,
String encryptionAlgo,
boolean dummyIvs,
boolean encryptButAllClear)
Encrypts a given source track.
|
CencEncryptingTrackImpl(Track source,
UUID defaultKeyId,
SecretKey key,
boolean dummyIvs) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
List<CompositionTimeToSample.Entry> |
getCompositionTimeEntries() |
UUID |
getDefaultKeyId() |
long |
getDuration()
The duration of the track in track timescale.
|
List<Edit> |
getEdits() |
String |
getHandler() |
String |
getName()
A name for identification purposes.
|
List<SampleDependencyTypeBox.Entry> |
getSampleDependencies() |
SampleDescriptionBox |
getSampleDescriptionBox() |
long[] |
getSampleDurations()
Each samples is covers a small time span in a video.
|
List<CencSampleAuxiliaryDataFormat> |
getSampleEncryptionEntries() |
Map<GroupEntry,long[]> |
getSampleGroups() |
List<Sample> |
getSamples()
The list of all samples.
|
SubSampleInformationBox |
getSubsampleInformationBox() |
long[] |
getSyncSamples() |
TrackMetaData |
getTrackMetaData() |
boolean |
hasSubSampleEncryption() |
boolean |
isClearNal(ByteBuffer s) |
public CencEncryptingTrackImpl(Track source, UUID defaultKeyId, SecretKey key, boolean dummyIvs)
public CencEncryptingTrackImpl(Track source, UUID defaultKeyId, Map<UUID,SecretKey> keys, Map<CencSampleEncryptionInformationGroupEntry,long[]> keyRotation, String encryptionAlgo, boolean dummyIvs)
public CencEncryptingTrackImpl(Track source, UUID defaultKeyId, Map<UUID,SecretKey> keys, Map<CencSampleEncryptionInformationGroupEntry,long[]> keyRotation, String encryptionAlgo, boolean dummyIvs, boolean encryptButAllClear)
source
- unencrypted source filedefaultKeyId
- the default key ID - might be null if sample are not encrypted by defaultkeys
- key ID to key mapkeyRotation
- assigns an encryption group to a number of samplesencryptionAlgo
- cenc or cbc1 (don't use cbc1)dummyIvs
- disables RNG for IVs and use IVs starting with 0x00...000encryptButAllClear
- will cause sub sample encryption format to keep full sample in clear (clear/encrypted pair will be len(sample)/0public UUID getDefaultKeyId()
getDefaultKeyId
in interface CencEncryptedTrack
public boolean hasSubSampleEncryption()
hasSubSampleEncryption
in interface CencEncryptedTrack
public List<CencSampleAuxiliaryDataFormat> getSampleEncryptionEntries()
getSampleEncryptionEntries
in interface CencEncryptedTrack
public SampleDescriptionBox getSampleDescriptionBox()
getSampleDescriptionBox
in interface Track
public long[] getSampleDurations()
Track
Track.getSamples()
contains.getSampleDurations
in interface Track
public long getDuration()
Track
getDuration
in interface Track
public List<CompositionTimeToSample.Entry> getCompositionTimeEntries()
getCompositionTimeEntries
in interface Track
public long[] getSyncSamples()
getSyncSamples
in interface Track
public List<SampleDependencyTypeBox.Entry> getSampleDependencies()
getSampleDependencies
in interface Track
public TrackMetaData getTrackMetaData()
getTrackMetaData
in interface Track
public String getHandler()
getHandler
in interface Track
public List<Sample> getSamples()
Track
getSamples
in interface Track
public SubSampleInformationBox getSubsampleInformationBox()
getSubsampleInformationBox
in interface Track
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public String getName()
Track
public Map<GroupEntry,long[]> getSampleGroups()
getSampleGroups
in interface Track
public boolean isClearNal(ByteBuffer s)
Copyright © 2017. All rights reserved.