Wasabi ExpressPlay SDK for iOS  1.23.0
WsbMediaSegmentDecrypter.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Marlin Media Segment Decrypter
4 |
5 | $Id: WsbMediaSegmentDecrypter.h 12515 2016-06-22 21:20:22Z hwa $
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) 2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
16 
23 #ifndef _WSB_MEDIA_SEGMENT_DECRYPTER_H_
24 #define _WSB_MEDIA_SEGMENT_DECRYPTER_H_
25 
26 /*----------------------------------------------------------------------
27 | includes
28 +---------------------------------------------------------------------*/
29 #include "WsbTypes.h"
30 
31 /*----------------------------------------------------------------------
32 | types
33 +---------------------------------------------------------------------*/
39 typedef struct {
48  const char* ext_x_key_line;
53  unsigned int segment_number;
55 
61 typedef struct {
65  unsigned int init_segment_size;
73 
78 typedef enum {
84 
89 
90 /*----------------------------------------------------------------------
91 | prototypes
92 +---------------------------------------------------------------------*/
93 #if defined(__cplusplus)
94 extern "C" {
95 #endif
96 
114 WSB_EXPORT WSB_Result
115 WSB_MediaSegmentDecrypter_Create(const char* source_url,
117  WSB_MediaSegmentDecrypter** decrypter);
118 
134 WSB_EXPORT WSB_Result
136  WSB_MediaSegmentDecrypter** cloned);
137 
144 WSB_EXPORT WSB_Result
146 
160 WSB_EXPORT WSB_Result
162  const void* init_data);
163 
207 WSB_EXPORT WSB_Result
209  const WSB_UInt8* in,
210  unsigned int in_size,
211  WSB_UInt8* out,
212  unsigned int* out_size);
213 
216 #if defined(__cplusplus)
217 }
218 #endif
219 
220 #endif // _WSB_MEDIA_SEGMENT_DECRYPTER_H_
const char * ext_x_key_line
The complete #EXT-X-KEY HLS tag that contains the Marlin specific key attributes, e...
Definition: WsbMediaSegmentDecrypter.h:48
The init_data specific to the MP4/CENC media format.
Definition: WsbMediaSegmentDecrypter.h:61
MP4 container format, CENC decrypter type.
Definition: WsbMediaSegmentDecrypter.h:82
struct WSB_MediaSegmentDecrypter WSB_MediaSegmentDecrypter
Media Segment Decrypter opaque structure.
Definition: WsbMediaSegmentDecrypter.h:88
unsigned char WSB_UInt8
8-bit unsigned integer
Definition: WsbTypes.h:40
unsigned int init_segment_size
The initialize segment that contains the moov atom.
Definition: WsbMediaSegmentDecrypter.h:65
const WSB_UInt8 * init_segment
Definition: WsbMediaSegmentDecrypter.h:66
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Clone(WSB_MediaSegmentDecrypter *decrypter, WSB_MediaSegmentDecrypter **cloned)
Create a new instance of Media Segment Decrypter from another Media Segment Decrypter object...
WSB_UInt32 track_id
The track id of the track to be decrypted.
Definition: WsbMediaSegmentDecrypter.h:71
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Destroy(WSB_MediaSegmentDecrypter *decrypter)
Destroy a Media Segment Decrypter object earlier successfully created through WSB_MediaSegmentDecrypt...
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Decrypt(WSB_MediaSegmentDecrypter *decrypter, const WSB_UInt8 *in, unsigned int in_size, WSB_UInt8 *out, unsigned int *out_size)
Perform decryption of a media buffer.
HLS with MPEG2TS container format, AES or BBTS decrypter type.
Definition: WsbMediaSegmentDecrypter.h:80
int WSB_Result
Signed integer value representing a function or method result (return value).
Definition: WsbTypes.h:83
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Init(WSB_MediaSegmentDecrypter *decrypter, const void *init_data)
Initialize decrypter for a new segment.
unsigned int WSB_UInt32
32-bit (or more) unsigned integer
Definition: WsbTypes.h:36
unsigned int segment_number
The segment number computed based on the #EXT-X-MEDIA-SEQUENCE HLS playlist tag.
Definition: WsbMediaSegmentDecrypter.h:53
WSB_EXPORT WSB_Result WSB_MediaSegmentDecrypter_Create(const char *source_url, WSB_MediaSegmentDecrypterType type, WSB_MediaSegmentDecrypter **decrypter)
Create a new instance of the Media Segment Decrypter object.
Wasabi Result.
WSB_MediaSegmentDecrypterType
Media type a decrypter object can be used with.
Definition: WsbMediaSegmentDecrypter.h:78
The init_data specific to the HLS media format.
Definition: WsbMediaSegmentDecrypter.h:39