Package com.castlabs.android.gstreamer

# 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.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.castlabs.android.player.PlayerPlugin

  `PlayerPlugin.DrmInitDataProvider<T extends com.google.android.exoplayer2.offline.FilterableManifest>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GStreamerPlayerPlugin()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PlayerPlugin.DrmInitDataProvider`
  `createDrmInitDataProvider(ManifestModifier unused)`
  `com.google.android.exoplayer2.source.MediaSource`
  `createMediaSource(PlayerConfig config, boolean attachInitialPositionProvider, PlayerController playerController)`
  Creates a MediaSource for the given configuration.
  `List<TrackRendererPlugin.TrackRendererContainer>`
  `createRendererContainers(PlayerController playerController, DrmConfiguration drmConfiguration)`
  Creates a list of TrackRendererContainers for the given player controller and DRM configuration.
  `com.google.android.exoplayer2.RendererCapabilities[]`
  `getRendererCapabilities(Context context, DrmConfiguration drmConfiguration)`
  `boolean`
  `isFormatSupported(int format, DrmConfiguration configuration)`
  `void`
  `setDebugThreshold(String debugThreshold)`
  Sets the debug threshold for GStreamer.
  `void`
  `setHdcpRxBlob(byte[] blob)`
  Sets the HDCP RX blob for GStreamer.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.castlabs.android.player.PlayerPlugin

  `createDrmLicenseManagers`

- ## 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.