Java 类com.google.android.exoplayer.drm.MediaDrmCallback 实例源码

项目:androidtv-sample    文件:PlaybackOverlayFragment.java   
private VideoPlayer.RendererBuilder getRendererBuilder() {
    String userAgent = Util.getUserAgent(getActivity(), "ExoVideoPlayer");
    Uri contentUri = Uri.parse(mSelectedVideo.videoUrl);
    int contentType = Util.inferContentType(contentUri.getLastPathSegment());

    switch (contentType) {
        case Util.TYPE_OTHER: {
            return new ExtractorRendererBuilder(getActivity(), userAgent, contentUri);
        }
        case Util.TYPE_DASH: {
            // Implement your own DRM callback here.
            MediaDrmCallback drmCallback = new WidevineTestMediaDrmCallback(null, null);
            return new DashRendererBuilder(getActivity(), userAgent, contentUri.toString(),
                    drmCallback);
        }
        case Util.TYPE_HLS: {
            return new HlsRendererBuilder(getActivity(), userAgent, contentUri.toString());
        }


        default: {
            throw new IllegalStateException("Unsupported type: " + contentType);
        }
    }
}
项目:player-sdk-native-android    文件:RendererBuilderFactory.java   
/**
 * Create a renderer builder which can build the given video.
 * @param ctx The context (ex {@link android.app.Activity} in whicb the video has been created.
 * @param video The video which will be played.
 * @param mediaDrmCallback DRM Callback.
 * @param preferSoftwareDecoder true if softwareDecoder is requred.
 */
public static ExoplayerWrapper.RendererBuilder createRendererBuilder(Context ctx,
                                                                     Video video,
                                                                     MediaDrmCallback mediaDrmCallback,
                                                                     boolean preferSoftwareDecoder) {
  switch (video.getVideoType()) {
    case HLS:
      return new HlsRendererBuilder(ctx, ExoplayerUtil.getUserAgent(ctx),
                                    video.getUrl());
    case DASH:
      return new DashRendererBuilder(ctx, ExoplayerUtil.getUserAgent(ctx),
                                     video.getUrl(),
                                     mediaDrmCallback);
    case MP4:
      return new ExtractorRendererBuilder(ctx, ExoplayerUtil.getUserAgent(ctx), Uri.parse(video.getUrl()), preferSoftwareDecoder);
    case OTHER:
      return new ExtractorRendererBuilder(ctx, ExoplayerUtil.getUserAgent(ctx), Uri.parse(video.getUrl()), preferSoftwareDecoder);
    default:
      return null;
  }
}
项目:androidtv-sample    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
                           MediaDrmCallback drmCallback) {
    this.context = context;
    this.userAgent = userAgent;
    this.url = url;
    this.drmCallback = drmCallback;
}
项目:androidtv-sample    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, DemoPlayer player) {
    this.context = context;
    this.userAgent = userAgent;
    this.drmCallback = drmCallback;
    this.player = player;
    MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
    manifestDataSource = new DefaultUriDataSource(context, userAgent);
    manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:androidtv-sample    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
        MediaDrmCallback drmCallback) {
    this.context = context;
    this.userAgent = userAgent;
    this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
    this.drmCallback = drmCallback;
}
项目:androidtv-sample    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
        MediaDrmCallback drmCallback, DemoPlayer player) {
    this.context = context;
    this.userAgent = userAgent;
    this.drmCallback = drmCallback;
    this.player = player;
    SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
    manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
            parser);
}
项目:androidtv-sample    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
                           MediaDrmCallback drmCallback) {
    this.context = context;
    this.userAgent = userAgent;
    this.url = url;
    this.drmCallback = drmCallback;
}
项目:androidtv-sample    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, VideoPlayer player) {
    this.context = context;
    this.userAgent = userAgent;
    this.drmCallback = drmCallback;
    this.player = player;
    MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
    manifestDataSource = new DefaultUriDataSource(context, userAgent);
    manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:AndroidTvDemo    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:AndroidTvDemo    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:AndroidTvDemo    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:AndroidTvDemo    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:ShaddockVideoPlayer    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:ShaddockVideoPlayer    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:ShaddockVideoPlayer    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:ShaddockVideoPlayer    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:ExoPlayerController    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:ExoPlayerController    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:ExoPlayerController    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:ExoPlayerController    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:FriendsCameraSDK-android    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:FriendsCameraSDK-android    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:FriendsCameraSDK-android    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:FriendsCameraSDK-android    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:talk-android    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:talk-android    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:talk-android    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:talk-android    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:OKPlayer    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:OKPlayer    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:OKPlayer    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:OKPlayer    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, DemoPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:miku    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
                           MediaDrmCallback drmCallback, AudioCapabilities audioCapabilities) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
  this.audioCapabilities = audioCapabilities;
}
项目:miku    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, AudioCapabilities audioCapabilities, MediaPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.audioCapabilities = audioCapabilities;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:miku    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
                                      MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:miku    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
                            MediaDrmCallback drmCallback, MediaPlayer player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}
项目:Mediathek    文件:DashRendererBuilder.java   
public DashRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = url;
  this.drmCallback = drmCallback;
}
项目:Mediathek    文件:DashRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, Player player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  MediaPresentationDescriptionParser parser = new MediaPresentationDescriptionParser();
  manifestDataSource = new DefaultUriDataSource(context, userAgent);
  manifestFetcher = new ManifestFetcher<>(url, manifestDataSource, parser);
}
项目:Mediathek    文件:SmoothStreamingRendererBuilder.java   
public SmoothStreamingRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback) {
  this.context = context;
  this.userAgent = userAgent;
  this.url = Util.toLowerInvariant(url).endsWith("/manifest") ? url : url + "/Manifest";
  this.drmCallback = drmCallback;
}
项目:Mediathek    文件:SmoothStreamingRendererBuilder.java   
public AsyncRendererBuilder(Context context, String userAgent, String url,
    MediaDrmCallback drmCallback, Player player) {
  this.context = context;
  this.userAgent = userAgent;
  this.drmCallback = drmCallback;
  this.player = player;
  SmoothStreamingManifestParser parser = new SmoothStreamingManifestParser();
  manifestFetcher = new ManifestFetcher<>(url, new DefaultHttpDataSource(userAgent, null),
      parser);
}