本文整理汇总了Java中com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.ProtectionElement类的典型用法代码示例。如果您正苦于以下问题:Java ProtectionElement类的具体用法?Java ProtectionElement怎么用?Java ProtectionElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProtectionElement类属于com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest包,在下文中一共展示了ProtectionElement类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SsMediaPeriod
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.ProtectionElement; //导入依赖的package包/类
public SsMediaPeriod(SsManifest manifest, SsChunkSource.Factory chunkSourceFactory,
int minLoadableRetryCount, EventDispatcher eventDispatcher,
LoaderErrorThrower manifestLoaderErrorThrower, Allocator allocator) {
this.chunkSourceFactory = chunkSourceFactory;
this.manifestLoaderErrorThrower = manifestLoaderErrorThrower;
this.minLoadableRetryCount = minLoadableRetryCount;
this.eventDispatcher = eventDispatcher;
this.allocator = allocator;
trackGroups = buildTrackGroups(manifest);
ProtectionElement protectionElement = manifest.protectionElement;
if (protectionElement != null) {
byte[] keyId = getProtectionElementKeyId(protectionElement.data);
trackEncryptionBoxes = new TrackEncryptionBox[] {
new TrackEncryptionBox(true, INITIALIZATION_VECTOR_SIZE, keyId)};
} else {
trackEncryptionBoxes = null;
}
this.manifest = manifest;
sampleStreams = newSampleStreamArray(0);
sequenceableLoader = new CompositeSequenceableLoader(sampleStreams);
}
示例2: SsMediaPeriod
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.ProtectionElement; //导入依赖的package包/类
public SsMediaPeriod(SsManifest manifest, SsChunkSource.Factory chunkSourceFactory,
int minLoadableRetryCount, EventDispatcher eventDispatcher,
LoaderErrorThrower manifestLoaderErrorThrower, Allocator allocator) {
this.chunkSourceFactory = chunkSourceFactory;
this.manifestLoaderErrorThrower = manifestLoaderErrorThrower;
this.minLoadableRetryCount = minLoadableRetryCount;
this.eventDispatcher = eventDispatcher;
this.allocator = allocator;
trackGroups = buildTrackGroups(manifest);
ProtectionElement protectionElement = manifest.protectionElement;
if (protectionElement != null) {
byte[] keyId = getProtectionElementKeyId(protectionElement.data);
// We assume pattern encryption does not apply.
trackEncryptionBoxes = new TrackEncryptionBox[] {
new TrackEncryptionBox(true, null, INITIALIZATION_VECTOR_SIZE, keyId, 0, 0, null)};
} else {
trackEncryptionBoxes = null;
}
this.manifest = manifest;
sampleStreams = newSampleStreamArray(0);
sequenceableLoader = new CompositeSequenceableLoader(sampleStreams);
}
示例3: build
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.ProtectionElement; //导入依赖的package包/类
@Override
public Object build() {
return new ProtectionElement(uuid, PsshAtomUtil.buildPsshAtom(uuid, initData));
}