Wasabi ExpressPlay SDK for Embedded Systems  1.10
Ts2Marlin.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | MPEG2 Transport Stream - Marlin
4 |
5 | $Id: Ts2Marlin.h 296 2014-06-25 11:20:09Z jebaseelir $
6 | Original author: Julien Boeuf
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 ****************************************************************/
16 
17 #ifndef _TS2_MARLIN_H_
18 #define _TS2_MARLIN_H_
19 
20 /*----------------------------------------------------------------------
21 | includes
22 +---------------------------------------------------------------------*/
23 #include "Ts2Descriptors.h"
24 #include "Ts2Tables.h"
25 #include "Ts2Iec62455.h"
26 #include "Ts2Protection.h"
27 
28 /*----------------------------------------------------------------------
29 | constants
30 +---------------------------------------------------------------------*/
31 #define TS2_MARLIN_CA_SYSTEM_ID 0x4AF4
32 #define TS2_MARLIN_MAC_SEED "MRL-BBTS-AUTH-KEY-10"
33 #define TS2_MARLIN_RIGHTS_TABLE_ID 0x82
34 
35 #define TS2_MARLIN_SILENT_METHOD_ON_DEMAND 0x00
36 #define TS2_MARLIN_SILENT_METHOD_IN_ADVANCE 0x01
37 
38 /* The Key Derivation Function IDs from the Key Derivation Function descriptor */
39 #define TS2_KEY_DERIVATION_FUNCTION_NONE 0
40 #define TS2_KEY_DERIVATION_FUNCTION_TRUNCATED_SHA1 1
41 
42 /*----------------------------------------------------------------------
43 | types
44 +---------------------------------------------------------------------*/
45 typedef struct {
46  ATX_String rights_issuer_url;
47  ATX_String silent_rights_url;
48  ATX_String preview_rights_url;
50 
51 typedef struct {
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /*----------------------------------------------------------------------
61 | Marlin CADescriptor related methods
62 +---------------------------------------------------------------------*/
65 
68 
69 /*----------------------------------------------------------------------
70 | TS2_MarlinCADescriptor_Create
71 +---------------------------------------------------------------------*/
83 ATX_Result
84 TS2_MarlinCADescriptor_Create(ATX_UInt16 pid,
85  const char* base_cid, /* can be NULL */
86  ATX_Boolean single_key_layer,
87  TS2_TrafficProtectionSystem protection,
88  TS2_CADescriptor** desc);
89 
90 ATX_Result
92  ATX_String* base_cid,
93  TS2_TrafficProtectionSystem* protection,
94  ATX_UInt32* kdf_type);
95 
96 /*----------------------------------------------------------------------
97 | Marlin ContentId related methods
98 +---------------------------------------------------------------------*/
99 ATX_Result
100 TS2_GetMarlinContentIdFromKSM(const char* cid_base,
101  const TS2_KSM* ksm,
102  ATX_String* cid);
103 
104 ATX_Result
105 TS2_ParseContentId(const char* content_id,
106  ATX_String* cid_base,
107  ATX_Byte* cid_extension, /* TS2_KSM_CID_EXTENSION_SIZE */
108  ATX_Boolean* is_service); /* ATX_FALSE means is_programme */
109 
110 /*----------------------------------------------------------------------
111 | MarlinRightsTable methods
112 +---------------------------------------------------------------------*/
113 TS2_EXPORT ATX_Result
115 
116 ATX_Boolean
118 
119 /*----------------------------------------------------------------------
120 | other methods
121 +---------------------------------------------------------------------*/
122 ATX_Result
123 TS2_VerifyMarlinKSM(const ATX_Byte* drm_key,
124  const TS2_KSM* ksm);
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 #endif /* _TS2_MARLIN_H_ */