Wasabi ExpressPlay SDK for Embedded Systems  1.10
WsbEcmDecrypter.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - ECM Decrypter Module
4 |
5 | $Id$
6 | Original author: Edin Hodzic (dino@concisoft.com)
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) 2010-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_ECM_DECRYPTER_H_
22 #define _WSB_ECM_DECRYPTER_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 #include "WsbMediaFile.h"
29 #include "WsbKeyManager.h"
30 
31 /*----------------------------------------------------------------------
32 | prototypes
33 +---------------------------------------------------------------------*/
89 /*----------------------------------------------------------------------
90 | types
91 +---------------------------------------------------------------------*/
92 
100 
104 typedef enum {
105  WSB_MP2TS_KEY_EVEN, /* <- even MPEG-2 TS key */
106  WSB_MP2TS_KEY_ODD /* <- odd MPEG-2 TS key */
108 
112 typedef enum {
119 
120 
124 typedef enum {
129 
135 
139 typedef enum {
143  WSB_KIF_NEXT_IV = (1<<3),
149 
153 typedef struct {
160 
162  const void* format_params;
163 
165 
170 
175 
182 } WSB_KsmInfo;
183 
187 typedef struct {
188 
190  void* instance;
191 
210  WSB_Result (*OnNewMediaFile)(void* instance,
211  WSB_MediaFile* media_file,
212  WSB_KeyManager* key_manager);
213 
230  void (*OnKsmInfoChange)(void* instance,
231  const WSB_KsmInfo* key_info,
232  WSB_UInt32 change_mask);
233 
235 
236 /*----------------------------------------------------------------------
237 | functions
238 +---------------------------------------------------------------------*/
239 #if defined(__cplusplus)
240 extern "C" {
241 #endif
242 
258 WSB_EXPORT WSB_Result
260  WSB_Mpeg2TsTrafficKey_Format key_format,
261  const void* key_format_params,
262  /* returns */ WSB_EcmDecrypter** ecm_decrypter);
263 
272 WSB_EXPORT WSB_Result
274 
286 WSB_EXPORT WSB_Result
288  const WSB_Byte* pmt_table,
289  WSB_Size pmt_len,
290  /* returns */
291  WSB_UInt16* ecm_pid);
292 
304 WSB_EXPORT WSB_Result
306  const WSB_Byte* cat_table,
307  WSB_Size cat_len,
308  /* returns */
309  WSB_UInt16* mrt_pid);
310 
322 WSB_EXPORT WSB_Result
324  const WSB_Byte* ecm_table,
325  WSB_Size ecm_len);
326 
338 WSB_EXPORT WSB_Result
340  const WSB_Byte* mr_table,
341  WSB_Size mrt_len);
342 
345 #ifdef __cplusplus
346 }
347 #endif
348 
349 #endif /* _WSB_ECM_DECRYPTER_H_ */