/***********************************************************************/ /** * * \file ait_dr.h * * \brief header for descriptor tag for AIT related descriptors. * * \note Copyright (C) 2016 RDA Co, chengdu\n * * \author wuliang@rda.com.cn * ***********************************************************************/ #ifndef __AIT_DR_H__ #define __AIT_DR_H__ #include /* * Descriptor Tag Value * defined by TS102809 */ #define DESCR_APPLICATION 0x00 /**<\brief tag of application descriptor */ #define DESCR_APPLICATION_NAME 0x01 /**<\brief tag of application name descriptor */ #define DESCR_TRANSPORT_PROTOCOL 0x02 /**<\brief tag of transport_protocol_descriptor */ #define DESCR_APPLICATION_RECORDING 0x06 /**<\brief tag of application recording */ #define DESCR_APPLICATION_SIGNALLING 0x6F /**<\brief tag of application_signalling_descriptor */ #define DESCR_DATA_BROADCAST_ID 0x66 /**<\brief tag of data_broadcast_id_descriptor */ #define DESCR_APPLICATION_ICONS 0x0B /**<\brief tag of application_icons_descriptor */ #define DESCR_EXTERNAL_APP_AUTH 0x05 /**<\brief tag of external_application_authorisation_descriptor */ #define DESCR_CAROUSEL_IDENTIFIER 0x13 /**<\brief tag of carousel_identifier_descriptor */ #define DESCR_GRAPHICS_CONSTRAINTS 0x14 /**<\brief tag of graphics_constraints_descriptor */ #define DESCR_SIMPLE_APP_LOCATION 0x15 /**<\brief tag of simple_application_location_descriptor */ #define DESCR_APPLICATION_USAGE 0x16 /**<\brief tag of application_usage_descriptor */ #define DESCR_SIMPLE_APP_BOUNDARY 0x17 /**<\brief tag of simple_application_boundary_descriptor */ #define DESCR_APPLICATION_STORAGE 0x10 /**<\brief tag of application_storage_descriptor */ #define DESCR_SERVICE_IDENTIFIER 0x71 /**<\brief tag of service_identifier_descriptor */ #define DESCR_CACHING_PRIORITY 0x71 /**<\brief tag of caching_priority_descriptor */ #define DESCR_CONTENT_TYPE 0x72 /**<\brief tag of content_type_descriptor */ /* application descriptor */ typedef struct { UINT16 application_profile; UINT8 version_major; UINT8 version_minor; UINT8 version_micro; } AppProfile_t; typedef struct { UINT8 remote_connection; UINT16 original_network_id; UINT16 transport_stream_id; UINT16 service_id; UINT8 component_tag; } OC_transport_t; typedef struct { UINT8 URL_extension_length; UINT8 URL_extension_byte[256]; } URL_externsion_t; typedef struct { UINT8 URL_base_length; UINT8 URL_base_byte[256]; UINT8 URL_extension_count; URL_externsion_t *pstURL_externsion_t; } InterActive_transport_t; /* application descriptor */ typedef struct { UINT8 profile_number; AppProfile_t *pstApp_profile; UINT8 service_bound_flag; UINT8 visibility; UINT8 application_priority; UINT8 transport_protocol_len; UINT8 *p_transport_protocol_label; } dvbpsi_application_dr_t; typedef struct dvbpsi_transport_protocol_dr_s { UINT16 protocol_id; UINT8 transport_protocol_label; OC_transport_t *pstOC_trans; InterActive_transport_t *pstInterAct_trans; struct dvbpsi_transport_protocol_dr_s *next; }dvbpsi_transport_protocol_dr_t; typedef struct { UINT8 label_len; UINT8 label[256]; UINT8 storage_properties; } label_t; /* Application recording descriptor 5.3.5.4*/ typedef struct { UINT8 scheduled_recording_flag; UINT8 trick_mode_aware_flag; UINT8 time_shift_flag; UINT8 dynamic_flag; UINT8 av_synced_flag; UINT8 initiating_replay_flag; UINT8 label_count; label_t *pstlabel; UINT8 component_tag_list_length; UINT8 component_tag[256]; UINT8 private_length; UINT8 private_byte[256]; } dvbpsi_application_recording_dr_t; /* application name descriptor */ typedef struct dvbpsi_application_name_dr_s { UINT8 ISO_639_language_code[4]; UINT8 application_name_length; UINT8 application_name_char[256]; struct dvbpsi_application_name_dr_s *next; } dvbpsi_application_name_dr_t; /* Simple application location descriptor */ typedef struct { UINT8 initial_path_len; UINT8 initial_path_bytes[256]; } dvbpsi_simple_application_location_dr_t; /* Simple application boundary descriptor */ typedef struct { UINT8 boundary_extension_count; URL_externsion_t *pstBoundary_t; } dvbpsi_simple_boundary_dr_t; /* data_broadcast_id_descriptor */ typedef struct { UINT16 data_broadcast_id; //UINT8 specific_data[256]; UINT16 application_type[128]; } dvbpsi_data_broadcast_id_dr_t; typedef struct application_info_s { UINT32 organization_id; UINT16 application_id; UINT16 application_type; UINT8 app_profile_number; AppProfile_t *pst_profile; dvbpsi_application_name_dr_t *pst_Appname; struct application_info_s *next; } application_info_t; /* data broadcast descriptor */ typedef struct { UINT16 data_broadcast_id; UINT8 component_tag; /* UINT8 selector_len; UINT8 selector[256]; */ /* when data_broadcast_id == 0x00F2, TS102809 5.3.9.1, following fields are defined */ application_info_t *pst_AppInfo; UINT8 ISO_langugae_Code[4]; UINT8 text_len; UINT8 text[256]; } dvbpsi_broadcast_dr_t; /* Application storage descriptor */ typedef struct { UINT8 storage_property; UINT8 not_launchable_from_broadcast; UINT8 launchable_completely_from_cache; UINT8 is_launchable_with_older_version; UINT32 version; UINT8 priority; } dvbpsi_Application_storage_dr_t; /* application_icons_descriptor */ typedef struct { UINT8 icon_location_len; UINT8 icon_location[256]; UINT16 icon_flags; } dvbpsi_application_icons_dr_t; /* external_application_authorization_descriptors */ typedef struct dvbpsi_external_application_authorization_dr_s { UINT32 organisation_id; UINT16 application_id; UINT8 application_priority; struct dvbpsi_external_application_authorization_dr_s *next; } dvbpsi_external_application_authorization_dr_t; /* Graphics constraints descriptor, ETSI TS 102 809 V1.2.1 5.3.5.8 */ typedef struct { UINT8 can_run_without_visible_ui; UINT8 handles_configuration_changed; UINT8 handles_externally_controlled_video; UINT8 graphics_configuration_byte[256]; } dvbpsi_graphics_constraints_dr_t; /* Application usage descriptor, ETSI TS 102 809 V1.2.1 5.3.5.8 */ typedef struct { UINT8 usage_type; } dvbpsi_application_usage_dr_t; /* caching_priority_descriptor */ typedef struct { UINT8 priority_value; UINT8 transparency_level; } dvbpsi_caching_priority_dr_t; /* content_type_descriptor */ typedef struct { UINT8 content_type_data_byte[256]; } dvbpsi_content_type_dr_t; typedef struct { UINT32 carousel_id; UINT8 formatID; UINT8 ModuleVersion; UINT16 ModuleId; UINT16 BlockSize; UINT32 ModuleSize; UINT8 CompressionMethod; UINT32 OriginalSize; UINT8 TimeOut; UINT8 ObjectKeyLength; UINT8 ObjectKeyData[256]; UINT8 private_data_len; UINT8 private_data[256]; } dvbpsi_carousel_identifier_dr_t; typedef struct dvbpsi_application_signalling_dr_s { UINT16 application_type; UINT8 AIT_version_number; struct dvbpsi_application_signalling_dr_s *next; } dvbpsi_application_signalling_dr_t; dvbpsi_application_dr_t *decode_application_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_dr(dvbpsi_application_dr_t * pDecoded); dvbpsi_application_recording_dr_t *decode_application_recording_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_recording_dr(dvbpsi_application_recording_dr_t *pDecoded); dvbpsi_application_name_dr_t *decode_application_name_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_name_dr(dvbpsi_application_name_dr_t *pDecoded); dvbpsi_simple_application_location_dr_t *decode_simple_application_location_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeSimple_application_loc_dr(dvbpsi_simple_application_location_dr_t *pDecoded); dvbpsi_simple_boundary_dr_t *decode_simple_application_boundary_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeSimple_boundary_dr(dvbpsi_simple_boundary_dr_t *pDecoded); dvbpsi_data_broadcast_id_dr_t *decode_data_broadcastid_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeData_broadcastid_dr(dvbpsi_data_broadcast_id_dr_t *pDecoded); dvbpsi_broadcast_dr_t *decode_broadcast_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeBroadcast_dr(dvbpsi_broadcast_dr_t *p_decoded); dvbpsi_Application_storage_dr_t *decode_application_storage_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_storage_dr(dvbpsi_Application_storage_dr_t *pDecoded); dvbpsi_application_icons_dr_t *decode_application_icon_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_icons_dr(dvbpsi_application_icons_dr_t *pDecoded); dvbpsi_external_application_authorization_dr_t *decode_external_application_auth_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeExternal_application_auth_dr(dvbpsi_external_application_authorization_dr_t *pDecoded); dvbpsi_graphics_constraints_dr_t *decode_graphic_constraints_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeGraphic_constraints_dr(dvbpsi_graphics_constraints_dr_t *pDecoded); dvbpsi_application_usage_dr_t *decode_application_usage_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeAapplication_usage_dr(dvbpsi_application_usage_dr_t *pDecoded); dvbpsi_caching_priority_dr_t *decode_caching_priority_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeCaching_priority_dr(dvbpsi_caching_priority_dr_t *pDecoded); dvbpsi_content_type_dr_t *decode_content_type_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeContent_tpye_dr(dvbpsi_content_type_dr_t *pDecoded); dvbpsi_carousel_identifier_dr_t *decode_carousel_identifier_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeCarousel_identifier_dr(dvbpsi_carousel_identifier_dr_t *pDecoded); dvbpsi_application_signalling_dr_t *decode_application_signalling_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeApplication_sigalling_dr(dvbpsi_application_signalling_dr_t *pDecoded); dvbpsi_transport_protocol_dr_t *decode_transport_protocol_dr(UINT8 * pu8Descriptor, INT16 n16Len); void dvbpsi_FreeTransport_protocol_dr(dvbpsi_transport_protocol_dr_t *pDecoded); #endif