public class PlaylistProxy
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlaylistProxy.Flags
Proxy creation flags.
|
static class |
PlaylistProxy.LicenseType
The type of license provided by a string.
|
static class |
PlaylistProxy.MediaSourceParams
Playlist Proxy URL parameters.
|
static class |
PlaylistProxy.MediaSourceType
The media source type: a single Marlin file, or a Marlin HLS
playlist.
|
static class |
PlaylistProxy.SessionKeyFormat
The encrypted HLS session AES-128 key.
|
static class |
PlaylistProxy.TrackSelector
Media track selector mode.
|
Modifier and Type | Field and Description |
---|---|
static int |
MSG_TYPE_ERROR
Message type
|
Constructor and Description |
---|
PlaylistProxy()
PlaylistProxy constructor.
|
PlaylistProxy(java.util.EnumSet<PlaylistProxy.Flags> flags)
PlaylistProxy constructor with flags.
|
PlaylistProxy(java.util.EnumSet<PlaylistProxy.Flags> flags,
PlaylistProxyListener listener,
java.lang.Object handler)
PlaylistProxy constructor with flags, listener, and handler.
|
Modifier and Type | Method and Description |
---|---|
void |
getAndClearLastError()
Check the Playlist Proxy execution status.
|
java.lang.String |
getAuthToken()
Obtain the current Playlist Proxy authentication token.
|
long |
getNativeHandle()
Get native handle.
|
byte[] |
getSessionKey(PlaylistProxy.SessionKeyFormat format)
Obtain the encrypted HLS session key.
|
java.lang.String |
makeUrl(java.lang.String mediaSource,
PlaylistProxy.MediaSourceType mediaSourceType,
PlaylistProxy.MediaSourceParams mediaSourceParams)
Make a Playlist Proxy URL.
|
void |
start()
Start running playlist proxy.
|
void |
stop()
Stop running playlist proxy.
|
void |
unblockForLicense()
Notify the proxy to proceed with license lookup and evaluation.
|
void |
unblockForLicense(PlaylistProxy.LicenseType type,
java.lang.String data)
Notify the proxy to proceed with license evaluation, using the
provided license data.
|
public static final int MSG_TYPE_ERROR
public PlaylistProxy(java.util.EnumSet<PlaylistProxy.Flags> flags, PlaylistProxyListener listener, java.lang.Object handler) throws ErrorCodeException, java.lang.NullPointerException
For Android, caller passes in either null or an android.os.Handler instance for the handler argument. When both listener and handler are passed in, the Playlist Proxy message is posted to the thread/queue associated with the handler. If only listener is passed in but handler is null, the Playlist Proxy message triggers the call to the listener method directly in a separate messaging thread.
For Linux, the handler argument is not used. When a listener is passed in, the Playlist Proxy message triggers the call to the listener method directly in a separate messaging thread.
ErrorCodeException
java.lang.NullPointerException
PlaylistProxyListener
public PlaylistProxy(java.util.EnumSet<PlaylistProxy.Flags> flags) throws ErrorCodeException
ErrorCodeException
PlaylistProxy.Flags
public PlaylistProxy() throws ErrorCodeException
ErrorCodeException
public void start() throws ErrorCodeException
stop()
ErrorCodeException
public void stop() throws ErrorCodeException
ErrorCodeException
public java.lang.String getAuthToken() throws ErrorCodeException
AUTH_TOKEN_HEADER
macro for additional information.ErrorCodeException
public void getAndClearLastError() throws ErrorCodeException
ErrorCodeException
public java.lang.String makeUrl(java.lang.String mediaSource, PlaylistProxy.MediaSourceType mediaSourceType, PlaylistProxy.MediaSourceParams mediaSourceParams) throws ErrorCodeException
mediaSource
- path or URL to the Marlin media sourcemediaSourceType
- mime type of the original mediamediaSourceParams
- url parameters, can be null.
However, in the case of SINGLE_FILE MediaSourceType, the
sourceContentType must be set to select between BBTS
("video/mp2t"), PDCF or M4F ("video/mp4") and DCF
(application/vnd.oma.drm.dcf).
NOTE: the BB license or MS3 SAS used with DCF must relax
the default Marlin output controls or the content will
not be decrypted. This requires the SAS to carry an MS3
extension (of type 'wudo') or a the Marlin Broadband
license to indicate a Marlin Broadband output control
override (type
'urn:marlin:organization:intertrust:wudo').ErrorCodeException
public void unblockForLicense() throws ErrorCodeException
BLOCK_FOR_LICENSE_EXPLICIT
flag.ErrorCodeException
PlaylistProxy.Flags.BLOCK_FOR_LICENSE_EXPLICIT
public void unblockForLicense(PlaylistProxy.LicenseType type, java.lang.String data) throws ErrorCodeException
BLOCK_FOR_LICENSE_EXPLICIT
flag.type
- license type, corresponding to the datadata
- the license dataErrorCodeException
PlaylistProxy.Flags.BLOCK_FOR_LICENSE_EXPLICIT
public byte[] getSessionKey(PlaylistProxy.SessionKeyFormat format) throws ErrorCodeException
PlaylistProxy.Flags.ENCRYPTED_HLS
flag.ErrorCodeException
PlaylistProxy.Flags.ENCRYPTED_HLS
,
PlaylistProxy.Flags.SESSION_KEY
public long getNativeHandle()