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.castlabs.media3.exoplayer.offline.FilterableManifest> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.castlabs.media3.exoplayer.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.castlabs.media3.exoplayer.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.voidsetRtpLatencyMs(long rtpLatencyMs) Sets the RTP latency (jitter buffer size) for GStreamer.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.castlabs.android.player.PlayerPlugin
createDrmLicenseManagers, setDrmLicenseManagers
-
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.
-
setRtpLatencyMs
public void setRtpLatencyMs(long rtpLatencyMs) Sets the RTP latency (jitter buffer size) for GStreamer.- Parameters:
rtpLatencyMs- The RTP latency in milliseconds, or C.TIME_UNSET for the default.
-
isFormatSupported
- Specified by:
isFormatSupportedin interfacePlayerPlugin
-
getRendererCapabilities
@Nullable public com.castlabs.media3.exoplayer.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
-
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.
-
createMediaSource
@NonNull public com.castlabs.media3.exoplayer.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.
-