Class GStreamerPlayerPlugin

java.lang.Object
com.castlabs.android.gstreamer.GStreamerPlayerPlugin
All Implemented Interfaces:
PlayerPlugin

public class GStreamerPlayerPlugin extends Object implements PlayerPlugin
PlayerPlugin implementation for GStreamer based playback.
  • Constructor Details

    • GStreamerPlayerPlugin

      public GStreamerPlayerPlugin()
      Default constructor.
  • Method Details

    • setDebugThreshold

      public void setDebugThreshold(@Nullable String debugThreshold)
      Sets the debug threshold for GStreamer.
      Parameters:
      debugThreshold - The debug threshold to set.
    • setHdcpRxBlob

      public void setHdcpRxBlob(@Nullable byte[] blob)
      Sets the HDCP RX blob for GStreamer.
      Parameters:
      blob - The HDCP RX blob to set.
    • isFormatSupported

      public boolean isFormatSupported(int format, @Nullable DrmConfiguration configuration)
      Specified by:
      isFormatSupported in interface PlayerPlugin
    • getRendererCapabilities

      @Nullable public com.google.android.exoplayer2.RendererCapabilities[] getRendererCapabilities(@NonNull Context context, @Nullable DrmConfiguration drmConfiguration)
      Specified by:
      getRendererCapabilities in interface PlayerPlugin
    • createDrmInitDataProvider

      @Nullable public PlayerPlugin.DrmInitDataProvider createDrmInitDataProvider(@Nullable ManifestModifier unused)
      Specified by:
      createDrmInitDataProvider in interface PlayerPlugin
    • createMediaSource

      @NonNull public com.google.android.exoplayer2.source.MediaSource createMediaSource(@NonNull PlayerConfig config, boolean attachInitialPositionProvider, @NonNull PlayerController playerController)
      Creates a MediaSource for the given configuration.
      Specified by:
      createMediaSource in interface PlayerPlugin
      Parameters:
      config - The player configuration.
      attachInitialPositionProvider - Whether to attach an initial position provider.
      playerController - The player controller.
      Returns:
      The created MediaSource.
    • createRendererContainers

      @NonNull public List<TrackRendererPlugin.TrackRendererContainer> createRendererContainers(@NonNull PlayerController playerController, @Nullable DrmConfiguration drmConfiguration) throws CastlabsPlayerException
      Creates a list of TrackRendererContainers for the given player controller and DRM configuration.
      Specified by:
      createRendererContainers in interface PlayerPlugin
      Parameters:
      playerController - The player controller.
      drmConfiguration - The DRM configuration.
      Returns:
      A list of TrackRendererContainers.
      Throws:
      CastlabsPlayerException - If an error occurs while creating the renderers.