MHEG5
15.3.0
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2012 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00038 #ifndef _DVB_SERVICE_H 00039 #define _DVB_SERVICE_H 00040 00041 #include "techtype.h" 00042 #include "dtvstring.h" 00043 #include "dmxtype.h" 00044 #include "dvblocator.h" 00045 #include "mherrors.h" 00046 00047 /*---Constant and macro definitions for public use---------------------------*/ 00048 00049 /*---Enumerations for public use---------------------------------------------*/ 00050 00051 /*---Global type defs for public use-----------------------------------------*/ 00052 00053 /* Basic SI structure */ 00054 typedef struct 00055 { 00056 /* Identifier of original broadcast network */ 00057 U16BIT original_network_id; 00058 /* Identifier of transport stream */ 00059 U16BIT transport_stream_id; 00060 /* Service identification information */ 00061 U16BIT service_id; 00062 /* Identifier of broadcast network */ 00063 U16BIT network_id; 00064 } S_DvbLocation; 00065 00066 #if defined INCLUDE_SI_EXTENSION 00067 typedef enum 00068 { 00069 /* Subtitle stream is present */ 00070 MHEG5_COMPONENT_SUBTITLES, 00071 00072 /* Audio Description is available */ 00073 MHEG5_COMPONENT_AUDIO_DESC, 00074 00075 /* The service contains audio streams with more than one audio language */ 00076 MHEG5_COMPONENT_ALT_LANG, 00077 00078 /* Any audio stream is Dolby Digital or Dolby Digital Plus (AC-3/E-AC-3) */ 00079 MHEG5_COMPONENT_DOLBY, 00080 00081 /* Video component is either MPEG-2 high definition video, or H.264 */ 00082 MHEG5_COMPONENT_HD 00083 } E_ComponentKey; 00084 00085 typedef struct 00086 { 00087 U32BIT serviceIndex; 00088 00089 /* Service name, from the SDT service_descriptor */ 00090 S_STRING serviceName; 00091 00092 /* Service Provider name, from the SDT service_descriptor */ 00093 S_STRING serviceProvider; 00094 00095 /* Service type, from the SDT service_descriptor */ 00096 U16BIT serviceType; 00097 00098 /* Allocated LCN for service */ 00099 U16BIT serviceLcn; 00100 } S_ServiceDetails; 00101 00102 typedef struct 00103 { 00104 U16BIT hours; 00105 U8BIT minutes; 00106 U8BIT seconds; 00107 } S_Time; 00108 00109 typedef struct s_eventdetails 00110 { 00111 void *dvb_user_data; /* Available for DVB stack - not used by MHEG5 */ 00112 00113 /* Event name, from the EIT short_event_descriptor */ 00114 S_STRING eventName; 00115 00116 /* Event description, from the EIT short_event_descriptor */ 00117 S_STRING shortDescription; 00118 00119 /* Event parental rating, from the EIT parental_rating_descriptor 00120 formatted as it is in parental_rating_descriptor*/ 00121 U32BIT parentalRating; 00122 00123 /* Event start date, in Modified Julian Date format - as per EIT field */ 00124 U32BIT startDate; 00125 00126 /* Event start time, from the EIT start_time field*/ 00127 S_Time startTime; 00128 00129 /* Event duration, from the EIT duration field, 00130 as formatted in the EIT*/ 00131 S_Time duration; 00132 00133 /* Event Category string, from the EIT content_descriptor (see Ref [2]) 00134 * ONLY give bytes containing 00135 * 'content_nibble_level_1' and 'content_nibble_level_2' 00136 * 'user_data' byte(s) should be ignored. 00137 * Note that content_descriptor can have more than one iteration - depending 00138 * on descriptor length. 00139 */ 00140 S_STRING category; 00141 00142 /* Free-content flag, TRUE if content is free, FALSE if content is CA controlled 00143 from EIT free_CA_mode field*/ 00144 BOOLEAN freeNotCA; 00145 } S_EventDetails; 00146 00147 #endif /*SI Extension*/ 00148 00149 /*---Global Function prototypes for public use---------------------------------*/ 00150 00155 DMXREF DVB_MhegGetDemuxPath(void); 00156 00164 E_MhegErr DVB_MhegGetTunedService(S32BIT *serviceIndex); 00165 00179 E_MhegErr DVB_MhegDvbLocatorToIndex(S_DvbLocator *pDvbLocator, S32BIT *pServiceIndex); 00180 00190 E_MhegErr DVB_MhegIndexToDvbLocator( S32BIT serviceIndex, S_DvbLocator *location ); 00191 00201 E_MhegErr DVB_MhegIndexToDvbLocation( S32BIT serviceIndex, S_DvbLocation *pDvbLocation ); 00202 00211 E_MhegErr DVB_MhegLcnToDvbLocator( U32BIT lcn, S_DvbLocator *pDvbLocator); 00212 00226 E_MhegErr DVB_MhegTuneIndex(S32BIT serviceIndex); 00227 00228 #ifdef INCLUDE_SI_EXTENSION 00229 00242 E_MhegErr DVB_MhegGetServiceDetails( S32BIT serviceIndex, 00243 S_ServiceDetails *details ); 00244 00252 void DVB_MhegReleaseServiceDetails( S_ServiceDetails *details ); 00253 00269 E_MhegErr DVB_MhegGetEventDetails( S32BIT serviceIndex, BOOLEAN porf, 00270 S_EventDetails *details ); 00271 00279 void DVB_MhegReleaseEventDetails( S_EventDetails *details ); 00280 00281 #ifdef INCLUDE_SA_PROFILE 00282 00295 E_MhegErr DVB_MhegGetNumberOfServices(S32BIT *number); 00296 00317 E_MhegErr DVB_MhegPrevServiceIndex(S32BIT *serviceIndex); 00318 00339 E_MhegErr DVB_MhegNextServiceIndex(S32BIT *serviceIndex); 00340 00353 E_MhegErr DVB_MhegGetServiceRunningStatus(S32BIT serviceIndex, 00354 U8BIT *runningStatus); 00355 00369 E_MhegErr DVB_MhegGetChannelNumber(S32BIT serviceIndex, S32BIT *channelNum); 00370 00382 E_MhegErr DVB_MhegGetEventId( S32BIT serviceIndex, BOOLEAN porf, S32BIT *eventId ); 00383 00411 E_MhegErr DVB_MhegSetEventIterator(S32BIT serviceIndex, S32BIT startDate, 00412 S32BIT startTime, S32BIT *eventId); 00413 00435 E_MhegErr DVB_MhegIncrementEventIterator(S32BIT *eventId); 00436 00453 E_MhegErr DVB_MhegGetScheduledEventDetails(S32BIT serviceIndex, 00454 S32BIT eventId, 00455 BOOLEAN *result, 00456 S_EventDetails *details); 00457 00480 E_MhegErr DVB_MhegGetComponentInfo(S32BIT serviceIndex, S32BIT eventId, 00481 BOOLEAN *result, E_ComponentKey key, 00482 BOOLEAN *value); 00483 00513 E_MhegErr DVB_MhegGetComponentData(S32BIT serviceIndex, S32BIT eventId, 00514 BOOLEAN *result, U8BIT *strCont, 00515 U8BIT *contType, U8BIT *lang); 00516 #endif /* INCLUDE_SA_PROFILE */ 00517 00518 #endif /* INCLUDE_SI_EXTENSION */ 00519 00520 #ifdef INCLUDE_FREESAT 00521 00529 E_MhegErr DVB_MhegGetCurrentFSI(U16BIT *fsi); 00530 00545 E_MhegErr DVB_MhegGetFSILocator(U16BIT fsi, S_DVB_LOCATOR *pDvbLocator); 00546 00559 E_MhegErr DVB_MhegCurrentServiceIsInGroup(U16BIT groupIdentifier, BOOLEAN *inGroup); 00560 00573 E_MhegErr DVB_MhegGetFSIServiceReference(S32BIT serviceIndex, U16BIT *fsi); 00574 00575 #endif /*INCLUDE_FREESAT*/ 00576 00577 #endif /* _DVB_SERVICE_H */