• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DrmSessionManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.android.exoplayer2.drm.DrmSessionManager的典型用法代码示例。如果您正苦于以下问题:Java DrmSessionManager类的具体用法?Java DrmSessionManager怎么用?Java DrmSessionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DrmSessionManager类属于com.google.android.exoplayer2.drm包,在下文中一共展示了DrmSessionManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onStart

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Override
public final void onStart(HostActivity host, Surface surface) {
  // Build the player.
  DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
  trackSelector = buildTrackSelector(host, bandwidthMeter);
  String userAgent = "ExoPlayerPlaybackTests";
  DrmSessionManager<FrameworkMediaCrypto> drmSessionManager = buildDrmSessionManager(userAgent);
  player = buildExoPlayer(host, surface, trackSelector, drmSessionManager);
  player.prepare(buildSource(host, Util.getUserAgent(host, userAgent), bandwidthMeter));
  player.addListener(this);
  player.setAudioDebugListener(this);
  player.setVideoDebugListener(this);
  player.setPlayWhenReady(true);
  actionHandler = new Handler();
  // Schedule any pending actions.
  if (pendingSchedule != null) {
    pendingSchedule.start(player, trackSelector, actionHandler);
    pendingSchedule = null;
  }
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:21,代码来源:ExoHostedTest.java


示例2: MediaCodecRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param trackType The track type that the renderer handles. One of the {@code C.TRACK_TYPE_*}
 *     constants defined in {@link C}.
 * @param mediaCodecSelector A decoder selector.
 * @param drmSessionManager For use with encrypted media. May be null if support for encrypted
 *     media is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 */
public MediaCodecRenderer(int trackType, MediaCodecSelector mediaCodecSelector,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys) {
  super(trackType);
  Assertions.checkState(Util.SDK_INT >= 16);
  this.mediaCodecSelector = Assertions.checkNotNull(mediaCodecSelector);
  this.drmSessionManager = drmSessionManager;
  this.playClearSamplesWithoutKeys = playClearSamplesWithoutKeys;
  buffer = new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
  flagsOnlyBuffer = DecoderInputBuffer.newFlagsOnlyInstance();
  formatHolder = new FormatHolder();
  decodeOnlyPresentationTimestamps = new ArrayList<>();
  outputBufferInfo = new MediaCodec.BufferInfo();
  codecReconfigurationState = RECONFIGURATION_STATE_NONE;
  codecReinitializationState = REINITIALIZATION_STATE_NONE;
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:29,代码来源:MediaCodecRenderer.java


示例3: MediaCodecVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param context A context.
 * @param mediaCodecSelector A decoder selector.
 * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
 *     can attempt to seamlessly join an ongoing playback.
 * @param drmSessionManager For use with encrypted content. May be null if support for encrypted
 *     content is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
 *     null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
 *     invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
 */
public MediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector,
    long allowedJoiningTimeMs, DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys, Handler eventHandler,
    VideoRendererEventListener eventListener, int maxDroppedFramesToNotify) {
  super(C.TRACK_TYPE_VIDEO, mediaCodecSelector, drmSessionManager, playClearSamplesWithoutKeys);
  this.allowedJoiningTimeMs = allowedJoiningTimeMs;
  this.maxDroppedFramesToNotify = maxDroppedFramesToNotify;
  frameReleaseTimeHelper = new VideoFrameReleaseTimeHelper(context);
  eventDispatcher = new EventDispatcher(eventHandler, eventListener);
  deviceNeedsAutoFrcWorkaround = deviceNeedsAutoFrcWorkaround();
  joiningDeadlineMs = C.TIME_UNSET;
  currentWidth = Format.NO_VALUE;
  currentHeight = Format.NO_VALUE;
  currentPixelWidthHeightRatio = Format.NO_VALUE;
  pendingPixelWidthHeightRatio = Format.NO_VALUE;
  scalingMode = C.VIDEO_SCALING_MODE_DEFAULT;
  clearReportedVideoSize();
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:37,代码来源:MediaCodecVideoRenderer.java


示例4: create

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@NonNull
public SimpleExoPlayer create(DrmSessionCreator drmSessionCreator,
                              DefaultDrmSessionManager.EventListener drmSessionEventListener,
                              MediaCodecSelector mediaCodecSelector) {
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager = drmSessionCreator.create(drmSessionEventListener);
    RenderersFactory renderersFactory = new SimpleRenderersFactory(
            context,
            drmSessionManager,
            EXTENSION_RENDERER_MODE_OFF,
            DEFAULT_ALLOWED_VIDEO_JOINING_TIME_MS,
            mediaCodecSelector
    );

    DefaultLoadControl loadControl = new DefaultLoadControl();
    return ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector, loadControl);
}
 
开发者ID:novoda,项目名称:no-player,代码行数:17,代码来源:ExoPlayerCreator.java


示例5: MediaCodecRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param trackType The track type that the renderer handles. One of the {@code C.TRACK_TYPE_*}
 *     constants defined in {@link C}.
 * @param mediaCodecSelector A decoder selector.
 * @param drmSessionManager For use with encrypted media. May be null if support for encrypted
 *     media is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 */
public MediaCodecRenderer(int trackType, MediaCodecSelector mediaCodecSelector,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys) {
  super(trackType);
  Assertions.checkState(Util.SDK_INT >= 16);
  this.mediaCodecSelector = Assertions.checkNotNull(mediaCodecSelector);
  this.drmSessionManager = drmSessionManager;
  this.playClearSamplesWithoutKeys = playClearSamplesWithoutKeys;
  buffer = new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
  formatHolder = new FormatHolder();
  decodeOnlyPresentationTimestamps = new ArrayList<>();
  outputBufferInfo = new MediaCodec.BufferInfo();
  codecReconfigurationState = RECONFIGURATION_STATE_NONE;
  codecReinitializationState = REINITIALIZATION_STATE_NONE;
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:28,代码来源:MediaCodecRenderer.java


示例6: MediaCodecVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param context A context.
 * @param mediaCodecSelector A decoder selector.
 * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
 *     can attempt to seamlessly join an ongoing playback.
 * @param drmSessionManager For use with encrypted content. May be null if support for encrypted
 *     content is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
 *     null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
 *     invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
 */
public MediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector,
    long allowedJoiningTimeMs, DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys, Handler eventHandler,
    VideoRendererEventListener eventListener, int maxDroppedFramesToNotify) {
  super(C.TRACK_TYPE_VIDEO, mediaCodecSelector, drmSessionManager, playClearSamplesWithoutKeys);
  this.allowedJoiningTimeMs = allowedJoiningTimeMs;
  this.maxDroppedFramesToNotify = maxDroppedFramesToNotify;
  frameReleaseTimeHelper = new VideoFrameReleaseTimeHelper(context);
  eventDispatcher = new EventDispatcher(eventHandler, eventListener);
  deviceNeedsAutoFrcWorkaround = deviceNeedsAutoFrcWorkaround();
  joiningDeadlineMs = C.TIME_UNSET;
  currentWidth = Format.NO_VALUE;
  currentHeight = Format.NO_VALUE;
  currentPixelWidthHeightRatio = Format.NO_VALUE;
  pendingPixelWidthHeightRatio = Format.NO_VALUE;
  scalingMode = C.VIDEO_SCALING_MODE_DEFAULT;
  clearLastReportedVideoSize();
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:37,代码来源:MediaCodecVideoRenderer.java


示例7: buildRenderers

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
private void buildRenderers(Context context,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager, ArrayList<Renderer> renderersList,
    long allowedVideoJoiningTimeMs) {
  MediaCodecVideoRenderer videoRenderer = new MediaCodecVideoRenderer(context,
      MediaCodecSelector.DEFAULT, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
      allowedVideoJoiningTimeMs, drmSessionManager, false, mainHandler, componentListener,
      MAX_DROPPED_VIDEO_FRAME_COUNT_TO_NOTIFY);
  renderersList.add(videoRenderer);

  Renderer audioRenderer = new MediaCodecAudioRenderer(MediaCodecSelector.DEFAULT,
      drmSessionManager, true, mainHandler, componentListener,
      AudioCapabilities.getCapabilities(context), AudioManager.STREAM_MUSIC);
  renderersList.add(audioRenderer);

  Renderer textRenderer = new TextRenderer(componentListener, mainHandler.getLooper());
  renderersList.add(textRenderer);

  MetadataRenderer<List<Id3Frame>> id3Renderer = new MetadataRenderer<>(componentListener,
      mainHandler.getLooper(), new Id3Decoder());
  renderersList.add(id3Renderer);
}
 
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:22,代码来源:SimpleExoPlayer.java


示例8: MediaCodecVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param context A context.
 * @param mediaCodecSelector A decoder selector.
 * @param videoScalingMode The scaling mode to pass to
 *     {@link MediaCodec#setVideoScalingMode(int)}.
 * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
 *     can attempt to seamlessly join an ongoing playback.
 * @param drmSessionManager For use with encrypted content. May be null if support for encrypted
 *     content is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
 *     null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
 *     invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
 */
public MediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector,
    int videoScalingMode, long allowedJoiningTimeMs,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys, Handler eventHandler,
    VideoRendererEventListener eventListener, int maxDroppedFramesToNotify) {
  super(C.TRACK_TYPE_VIDEO, mediaCodecSelector, drmSessionManager, playClearSamplesWithoutKeys);
  this.videoScalingMode = videoScalingMode;
  this.allowedJoiningTimeMs = allowedJoiningTimeMs;
  this.maxDroppedFramesToNotify = maxDroppedFramesToNotify;
  frameReleaseTimeHelper = new VideoFrameReleaseTimeHelper(context);
  eventDispatcher = new EventDispatcher(eventHandler, eventListener);
  deviceNeedsAutoFrcWorkaround = deviceNeedsAutoFrcWorkaround();
  joiningDeadlineMs = C.TIME_UNSET;
  currentWidth = Format.NO_VALUE;
  currentHeight = Format.NO_VALUE;
  currentPixelWidthHeightRatio = Format.NO_VALUE;
  pendingPixelWidthHeightRatio = Format.NO_VALUE;
  lastReportedWidth = Format.NO_VALUE;
  lastReportedHeight = Format.NO_VALUE;
  lastReportedPixelWidthHeightRatio = Format.NO_VALUE;
}
 
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:42,代码来源:MediaCodecVideoRenderer.java


示例9: generateDrmSessionManager

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * Generates the {@link DrmSessionManager} to use with the {@link RendererProvider}. This will
 * return null on API's &lt; {@value Build.VERSION_CODES#JELLY_BEAN_MR2}
 *
 * @return The {@link DrmSessionManager} to use or <code>null</code>
 */
@Nullable
protected DrmSessionManager<FrameworkMediaCrypto> generateDrmSessionManager() {
    // DRM is only supported on API 18 + in the ExoPlayer
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
        return null;
    }

    // Widevine will capture the majority of use cases however playready is supported on all AndroidTV devices
    UUID uuid = C.WIDEVINE_UUID;

    try {
        return new DefaultDrmSessionManager<>(uuid, FrameworkMediaDrm.newInstance(uuid), new DelegatedMediaDrmCallback(), null, mainHandler, capabilitiesListener);
    } catch (Exception e) {
        Log.d(TAG, "Unable to create a DrmSessionManager due to an exception", e);
        return null;
    }
}
 
开发者ID:brianwernick,项目名称:ExoMedia,代码行数:24,代码来源:ExoMediaPlayer.java


示例10: LibvpxVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param scaleToFit Whether video frames should be scaled to fit when rendering.
 * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
 *     can attempt to seamlessly join an ongoing playback.
 * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
 *     null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
 *     invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
 * @param drmSessionManager For use with encrypted media. May be null if support for encrypted
 *     media is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 */
public LibvpxVideoRenderer(boolean scaleToFit, long allowedJoiningTimeMs,
    Handler eventHandler, VideoRendererEventListener eventListener,
    int maxDroppedFramesToNotify, DrmSessionManager<ExoMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys) {
  super(C.TRACK_TYPE_VIDEO);
  this.scaleToFit = scaleToFit;
  this.allowedJoiningTimeMs = allowedJoiningTimeMs;
  this.maxDroppedFramesToNotify = maxDroppedFramesToNotify;
  this.drmSessionManager = drmSessionManager;
  this.playClearSamplesWithoutKeys = playClearSamplesWithoutKeys;
  joiningDeadlineMs = C.TIME_UNSET;
  clearReportedVideoSize();
  formatHolder = new FormatHolder();
  flagsOnlyBuffer = DecoderInputBuffer.newFlagsOnlyInstance();
  eventDispatcher = new EventDispatcher(eventHandler, eventListener);
  outputMode = VpxDecoder.OUTPUT_MODE_NONE;
  decoderReinitializationState = REINITIALIZATION_STATE_NONE;
}
 
开发者ID:y20k,项目名称:transistor,代码行数:36,代码来源:LibvpxVideoRenderer.java


示例11: MediaCodecRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param trackType The track type that the renderer handles. One of the {@code C.TRACK_TYPE_*}
 *     constants defined in {@link C}.
 * @param mediaCodecSelector A decoder selector.
 * @param drmSessionManager For use with encrypted media. May be null if support for encrypted
 *     media is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 */
public MediaCodecRenderer(int trackType, MediaCodecSelector mediaCodecSelector,
    @Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys) {
  super(trackType);
  Assertions.checkState(Util.SDK_INT >= 16);
  this.mediaCodecSelector = Assertions.checkNotNull(mediaCodecSelector);
  this.drmSessionManager = drmSessionManager;
  this.playClearSamplesWithoutKeys = playClearSamplesWithoutKeys;
  buffer = new DecoderInputBuffer(DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED);
  flagsOnlyBuffer = DecoderInputBuffer.newFlagsOnlyInstance();
  formatHolder = new FormatHolder();
  decodeOnlyPresentationTimestamps = new ArrayList<>();
  outputBufferInfo = new MediaCodec.BufferInfo();
  codecReconfigurationState = RECONFIGURATION_STATE_NONE;
  codecReinitializationState = REINITIALIZATION_STATE_NONE;
}
 
开发者ID:y20k,项目名称:transistor,代码行数:29,代码来源:MediaCodecRenderer.java


示例12: MediaCodecVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
/**
 * @param context A context.
 * @param mediaCodecSelector A decoder selector.
 * @param allowedJoiningTimeMs The maximum duration in milliseconds for which this video renderer
 *     can attempt to seamlessly join an ongoing playback.
 * @param drmSessionManager For use with encrypted content. May be null if support for encrypted
 *     content is not required.
 * @param playClearSamplesWithoutKeys Encrypted media may contain clear (un-encrypted) regions.
 *     For example a media file may start with a short clear region so as to allow playback to
 *     begin in parallel with key acquisition. This parameter specifies whether the renderer is
 *     permitted to play clear regions of encrypted media files before {@code drmSessionManager}
 *     has obtained the keys necessary to decrypt encrypted regions of the media.
 * @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
 *     null if delivery of events is not required.
 * @param eventListener A listener of events. May be null if delivery of events is not required.
 * @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
 *     invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
 */
public MediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector,
    long allowedJoiningTimeMs,
    @Nullable DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    boolean playClearSamplesWithoutKeys, @Nullable Handler eventHandler,
    @Nullable VideoRendererEventListener eventListener, int maxDroppedFramesToNotify) {
  super(C.TRACK_TYPE_VIDEO, mediaCodecSelector, drmSessionManager, playClearSamplesWithoutKeys);
  this.allowedJoiningTimeMs = allowedJoiningTimeMs;
  this.maxDroppedFramesToNotify = maxDroppedFramesToNotify;
  this.context = context.getApplicationContext();
  frameReleaseTimeHelper = new VideoFrameReleaseTimeHelper(context);
  eventDispatcher = new EventDispatcher(eventHandler, eventListener);
  deviceNeedsAutoFrcWorkaround = deviceNeedsAutoFrcWorkaround();
  pendingOutputStreamOffsetsUs = new long[MAX_PENDING_OUTPUT_STREAM_OFFSET_COUNT];
  outputStreamOffsetUs = C.TIME_UNSET;
  joiningDeadlineMs = C.TIME_UNSET;
  currentWidth = Format.NO_VALUE;
  currentHeight = Format.NO_VALUE;
  currentPixelWidthHeightRatio = Format.NO_VALUE;
  pendingPixelWidthHeightRatio = Format.NO_VALUE;
  scalingMode = C.VIDEO_SCALING_MODE_DEFAULT;
  clearReportedVideoSize();
}
 
开发者ID:y20k,项目名称:transistor,代码行数:41,代码来源:MediaCodecVideoRenderer.java


示例13: setUp

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  MockitoAnnotations.initMocks(this);
  audioRenderer = new SimpleDecoderAudioRenderer(null, null, null, false, mockAudioSink) {
    @Override
    protected int supportsFormatInternal(DrmSessionManager<ExoMediaCrypto> drmSessionManager,
        Format format) {
      return FORMAT_HANDLED;
    }

    @Override
    protected SimpleDecoder<DecoderInputBuffer, ? extends SimpleOutputBuffer,
        ? extends AudioDecoderException> createDecoder(Format format, ExoMediaCrypto mediaCrypto)
        throws AudioDecoderException {
      return new FakeDecoder();
    }
  };
}
 
开发者ID:y20k,项目名称:transistor,代码行数:19,代码来源:SimpleDecoderAudioRendererTest.java


示例14: buildDrmSessionManager

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
private DrmSessionManager<FrameworkMediaCrypto> buildDrmSessionManager(UUID uuid,
                                                                       String licenseUrl, Map<String, String> keyRequestProperties) throws UnsupportedDrmException {
    if (Util.SDK_INT < 18) {
        return null;
    }
    HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
            buildHttpDataSourceFactory(false), keyRequestProperties);
    return new DefaultDrmSessionManager<>(uuid,
            FrameworkMediaDrm.newInstance(uuid), drmCallback, null, mainHandler, eventLogger);
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:11,代码来源:PlayerActivity.java


示例15: buildVideoRenderers

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Override
protected void buildVideoRenderers(Context context, Handler mainHandler,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    @ExtensionRendererMode int extensionRendererMode, VideoRendererEventListener eventListener,
    long allowedVideoJoiningTimeMs, ArrayList<Renderer> out) {
  out.add(new DebugMediaCodecVideoRenderer(context, MediaCodecSelector.DEFAULT,
      allowedVideoJoiningTimeMs, mainHandler, drmSessionManager, eventListener,
      MAX_DROPPED_VIDEO_FRAME_COUNT_TO_NOTIFY));
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:10,代码来源:DebugSimpleExoPlayer.java


示例16: DebugMediaCodecVideoRenderer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
public DebugMediaCodecVideoRenderer(Context context, MediaCodecSelector mediaCodecSelector,
    long allowedJoiningTimeMs, Handler eventHandler,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
    VideoRendererEventListener eventListener, int maxDroppedFrameCountToNotify) {
  super(context, mediaCodecSelector, allowedJoiningTimeMs, drmSessionManager, false,
      eventHandler, eventListener, maxDroppedFrameCountToNotify);
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:8,代码来源:DebugSimpleExoPlayer.java


示例17: buildExoPlayer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@SuppressWarnings("unused")
protected SimpleExoPlayer buildExoPlayer(HostActivity host, Surface surface,
    MappingTrackSelector trackSelector,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager) {
  SimpleExoPlayer player = ExoPlayerFactory.newSimpleInstance(host, trackSelector,
      new DefaultLoadControl(), drmSessionManager, SimpleExoPlayer.EXTENSION_RENDERER_MODE_OFF,
      0);
  player.setVideoSurface(surface);
  return player;
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:11,代码来源:ExoHostedTest.java


示例18: buildExoPlayer

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Override
protected SimpleExoPlayer buildExoPlayer(HostActivity host, Surface surface,
    MappingTrackSelector trackSelector,
    DrmSessionManager<FrameworkMediaCrypto> drmSessionManager) {
  SimpleExoPlayer player = new DebugSimpleExoPlayer(host, trackSelector,
      new DefaultLoadControl(), drmSessionManager);
  player.setVideoSurface(surface);
  return player;
}
 
开发者ID:ashwanijanghu,项目名称:ExoPlayer-Offline,代码行数:10,代码来源:DashTest.java


示例19: create

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Override
public DrmSessionManager<FrameworkMediaCrypto> create(DefaultDrmSessionManager.EventListener eventListener) {
    return new LocalDrmSessionManager(
            downloadedModularDrm.getKeySetId(),
            mediaDrmCreator.create(WIDEVINE_MODULAR_UUID),
            WIDEVINE_MODULAR_UUID,
            handler,
            eventListener
    );
}
 
开发者ID:novoda,项目名称:no-player,代码行数:11,代码来源:DownloadDrmSessionCreator.java


示例20: create

import com.google.android.exoplayer2.drm.DrmSessionManager; //导入依赖的package包/类
@Override
public DrmSessionManager<FrameworkMediaCrypto> create(DefaultDrmSessionManager.EventListener eventListener) {
    FrameworkMediaDrm frameworkMediaDrm = frameworkMediaDrmCreator.create(WIDEVINE_MODULAR_UUID);

    return new DefaultDrmSessionManager<>(
            WIDEVINE_MODULAR_UUID,
            frameworkMediaDrm,
            mediaDrmCallback,
            NO_OPTIONAL_PARAMETERS,
            handler,
            eventListener
    );
}
 
开发者ID:novoda,项目名称:no-player,代码行数:14,代码来源:StreamingDrmSessionCreator.java



注:本文中的com.google.android.exoplayer2.drm.DrmSessionManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ItemVisitor类代码示例发布时间:2022-05-22
下一篇:
Java AngleUnit类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap