Wasabi ExpressPlay SDK for iOS  1.23.0
WsbPlaylistProxy.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Playlist Proxy, C interface
4 |
5 | $Id: WsbPlaylistProxy.h 13807 2018-02-09 10:12:46Z nbanda $
6 | Original author: Edin Hodzic ([email protected])
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2011-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_PLAYLIST_PROXY_H_
22 #define _WSB_PLAYLIST_PROXY_H_
23 
46 /*----------------------------------------------------------------------
47  | includes
48  +---------------------------------------------------------------------*/
49 #include "WsbResults.h"
50 #include "WsbTypes.h"
51 
52 /*----------------------------------------------------------------------
53 | types
54 +---------------------------------------------------------------------*/
55 
56 
63 
80 typedef enum {
81 
84 
87 
90 
92 
97 typedef enum {
106 
111 typedef struct {
112 
115  const char* source_content_type;
116 
120  const char* content_type;
121 
126  unsigned int duration_seconds;
127 
130  unsigned int bitrate_bps;
131 
133  const char* language;
134 
145  const char* audio_codecs;
146 
157  const char* video_codecs;
158 
163  const char* bbts_index_url;
164 
173 
179 
188 
194 
203 
216 
230 
237  const char* subtitle_name;
238 
247  const char* subtitle_lang;
248 
256  const char* subtitle_url;
257 
259 
263 typedef enum {
268 
274 typedef enum {
278 
285 typedef struct {
289 
299 typedef struct {
302 
305 
307  const char* error_string;
309 
323 typedef struct {
324  void* instance;
325  void (*handler)(void* instance, const WSB_PlaylistProxy_Event* event);
327 
328 /*----------------------------------------------------------------------
329 | functions
330 +---------------------------------------------------------------------*/
331 
332 #if defined(__cplusplus)
333 extern "C" {
334 #endif
335 
347 WSB_EXPORT WSB_Result
349 
364 #define WSB_PP_FLAG_ENCRYPTED_HLS (1<<0)
365 
374 #define WSB_PP_FLAG_AUTH_TOKEN_HEADER (1<<1)
375 
389 #define WSB_PP_FLAG_SESSION_KEY (1<<2)
390 
398 #define WSB_PP_FLAG_BLOCK_FOR_LICENSE_IMPLICIT (1<<3)
399 
409 #define WSB_PP_FLAG_BLOCK_FOR_LICENSE_EXPLICIT (1<<4)
410 
415 #define WSB_PP_FLAG_NO_SHORT_URLS (1<<5)
416 
423 #define WSB_PP_FLAG_ALLOW_EXTERNAL_CLIENT (1<<6)
424 
434 #define WSB_PP_FLAG_FAIRPLAY_ENCRYPTED_HLS (1<<7)
435 
446 #define WSB_PP_FLAG_DEMUXED_HLS (1<<8)
447 
458 WSB_EXPORT WSB_Result
460 
485 WSB_EXPORT WSB_Result
487  const WSB_PlaylistProxy_EventListener listener,
488  WSB_PlaylistProxy** self);
489 
496 WSB_EXPORT WSB_Result
498 
504 WSB_EXPORT WSB_Result
506 
527 WSB_EXPORT WSB_Result
530  const void* license_data,
531  WSB_Size license_length);
532 
542 WSB_EXPORT WSB_Result
544 
561 WSB_EXPORT WSB_Result
563 
597 WSB_EXPORT WSB_Result
599  WSB_PlaylistProxy* self,
600  const char* media_source,
601  WSB_PlaylistProxy_MediaSourceType media_source_type,
602  const WSB_PlaylistProxy_MediaSourceParams* media_source_params,
603  const char** http_url);
604 
624 WSB_EXPORT WSB_Result
626  char* auth_token,
627  WSB_Size* token_size);
632 typedef enum {
638 
656 WSB_EXPORT WSB_Result
658  WSB_PlaylistProxySessionKeyFormat key_format,
659  WSB_Byte* key,
660  WSB_Size* key_size);
661 
664 #if defined(__cplusplus)
665 }
666 #endif
667 
668 #endif /* _WSB_PLAYLIST_PROXY_H_ */
const char * subtitle_url
Web VTT subtitles: Absolute URL of the WebVTT file.
Definition: WsbPlaylistProxy.h:256
const char * content_type
The URL response mime type.
Definition: WsbPlaylistProxy.h:120
WSB_PlaylistProxy_TrackSelector video_track_selector
Designate the index space referenced by video_track.
Definition: WsbPlaylistProxy.h:193
WSB_EXPORT WSB_Result WSB_PlaylistProxy_UnblockForLicense(WSB_PlaylistProxy *self, WSB_PlaylistProxy_LicenseType type, const void *license_data, WSB_Size license_length)
Notify the proxy to proceed with license lookup and evaluation.
Definition: WsbPlaylistProxy.h:266
const char * bbts_index_url
Optional BBTS Index URL.
Definition: WsbPlaylistProxy.h:163
const char * extra_content_access_http_headers
Additional HTTP headers passed in content access HTTP requests.
Definition: WsbPlaylistProxy.h:215
Event base class.
Definition: WsbPlaylistProxy.h:285
WSB_PlaylistProxy_Event base
Event base.
Definition: WsbPlaylistProxy.h:301
WSB_UInt32 audio_track
Audio track selected.
Definition: WsbPlaylistProxy.h:187
unsigned int duration_seconds
Required for BBTS without index as the content duration.
Definition: WsbPlaylistProxy.h:126
Playlist Proxy URL parameters.
Definition: WsbPlaylistProxy.h:111
WSB_EXPORT WSB_Result WSB_PlaylistProxy_GetAndClearLastError(WSB_PlaylistProxy *self)
Return the most recent Wasabi error (if any) detected by the proxy threads and clear it...
Any media track of the correct type.
Definition: WsbPlaylistProxy.h:99
WSB_EXPORT WSB_Result WSB_PlaylistProxy_GetAuthToken(WSB_PlaylistProxy *self, char *auth_token, WSB_Size *token_size)
Obtain the current Playlist Proxy authentication token.
WSB_EXPORT WSB_Result WSB_PlaylistProxy_Stop(WSB_PlaylistProxy *self)
Stop proxy execution.
WSB_PlaylistProxy_MediaSourceType
The media source type:
Definition: WsbPlaylistProxy.h:80
Specific track selected by the track index (0 based among all tracks).
Definition: WsbPlaylistProxy.h:104
unsigned int bitrate_bps
Required for BBTS without index, ignored for other content types.
Definition: WsbPlaylistProxy.h:130
const char * language
Language desired for the audio.
Definition: WsbPlaylistProxy.h:133
WSB_EXPORT WSB_Result WSB_PlaylistProxy_GetSessionKey(WSB_PlaylistProxy *self, WSB_PlaylistProxySessionKeyFormat key_format, WSB_Byte *key, WSB_Size *key_size)
Obtain the current Playlist Proxy session key.
const char * extra_client_http_headers
Additional HTTP headers passed from the Playlist Proxy to the HTTP client.
Definition: WsbPlaylistProxy.h:229
WSB_UInt32 video_track
Video track selected.
Definition: WsbPlaylistProxy.h:202
WSB_PlaylistProxy_LicenseType
Definition: WsbPlaylistProxy.h:263
Error notification event.
Definition: WsbPlaylistProxy.h:276
Error notification event.
Definition: WsbPlaylistProxy.h:299
Marlin HLS URL.
Definition: WsbPlaylistProxy.h:86
const char * subtitle_name
Web VTT subtitles: UTF-8 Subtitle track name.
Definition: WsbPlaylistProxy.h:237
Single Marlin content URL (BBTS with index, PDCF, M4F, or DCF)
Definition: WsbPlaylistProxy.h:83
WSB_Result result
Error result code.
Definition: WsbPlaylistProxy.h:304
struct WSB_PlaylistProxy WSB_PlaylistProxy
Definition: WsbPlaylistProxy.h:62
Marlin DASH URL.
Definition: WsbPlaylistProxy.h:89
WSB_EXPORT WSB_Result WSB_PlaylistProxy_CreateWithFlags(WSB_UInt32 flags, WSB_PlaylistProxy **self)
Create a playlist proxy instance with additional behavior selected through the flags.
Definition: WsbPlaylistProxy.h:264
Definition: WsbPlaylistProxy.h:265
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
const char * source_content_type
The source media mime type.
Definition: WsbPlaylistProxy.h:115
WSB_PlaylistProxySessionKeyFormat
The session key format enum.
Definition: WsbPlaylistProxy.h:632
WSB_PlaylistProxy_EventType
Event type.
Definition: WsbPlaylistProxy.h:274
SKB exported AES-128 key.
Definition: WsbPlaylistProxy.h:636
WSB_UInt8 WSB_Byte
An 8-bit byte.
Definition: WsbTypes.h:132
const char * video_codecs
Supported video codecs (MPEG DASH only).
Definition: WsbPlaylistProxy.h:157
WSB_PlaylistProxy_TrackSelector
Media track selector mode.
Definition: WsbPlaylistProxy.h:97
Clear AES-128 key.
Definition: WsbPlaylistProxy.h:634
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
Result codes.
WSB_EXPORT WSB_Result WSB_PlaylistProxy_Destroy(WSB_PlaylistProxy *self)
Destroy a playlist proxy instance.
const char * error_string
Optional error string.
Definition: WsbPlaylistProxy.h:307
WSB_EXPORT WSB_Result WSB_PlaylistProxy_MakeUrl(WSB_PlaylistProxy *self, const char *media_source, WSB_PlaylistProxy_MediaSourceType media_source_type, const WSB_PlaylistProxy_MediaSourceParams *media_source_params, const char **http_url)
Create an HTTP url that points to the proxy.
const char * audio_codecs
Supported audio codecs (MPEG DASH only).
Definition: WsbPlaylistProxy.h:145
WSB_EXPORT WSB_Result WSB_PlaylistProxy_Create(WSB_PlaylistProxy **self)
Create a playlist proxy instance.
This structure pairs a listener instance value with a function pointer for receiving events...
Definition: WsbPlaylistProxy.h:323
void * instance
Definition: WsbPlaylistProxy.h:324
WSB_EXPORT WSB_Result WSB_PlaylistProxy_Start(WSB_PlaylistProxy *self)
Start proxy execution.
const char * master_playlist_appendix
Additional contents to be appended to the master playlist produced by the proxy.
Definition: WsbPlaylistProxy.h:172
Specific track selected by the track ID.
Definition: WsbPlaylistProxy.h:101
WSB_EXPORT WSB_Result WSB_PlaylistProxy_CreateWithListener(WSB_UInt32 flags, const WSB_PlaylistProxy_EventListener listener, WSB_PlaylistProxy **self)
Create a playlist proxy instance with additional behavior selected through the flags and optional eve...
Wasabi Result.
WSB_UInt32 WSB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of a file).
Definition: WsbTypes.h:104
const char * subtitle_lang
Web VTT subtitles: RFC 5646 language code.
Definition: WsbPlaylistProxy.h:247
WSB_PlaylistProxy_TrackSelector audio_track_selector
Designate the index space referenced by audio_track.
Definition: WsbPlaylistProxy.h:178
WSB_PlaylistProxy_EventType type
Event type.
Definition: WsbPlaylistProxy.h:287