Commit 8105152f authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

dvb/si: Add support for descriptor 0x57 (Telephone descriptor).

parent 761f0151
......@@ -120,6 +120,7 @@ Supported DVB descriptors
* Descriptor 0x54: Content descriptor
* Descriptor 0x55: Parental rating descriptor
* Descriptor 0x56: Teletext descriptor
* Descriptor 0x57: Telephone descriptor
* Descriptor 0x58: Local time offset descriptor
* Descriptor 0x59: Subtitling descriptor
* Descriptor 0x5a: Terrestrial delivery system descriptor
......
......@@ -14,7 +14,6 @@ so if you like something just do it and send a patch.
- Descriptor 0x6a: AC-3 descriptor
- Add support (parser, generator, example) for these DVB descriptors:
- Descriptor 0x57: telephone_descriptor
- Descriptor 0x5b: multilingual_network_name_descriptor
- Descriptor 0x5c: multilingual_bouquet_name_descriptor
- Descriptor 0x5d: multilingual_service_name_descriptor
......
This diff is collapsed.
......@@ -57,6 +57,7 @@
#include <bitstream/dvb/si/desc_54.h>
#include <bitstream/dvb/si/desc_55.h>
#include <bitstream/dvb/si/desc_56.h>
#include <bitstream/dvb/si/desc_57.h>
#include <bitstream/dvb/si/desc_58.h>
#include <bitstream/dvb/si/desc_59.h>
#include <bitstream/dvb/si/desc_5a.h>
......
......@@ -790,7 +790,27 @@ static void build_desc56(uint8_t *desc) {
build_desc46(desc);
desc56_init(desc);
}
/* --- Descriptor 0x57: telephone_descriptor */
/* DVB Descriptor 0x57: telephone_descriptor */
static void build_desc57(uint8_t *desc) {
char *country_prefix = "+";
char *international_area_code = "359";
char *operator_code = "2";
char *national_area_code = "";
char *core_number = "9868620";
desc57_init(desc);
desc57_set_foreign_availability(desc, true);
desc57_set_connection_type(desc, 3);
desc57_set_country_prefix(desc, country_prefix, strlen(country_prefix));
desc57_set_international_area_code(desc, international_area_code, strlen(international_area_code));
desc57_set_operator_code(desc, operator_code, strlen(operator_code));
desc57_set_national_area_code(desc, national_area_code, strlen(national_area_code));
desc57_set_core_number(desc, core_number, strlen(core_number));
desc57_set_length(desc);
}
/* DVB Descriptor 0x58: Local time offset descriptor */
static void build_desc58(uint8_t *desc) {
......@@ -1388,6 +1408,9 @@ static void generate_sdt(void) {
desc = descs_get_desc(desc_loop, desc_counter++);
build_desc51(desc);
desc = descs_get_desc(desc_loop, desc_counter++);
build_desc57(desc);
desc = descs_get_desc(desc_loop, desc_counter++);
build_desc5f(desc);
......
......@@ -152,6 +152,7 @@ static inline void descl_print(uint8_t *p_descl, uint16_t i_length,
CASE_DESC(54)
CASE_DESC(55)
CASE_DESC(56)
CASE_DESC(57)
CASE_DESC(58)
CASE_DESC(59)
CASE_DESC(5a)
......
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