Package com.castlabs.android.gstreamer
Class GStreamerPlayerPlugin
java.lang.Object
com.castlabs.android.gstreamer.GStreamerPlayerPlugin
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptioncom.google.android.exoplayer2.source.MediaSourcecreateMediaSource(PlayerConfig config, boolean attachInitialPositionProvider, PlayerController playerController) Creates a MediaSource for the given configuration.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) booleanisFormatSupported(int format, DrmConfiguration configuration) voidsetDebugThreshold(String debugThreshold) Sets the debug threshold for GStreamer.voidsetHdcpRxBlob(byte[] blob) Sets the HDCP RX blob for GStreamer.
-
Constructor Details
-
GStreamerPlayerPlugin
public GStreamerPlayerPlugin()Default constructor.
-
-
Method Details
-
setDebugThreshold
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
- Specified by:
isFormatSupportedin interfacePlayerPlugin
-
getRendererCapabilities
@Nullable public com.google.android.exoplayer2.RendererCapabilities[] getRendererCapabilities(@NonNull Context context, @Nullable DrmConfiguration drmConfiguration) - Specified by:
getRendererCapabilitiesin interfacePlayerPlugin
-
createDrmInitDataProvider
@Nullable public PlayerPlugin.DrmInitDataProvider createDrmInitDataProvider(@Nullable ManifestModifier unused) - Specified by:
createDrmInitDataProviderin interfacePlayerPlugin
-
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:
createMediaSourcein interfacePlayerPlugin- 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:
createRendererContainersin interfacePlayerPlugin- Parameters:
playerController- The player controller.drmConfiguration- The DRM configuration.- Returns:
- A list of TrackRendererContainers.
- Throws:
CastlabsPlayerException- If an error occurs while creating the renderers.
-