Package com.castlabs.sdk.debug
Class DebugPlugin
java.lang.Object
com.castlabs.android.Plugin
com.castlabs.sdk.debug.DebugPlugin
This plugin can be registered with
PlayerSDK.register(Plugin)
to enable
additional debug logs.
Instances of the debug plugin can be created using the DebugPlugin.Builder
. The builder is also
used to configure the plugin and its logging capabilities. For example:
PlayerSDK.register(new DebugPlugin.Builder()
.logOpenBundle(true)
.get()
);
The debug plugin does also expose a rate limiter that can be enabled with
DebugPlugin.Builder.enableRateLimiter(boolean, long)
and accessed at runtime with
DebugPlugin debugPlugin = PlayerSDK.getPlugin(DebugPlugin.class);
if (debugPlugin != null) {
RateLimiter rateLimiter = debugPlugin.getRateLimiter();
}
The features of this plugin can be enabled or disabled after it registered to the
PlayerSDK
. For example to enable the rate limiter:
DebugPlugin debugPlugin = PlayerSDK.getPlugin(DebugPlugin.class);
if (debugPlugin != null) {
debugPlugin.setRateLimiterEnabled(true);
}
Or the debug overlay could be shown or hidden after registration. The position of
the debug overlay could also be changed. For example:
debugPlugin.setDebugOverlayPosition(debugOverlayPosition);
debugPlugin.hideDebugOverlay();
The debug overlay should be enabled before registration in order to show, hide or
change the position of it.- Since:
- 4.1.11
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Use this builder to create new instances of theDebugPlugin
.static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
final boolean
final long
-
Method Summary
Modifier and TypeMethodDescriptionGetter for debugOverlayPositiongetId()
boolean
Getter for logAudioRendererEventsboolean
Getter for logDecoderCountersboolean
Getter for logDownloadCanceledboolean
Getter for logDownloadCompletedboolean
Getter for logDownloadErrorboolean
Getter for logDownloadStartedboolean
Getter for logDownloadUpstreamDiscardedboolean
Getter for logLoadControlboolean
Getter for logOpenBundleboolean
Getter for logPeriodInfoboolean
Getter for logSupportedDrmboolean
boolean
Getter for logTransferInfoboolean
Getter for logVideoRendererEventsReturns the rate limiter if it was enabled or nullboolean
Getter for rateLimiterEnabledvoid
hides the debug overlayvoid
setDebugOverlayPosition
(DebugPlugin.DebugOverlayPosition debugOverlayPosition) Setter for debugOverlayPositionvoid
setLogAudioRendererEvents
(boolean logAudioRendererEvents) Setter for logAudioRendererEventsvoid
setLogDecoderCounters
(boolean logDecoderCounters) Setter for logDecoderCountersvoid
setLogDownloadCanceled
(boolean logDownloadCanceled) Setter for logDownloadCanceledvoid
setLogDownloadCompleted
(boolean logDownloadCompleted) Setter for logDownloadCompletedvoid
setLogDownloadError
(boolean logDownloadError) Setter for logDownloadErrorvoid
setLogDownloadStarted
(boolean logDownloadStarted) Setter for logDownloadStartedvoid
setLogDownloadUpstreamDiscarded
(boolean logDownloadUpstreamDiscarded) Setter for logDownloadUpstreamDiscardedvoid
setLogLoadControl
(boolean logLoadControl) Setter for logLoadControlvoid
setLogOpenBundle
(boolean logOpenBundle) Setter for logOpenBundlevoid
setLogPeriodInfo
(boolean logPeriodInfo) Setter for logPeriodInfovoid
setLogSupportedDrm
(boolean logSupportedDrm) Setter for logSupportedDrmvoid
setLogTimingDebugInfo
(boolean logTimingDebugInfo) Log timing info related to playback.void
setLogTransferInfo
(boolean logTransferInfo) Setter for logTransferInfovoid
setLogVideoRendererEvents
(boolean logVideoRendererEvents) Setter for logVideoRendererEventsvoid
setRateLimiterEnabled
(boolean rateLimiterEnabled) Setter for rateLimiterEnabledvoid
Shows the debug overlayMethods inherited from class com.castlabs.android.Plugin
init, onRemotePlay
-
Field Details
-
DEBUG_OVERLAY_ID
@IdRes public static final int DEBUG_OVERLAY_ID -
enableDebugOverlay
public final boolean enableDebugOverlay -
initialRateLimitBps
public final long initialRateLimitBps -
logRequestTypes
-
logResponseTypes
-
-
Method Details
-
getLogOpenBundle
public boolean getLogOpenBundle()Getter for logOpenBundle- Returns:
- logOpenBundle
-
setLogOpenBundle
public void setLogOpenBundle(boolean logOpenBundle) Setter for logOpenBundle- Parameters:
logOpenBundle
- Sets this value to the property
-
getLogDownloadStarted
public boolean getLogDownloadStarted()Getter for logDownloadStarted- Returns:
- logDownloadStarted
-
setLogDownloadStarted
public void setLogDownloadStarted(boolean logDownloadStarted) Setter for logDownloadStarted- Parameters:
logDownloadStarted
- Sets this value to the property
-
getLogDownloadCompleted
public boolean getLogDownloadCompleted()Getter for logDownloadCompleted- Returns:
- logDownloadCompleted
-
setLogDownloadCompleted
public void setLogDownloadCompleted(boolean logDownloadCompleted) Setter for logDownloadCompleted- Parameters:
logDownloadCompleted
- Sets this value to the property
-
getLogDownloadCanceled
public boolean getLogDownloadCanceled()Getter for logDownloadCanceled- Returns:
- logDownloadCanceled
-
setLogDownloadCanceled
public void setLogDownloadCanceled(boolean logDownloadCanceled) Setter for logDownloadCanceled- Parameters:
logDownloadCanceled
- Sets this value to the property
-
getLogDownloadUpstreamDiscarded
public boolean getLogDownloadUpstreamDiscarded()Getter for logDownloadUpstreamDiscarded- Returns:
- logDownloadUpstreamDiscarded
-
setLogDownloadUpstreamDiscarded
public void setLogDownloadUpstreamDiscarded(boolean logDownloadUpstreamDiscarded) Setter for logDownloadUpstreamDiscarded- Parameters:
logDownloadUpstreamDiscarded
- Sets this value to the property
-
getLogDownloadError
public boolean getLogDownloadError()Getter for logDownloadError- Returns:
- logDownloadError
-
setLogDownloadError
public void setLogDownloadError(boolean logDownloadError) Setter for logDownloadError- Parameters:
logDownloadError
- Sets this value to the property
-
getLogVideoRendererEvents
public boolean getLogVideoRendererEvents()Getter for logVideoRendererEvents- Returns:
- logVideoRendererEvents
-
setLogVideoRendererEvents
public void setLogVideoRendererEvents(boolean logVideoRendererEvents) Setter for logVideoRendererEvents- Parameters:
logVideoRendererEvents
- Sets this value to the property
-
getLogAudioRendererEvents
public boolean getLogAudioRendererEvents()Getter for logAudioRendererEvents- Returns:
- logAudioRendererEvents
-
setLogAudioRendererEvents
public void setLogAudioRendererEvents(boolean logAudioRendererEvents) Setter for logAudioRendererEvents- Parameters:
logAudioRendererEvents
- Sets this value to the property
-
getLogDecoderCounters
public boolean getLogDecoderCounters()Getter for logDecoderCounters- Returns:
- logDecoderCounters
-
setLogDecoderCounters
public void setLogDecoderCounters(boolean logDecoderCounters) Setter for logDecoderCounters- Parameters:
logDecoderCounters
- Sets this value to the property
-
getLogTransferInfo
public boolean getLogTransferInfo()Getter for logTransferInfo- Returns:
- logTransferInfo
-
setLogTransferInfo
public void setLogTransferInfo(boolean logTransferInfo) Setter for logTransferInfo- Parameters:
logTransferInfo
- Sets this value to the property
-
getLogTimingDebugInfo
public boolean getLogTimingDebugInfo()- Returns:
- whether timing info logging is enabled
-
setLogTimingDebugInfo
public void setLogTimingDebugInfo(boolean logTimingDebugInfo) Log timing info related to playback. This is particularly helpful for live streams- Parameters:
logTimingDebugInfo
- set whether to log timing info
-
getLogPeriodInfo
public boolean getLogPeriodInfo()Getter for logPeriodInfo- Returns:
- logPeriodInfo
-
setLogPeriodInfo
public void setLogPeriodInfo(boolean logPeriodInfo) Setter for logPeriodInfo- Parameters:
logPeriodInfo
- Sets this value to the property
-
getLogSupportedDrm
public boolean getLogSupportedDrm()Getter for logSupportedDrm- Returns:
- logSupportedDrm
-
setLogSupportedDrm
public void setLogSupportedDrm(boolean logSupportedDrm) Setter for logSupportedDrm- Parameters:
logSupportedDrm
- Sets this value to the property
-
getLogLoadControl
public boolean getLogLoadControl()Getter for logLoadControl- Returns:
- logLoadControl
-
setLogLoadControl
public void setLogLoadControl(boolean logLoadControl) Setter for logLoadControl- Parameters:
logLoadControl
- Sets this value to the property
-
getRateLimiterEnabled
public boolean getRateLimiterEnabled()Getter for rateLimiterEnabled- Returns:
- rateLimiterEnabled
-
setRateLimiterEnabled
public void setRateLimiterEnabled(boolean rateLimiterEnabled) Setter for rateLimiterEnabled- Parameters:
rateLimiterEnabled
- Sets this value to the property
-
getDebugOverlayPosition
Getter for debugOverlayPosition- Returns:
- debugOverlayPosition
-
setDebugOverlayPosition
Setter for debugOverlayPosition- Parameters:
debugOverlayPosition
- Sets this value to the property
-
showDebugOverlay
public void showDebugOverlay()Shows the debug overlay -
hideDebugOverlay
public void hideDebugOverlay()hides the debug overlay -
getId
-
getRateLimiter
Returns the rate limiter if it was enabled or null- Returns:
- rate limiter or null
-