Commit 56fca374 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

dvb/si: Add support for descriptor 0x6e (Announcement support descriptor).

parent cdbad569
...@@ -147,6 +147,7 @@ Supported DVB descriptors ...@@ -147,6 +147,7 @@ Supported DVB descriptors
* Descriptor 0x6b: Ancillary data descriptor * Descriptor 0x6b: Ancillary data descriptor
* Descriptor 0x6c: Cell list descriptor * Descriptor 0x6c: Cell list descriptor
* Descriptor 0x6d: Cell frequency link descriptor * Descriptor 0x6d: Cell frequency link descriptor
* Descriptor 0x6e: Announcement support descriptor
* Descriptor 0x7a: Enhanced AC-3 descriptor * Descriptor 0x7a: Enhanced AC-3 descriptor
* Descriptor 0x7b: DTS descriptor * Descriptor 0x7b: DTS descriptor
* Descriptor 0x7c: AAC descriptor * Descriptor 0x7c: AAC descriptor
......
...@@ -5,7 +5,6 @@ so if you like something just do it and send a patch. ...@@ -5,7 +5,6 @@ so if you like something just do it and send a patch.
- Descriptor 0x29 IPMP_descriptor (defined in ISO/IEC 13818-11, MPEG-2 IPMP) - Descriptor 0x29 IPMP_descriptor (defined in ISO/IEC 13818-11, MPEG-2 IPMP)
- Add support (parser, generator, example) for these DVB descriptors: - Add support (parser, generator, example) for these DVB descriptors:
- Descriptor 0x6e: announcement_support_descriptor
- Descriptor 0x6f: application_signalling_descriptor - Descriptor 0x6f: application_signalling_descriptor
- Descriptor 0x70: adaptation_field_data_descriptor - Descriptor 0x70: adaptation_field_data_descriptor
- Descriptor 0x71: service_identifier_descriptor - Descriptor 0x71: service_identifier_descriptor
......
This diff is collapsed.
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
#include <bitstream/dvb/si/desc_6b.h> #include <bitstream/dvb/si/desc_6b.h>
#include <bitstream/dvb/si/desc_6c.h> #include <bitstream/dvb/si/desc_6c.h>
#include <bitstream/dvb/si/desc_6d.h> #include <bitstream/dvb/si/desc_6d.h>
#include <bitstream/dvb/si/desc_6e.h>
#include <bitstream/dvb/si/desc_7a.h> #include <bitstream/dvb/si/desc_7a.h>
#include <bitstream/dvb/si/desc_7b.h> #include <bitstream/dvb/si/desc_7b.h>
#include <bitstream/dvb/si/desc_7c.h> #include <bitstream/dvb/si/desc_7c.h>
......
...@@ -1599,7 +1599,69 @@ static void build_desc6d(uint8_t *desc) { ...@@ -1599,7 +1599,69 @@ static void build_desc6d(uint8_t *desc) {
desc_set_length(desc, cell_n - desc - DESC_HEADER_SIZE); desc_set_length(desc, cell_n - desc - DESC_HEADER_SIZE);
} }
/* --- Descriptor 0x6e: announcement_support_descriptor */ /* DVB Descriptor 0x6e: Announcement support descriptor */
static void build_desc6e(uint8_t *desc) {
desc6e_init(desc);
desc6e_set_emergency_alarm_flag (desc, true);
desc6e_set_road_traffic_flash_flag (desc, false);
desc6e_set_public_transport_flash_flag (desc, true);
desc6e_set_warning_message_flag (desc, true);
desc6e_set_news_flash_flag (desc, true);
desc6e_set_weather_flash_flag (desc, true);
desc6e_set_event_announcement_flag (desc, false);
desc6e_set_personal_call_flag (desc, false);
{
uint8_t n = 0;
uint8_t *ann_n;
desc_set_length(desc, 255);
ann_n = desc6e_get_announcement(desc, n++);
desc6en_set_announcement_type(ann_n, 0); // Emergency alarm
desc6en_set_reference_type(ann_n, 0);
ann_n = desc6e_get_announcement(desc, n++);
desc6en_set_announcement_type(ann_n, 3); // Warning alarm
desc6en_set_reference_type(ann_n, 1);
// The following are valid only if
// reference_type == 0x01
// || reference_type == 0x02
// || reference_type == 0x03
//
desc6en_set_onid(ann_n, 0x1122);
desc6en_set_tsid(ann_n, 0x3344);
desc6en_set_service_id(ann_n, 0x5566);
desc6en_set_component_tag(ann_n, 0x77);
ann_n = desc6e_get_announcement(desc, n++);
desc6en_set_announcement_type(ann_n, 5); // Weather flash
desc6en_set_reference_type(ann_n, 0);
ann_n = desc6e_get_announcement(desc, n++);
desc6en_set_announcement_type(ann_n, 2); // Public Transport flash
desc6en_set_reference_type(ann_n, 3);
// The following are valid only if
// reference_type == 0x01
// || reference_type == 0x02
// || reference_type == 0x03
//
desc6en_set_onid(ann_n, 0x6677);
desc6en_set_tsid(ann_n, 0x8899);
desc6en_set_service_id(ann_n, 0x4455);
desc6en_set_component_tag(ann_n, 0x88);
ann_n = desc6e_get_announcement(desc, n++);
desc6en_set_announcement_type(ann_n, 4); // News flash
desc6en_set_reference_type(ann_n, 0);
ann_n = desc6e_get_announcement(desc, n);
desc_set_length(desc, ann_n - desc - DESC_HEADER_SIZE);
}
}
/* --- Descriptor 0x6f: application_signalling_descriptor */ /* --- Descriptor 0x6f: application_signalling_descriptor */
/* --- Descriptor 0x70: adaptation_field_data_descriptor */ /* --- Descriptor 0x70: adaptation_field_data_descriptor */
/* --- Descriptor 0x71: service_identifier_descriptor */ /* --- Descriptor 0x71: service_identifier_descriptor */
...@@ -2206,6 +2268,9 @@ static void generate_sdt(void) { ...@@ -2206,6 +2268,9 @@ static void generate_sdt(void) {
desc = descs_get_desc(desc_loop, desc_counter++); desc = descs_get_desc(desc_loop, desc_counter++);
build_desc5f(desc); build_desc5f(desc);
desc = descs_get_desc(desc_loop, desc_counter++);
build_desc6e(desc);
// Finish descriptor generation // Finish descriptor generation
desc = descs_get_desc(desc_loop, desc_counter); // Get next descriptor pos desc = descs_get_desc(desc_loop, desc_counter); // Get next descriptor pos
descs_set_length(desc_loop, desc - desc_loop - DESCS_HEADER_SIZE); descs_set_length(desc_loop, desc - desc_loop - DESCS_HEADER_SIZE);
......
...@@ -122,6 +122,12 @@ new SDT actual tsid=10000 version=1 onid=40000 ...@@ -122,6 +122,12 @@ new SDT actual tsid=10000 version=1 onid=40000
- desc 49 country_availability available=0 country=FRA - desc 49 country_availability available=0 country=FRA
- desc 49 country_availability available=0 country=BUL - desc 49 country_availability available=0 country=BUL
- desc 5f private_data specifier=0xaabbccdd - desc 5f private_data specifier=0xaabbccdd
- desc 6e announcement_support announcement_support_indicator=0xff3d emergency_alarm_flag=1 road_traffic_flash_flag=0 public_transport_flash_flag=1 warning_message_flag=1 news_flash_flag=1 weather_flash_flag=1 event_announcement_flag=0 personal_call_flag=0
- announcement type=0 type_txt="Emergency alarm" reference_type=0
- announcement type=3 type_txt="Warning message" reference_type=1 onid=4386 tsid=13124 service_id=21862 component_tag=119
- announcement type=5 type_txt="Weather flash" reference_type=0
- announcement type=2 type_txt="Public Transport flash" reference_type=3 onid=26231 tsid=34969 service_id=17493 component_tag=136
- announcement type=4 type_txt="News flash" reference_type=0
* service sid=20200 eit_schedule eit_pf running=3 * service sid=20200 eit_schedule eit_pf running=3
- desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name" - desc 48 service type=0x1 provider="Test Provider Name" service="Test Service Name"
- desc 4c time_shifted_service reference_sid=21000 - desc 4c time_shifted_service reference_sid=21000
......
...@@ -207,6 +207,15 @@ ...@@ -207,6 +207,15 @@
<DESC id="0x5f" length="4" value="aabbccdd"> <DESC id="0x5f" length="4" value="aabbccdd">
<PRIVATE_DATA_SPECIFIER_DESC specifier="0xaabbccdd" /> <PRIVATE_DATA_SPECIFIER_DESC specifier="0xaabbccdd" />
</DESC> </DESC>
<DESC id="0x6e" length="21" value="ff3d083911223344556677582b6677889944558848">
<ANNOUNCEMENT_SUPPORT_DESC announcement_support_indicator="0xff3d" emergency_alarm_flag="1" road_traffic_flash_flag="0" public_transport_flash_flag="1" warning_message_flag="1" news_flash_flag="1" weather_flash_flag="1" event_announcement_flag="0" personal_call_flag="0">
<ANNOUNCEMENT type="0" type_txt="Emergency alarm" reference_type="0"/>
<ANNOUNCEMENT type="3" type_txt="Warning message" reference_type="1" onid="4386" tsid="13124" service_id="21862" component_tag="119"/>
<ANNOUNCEMENT type="5" type_txt="Weather flash" reference_type="0"/>
<ANNOUNCEMENT type="2" type_txt="Public Transport flash" reference_type="3" onid="26231" tsid="34969" service_id="17493" component_tag="136"/>
<ANNOUNCEMENT type="4" type_txt="News flash" reference_type="0"/>
</ANNOUNCEMENT_SUPPORT_DESC>
</DESC>
</SERVICE> </SERVICE>
<SERVICE sid="20200" eit_schedule="1" eit_pf="1" running="3" free_CA="0"> <SERVICE sid="20200" eit_schedule="1" eit_pf="1" running="3" free_CA="0">
<DESC id="0x48" length="38" value="0112546573742050726f7669646572204e616d6511546573742053657276696365204e616d65"> <DESC id="0x48" length="38" value="0112546573742050726f7669646572204e616d6511546573742053657276696365204e616d65">
......
...@@ -179,6 +179,7 @@ static inline void descl_print(uint8_t *p_descl, uint16_t i_length, ...@@ -179,6 +179,7 @@ static inline void descl_print(uint8_t *p_descl, uint16_t i_length,
CASE_DESC(6b) CASE_DESC(6b)
CASE_DESC(6c) CASE_DESC(6c)
CASE_DESC(6d) CASE_DESC(6d)
CASE_DESC(6e)
CASE_DESC(7a) CASE_DESC(7a)
CASE_DESC(7b) CASE_DESC(7b)
CASE_DESC(7c) CASE_DESC(7c)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment