Search in sources :

Example 1 with SchemeInitData

use of android.media.DrmInitData.SchemeInitData in project media by androidx.

the class OutputConsumerAdapterV30 method toExoPlayerDrmInitData.

@Nullable
private static DrmInitData toExoPlayerDrmInitData(@Nullable String schemeType, @Nullable android.media.DrmInitData drmInitData) {
    if (drmInitData == null) {
        return null;
    }
    SchemeData[] schemeDatas = new SchemeData[drmInitData.getSchemeInitDataCount()];
    for (int i = 0; i < schemeDatas.length; i++) {
        SchemeInitData schemeInitData = drmInitData.getSchemeInitDataAt(i);
        schemeDatas[i] = new SchemeData(schemeInitData.uuid, schemeInitData.mimeType, schemeInitData.data);
    }
    return new DrmInitData(schemeType, schemeDatas);
}
Also used : DrmInitData(androidx.media3.common.DrmInitData) SchemeData(androidx.media3.common.DrmInitData.SchemeData) SeekPoint(androidx.media3.extractor.SeekPoint) SuppressLint(android.annotation.SuppressLint) SchemeInitData(android.media.DrmInitData.SchemeInitData) Nullable(androidx.annotation.Nullable)

Example 2 with SchemeInitData

use of android.media.DrmInitData.SchemeInitData in project ExoPlayer by google.

the class OutputConsumerAdapterV30 method toExoPlayerDrmInitData.

@Nullable
private static DrmInitData toExoPlayerDrmInitData(@Nullable String schemeType, @Nullable android.media.DrmInitData drmInitData) {
    if (drmInitData == null) {
        return null;
    }
    SchemeData[] schemeDatas = new SchemeData[drmInitData.getSchemeInitDataCount()];
    for (int i = 0; i < schemeDatas.length; i++) {
        SchemeInitData schemeInitData = drmInitData.getSchemeInitDataAt(i);
        schemeDatas[i] = new SchemeData(schemeInitData.uuid, schemeInitData.mimeType, schemeInitData.data);
    }
    return new DrmInitData(schemeType, schemeDatas);
}
Also used : DrmInitData(com.google.android.exoplayer2.drm.DrmInitData) SchemeData(com.google.android.exoplayer2.drm.DrmInitData.SchemeData) SeekPoint(com.google.android.exoplayer2.extractor.SeekPoint) SuppressLint(android.annotation.SuppressLint) SchemeInitData(android.media.DrmInitData.SchemeInitData) Nullable(androidx.annotation.Nullable)

Aggregations

SuppressLint (android.annotation.SuppressLint)2 SchemeInitData (android.media.DrmInitData.SchemeInitData)2 Nullable (androidx.annotation.Nullable)2 DrmInitData (androidx.media3.common.DrmInitData)1 SchemeData (androidx.media3.common.DrmInitData.SchemeData)1 SeekPoint (androidx.media3.extractor.SeekPoint)1 DrmInitData (com.google.android.exoplayer2.drm.DrmInitData)1 SchemeData (com.google.android.exoplayer2.drm.DrmInitData.SchemeData)1 SeekPoint (com.google.android.exoplayer2.extractor.SeekPoint)1