MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
dvb_ics.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2012 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
28 #ifndef _DVB_ICS_H
29 #define _DVB_ICS_H
30 
31 #include "techtype.h"
32 #include "mherrors.h"
33 
34 /*---Constant and macro definitions for public use-----------------------------*/
35 
36 /*---Enumerations for public use-----------------------------------------------*/
37 
38 /* Video termination attribute */
39 typedef enum
40 {
41  MHEG5_VIDEO_TERMINATION_FREEZE,
42  MHEG5_VIDEO_TERMINATION_DISAPPEAR
43 } E_VideoTermination;
44 
45 typedef enum
46 {
47  MHEG5_ICS_PIN_SUPPORT_NONE,
48  MHEG5_ICS_PIN_SUPPORT_DISABLED,
49  MHEG5_ICS_PIN_SUPPORT_ENABLED
50 } E_ICSPinSupport;
51 
52 typedef enum
53 {
54  MHEG5_ICS_PIN_REQ_NEVER,
55  MHEG5_ICS_PIN_REQ_GUIDANCE_ONLY,
56  MHEG5_ICS_PIN_REQ_ALWAYS
57 } E_ICSPinReq;
58 
59 typedef enum
60 {
61  MHEG5_ICS_PIN_STATUS_NOT_REQUIRED,
62  MHEG5_ICS_PIN_STATUS_OK,
63  MHEG5_ICS_PIN_STATUS_INVALID
64 } E_ICSPinStatus;
65 
66 /*Reference: ETSI ES 202 184 section 11.5.4.2 */
67 typedef enum
68 {
69  ICS_AC_NONE,
70  ICS_AC_AAC_ADTS, /* ISO/IEC 13818-7 */
71  ICS_AC_HE_AAC_LATM, /* ISO/IEC 14496-3 */
72  ICS_AC_EAC3, /* TS 102 366 */
73 } E_ICSAudioCodec;
74 
75 /*Reference: ETSI ES 202 184 section 11.5.4.1 */
76 typedef enum
77 {
78  ICS_VC_NONE,
79  ICS_VC_H264,
80 } E_ICSVideoCodec;
81 
82 /*---Global type defs for public use-------------------------------------------*/
83 
84 /* Encryption keys for IP streams */
85 typedef struct
86 {
87  U8BIT odd[32];
88  U8BIT even[32];
89 } S_ICSPidKeys;
90 
91 typedef struct
92 {
93  U16BIT composition;
94  U16BIT ancillary;
96 
97 /*Information on all audio and subtitle streams - for each language*/
98 typedef struct
99 {
100  U32BIT lang_code; /*language code*/
101  U16BIT pid; /*stream pid*/
102  U8BIT a_type; /*when non-zero is audio type */
103  U8BIT s_type; /*when non-zero is subtitle type */
104  union {
105  E_ICSAudioCodec codec;
106  S_ICSSubtPage page;
107  } u;
108 } S_ICSLangInfo;
109 
110 typedef struct s_StreamPids
111 {
112  U16BIT pcr_pid;
113  U16BIT audio_pid;
114  U16BIT video_pid;
115  U16BIT subtitle_pid;
116  U16BIT info_num;
117  S_ICSLangInfo *info_ptr;
118 } S_StreamPids;
119 
120 /*---Global Function prototypes for public use---------------------------------*/
121 
143 E_MhegErr DVB_MhegICStreamSetup(S_StreamPids pids, S_ICSPidKeys *audio_keys,
144  S_ICSPidKeys *video_keys, E_VideoTermination video_termination,
145  E_ICSAudioCodec audio_codec, E_ICSVideoCodec video_codec );
146 
164 U32BIT DVB_MhegICStreamHandleData(U8BIT *data, U32BIT len, BOOLEAN last);
165 
177 E_MhegErr DVB_MhegICStreamRelease(void);
178 
190 E_MhegErr DVB_MhegICStreamPause(void);
191 
202 E_MhegErr DVB_MhegICStreamResume(void);
203 
213 E_MhegErr DVB_MhegICStreamAudioSetVolume(S32BIT volumeAdjust);
214 
229 E_MhegErr DVB_MhegPromptForGuidance(U8BIT *restriction, BOOLEAN show);
230 
242 E_MhegErr DVB_MhegGetPINSupport(E_ICSPinSupport *support);
243 
244 #ifdef INCLUDE_FREESAT
245 
260 E_MhegErr DVB_MhegIsConnectionAllowed(S32BIT service_index, BOOLEAN *pAllowed);
261 
273 E_MhegErr DVB_MhegGetPINRequirement(E_ICSPinReq *status);
274 
287 E_MhegErr DVB_MhegValidatePIN(U8BIT *pin, E_ICSPinStatus *status);
288 
300 E_MhegErr DVB_MhegGetMACAddress(U8BIT address[6]);
301 
320 E_MhegErr DVB_MhegGetPrivateKey(U8BIT *buffer, U16BIT bufsize,
321  U16BIT *keylen, U32BIT *version);
322 
323 #endif /* INCLUDE_FREESAT */
324 
325 #endif /*_DVB_ICS_H*/
E_MhegErr DVB_MhegICStreamSetup(S_StreamPids pids, S_ICSPidKeys *audio_keys, S_ICSPidKeys *video_keys, E_VideoTermination video_termination, E_ICSAudioCodec audio_codec, E_ICSVideoCodec video_codec)
This function tells the external application that an IC delivered stream is to be played using DVB_Mh...
U32BIT DVB_MhegICStreamHandleData(U8BIT *data, U32BIT len, BOOLEAN last)
Handle transport stream data. The data is part of a single-program transport stream, containing audio, video and/or subtitles (in one or more languages). The video is H.264 SD video and the audio is HE-AAC audio. The stream contains PAT and PMT (other SI data can be ignored). This function can block until the data has been processed / buffered. It may also return when part of the block has been processed. This would cause a subsequent call with the rest of the block. When the last block is presented (last=TRUE), the function should indicate that the block has been completely processed only when this is a true reflection of the presentation status.
E_MhegErr DVB_MhegICStreamRelease(void)
This function tells the external application that the IC delivered stream is stopped. Presentation of all stream components (audio, video and/or subtitles) should cease. This function may be called while DVB_MhegHandleStreamData is in progress. In this case DVB_MhegHandleStreamData should return indicating that the entire block has been processed.
E_MhegErr DVB_MhegGetPINSupport(E_ICSPinSupport *support)
Returns the PIN support in the receiver. This MUST be a non-blocking function, returning results imme...
E_MhegErr DVB_MhegPromptForGuidance(U8BIT *restriction, BOOLEAN show)
This function asks the external application to obtain permission from the user to present IP-delivere...
E_MhegErr DVB_MhegICStreamResume(void)
Resume presentation of audio and/or video components of the currently playing IC delivered stream...
Definition: dvb_ics.h:91
MHEG5 engine interface error codes.
Definition: dvb_ics.h:98
System Wide Global Technical Data Type Definitions.
E_MhegErr DVB_MhegICStreamPause(void)
Pause presentation of audio and/or video components of the currently playing IC delivered stream...
Definition: dvb_ics.h:85
Definition: dvb_ics.h:110
E_MhegErr DVB_MhegICStreamAudioSetVolume(S32BIT volumeAdjust)
Set volume for audio component of the currently playing IC stream This function is equivalent to DVB_...