Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bitstream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
bitstream
Commits
ef59fee1
Commit
ef59fee1
authored
Oct 13, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb/si: Complete support for descriptor 0x4a (Linkage descriptor).
parent
75b1ac28
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
655 additions
and
14 deletions
+655
-14
README
README
+2
-2
TODO
TODO
+0
-3
dvb/si/desc_4a.h
dvb/si/desc_4a.h
+504
-7
examples/dvb_gen_si.c
examples/dvb_gen_si.c
+117
-2
examples/dvb_print_si.output.txt
examples/dvb_print_si.output.txt
+10
-0
examples/dvb_print_si.output.xml
examples/dvb_print_si.output.xml
+22
-0
No files found.
README
View file @
ef59fee1
...
...
@@ -98,8 +98,8 @@ Supported DVB descriptors
=========================
* Descriptor 0x40: Network name descriptor
* Descriptor 0x42: Stuffing descriptor
* Descriptor 0x41: Service list descriptor
* Descriptor 0x42: Stuffing descriptor
* Descriptor 0x43: Satellite delivery system descriptor
* Descriptor 0x44: Cable delivery system descriptor
* Descriptor 0x45: VBI data descriptor
...
...
@@ -107,7 +107,7 @@ Supported DVB descriptors
* Descriptor 0x47: Bouquet name descriptor
* Descriptor 0x48: Service descriptor
* Descriptor 0x49: Country availability descriptor
* Descriptor 0x4a: Linkage descriptor
(partially implemented)
* Descriptor 0x4a: Linkage descriptor
* Descriptor 0x4b: NVOD reference descriptor
* Descriptor 0x4c: Time shifted service descriptor
* Descriptor 0x4d: Short event descriptor
...
...
TODO
View file @
ef59fee1
...
...
@@ -9,9 +9,6 @@ so if you like something just do it and send a patch.
- Descriptor 0x26 metadata_descriptor
- Descriptor 0x29 IPMP_descriptor (defined in ISO/IEC 13818-11, MPEG-2 IPMP)
- Add generators and example usage for these DVB descriptors:
- Descriptor 0x4a: Linkage descriptor
- Add support (parser, generator, example) for these DVB descriptors:
- Descriptor 0x6b: ancillary_data_descriptor
- Descriptor 0x6c: cell_list_descriptor
...
...
dvb/si/desc_4a.h
View file @
ef59fee1
This diff is collapsed.
Click to expand it.
examples/dvb_gen_si.c
View file @
ef59fee1
...
...
@@ -379,7 +379,6 @@ static void build_desc41(uint8_t *desc) {
desc_set_length
(
desc
,
service_n
-
desc
-
DESC_HEADER_SIZE
);
}
/* --- Descriptor 0x42: Stuffing descriptor */
/* DVB Descriptor 0x43: Satellite delivery system descriptor */
static
void
build_desc43
(
uint8_t
*
desc
)
{
desc43_init
(
desc
);
...
...
@@ -536,7 +535,111 @@ static void build_desc49(uint8_t *desc, bool b_available) {
desc_set_length
(
desc
,
code_n
-
desc
-
DESC_HEADER_SIZE
);
}
/* DVB Descriptor 0x4a: Linkage descriptor (partially implemented) */
/* DVB Descriptor 0x4a: Linkage descriptor */
static
void
build_desc4a_std
(
uint8_t
*
desc
)
{
desc4a_init
(
desc
);
desc4a_set_tsid
(
desc
,
tsid
+
500
);
desc4a_set_onid
(
desc
,
onid
+
500
);
desc4a_set_sid
(
desc
,
0x0000
);
desc4a_set_linkage
(
desc
,
0x04
);
// new ts
}
static
void
build_desc4a_mobile
(
uint8_t
*
desc
)
{
desc4a_init
(
desc
);
desc4a_set_tsid
(
desc
,
tsid
+
600
);
desc4a_set_onid
(
desc
,
onid
+
600
);
desc4a_set_sid
(
desc
,
sid
+
600
);
// mobile handover
desc4a_set_linkage
(
desc
,
DESC4A_LINKAGE_MOBILE
);
desc4a_set_mobile_handover_type
(
desc
,
1
);
desc4a_set_mobile_origin_type
(
desc
,
false
);
desc4a_set_mobile_nid
(
desc
,
onid
+
1000
);
desc4a_set_mobile_initial_sid
(
desc
,
sid
+
1000
);
desc4a_set_length
(
desc
);
}
static
void
build_desc4a_event
(
uint8_t
*
desc
)
{
desc4a_init
(
desc
);
desc4a_set_tsid
(
desc
,
tsid
+
700
);
desc4a_set_onid
(
desc
,
onid
+
700
);
desc4a_set_sid
(
desc
,
sid
+
700
);
// event linkage
desc4a_set_linkage
(
desc
,
DESC4A_LINKAGE_EVENT
);
desc4a_set_event_target_event_id
(
desc
,
event_id
+
1000
);
desc4a_set_event_target_listed
(
desc
,
true
);
desc4a_set_event_simulcast
(
desc
,
true
);
desc4a_set_length
(
desc
);
}
static
void
build_desc4a_extended_event
(
uint8_t
*
desc
)
{
uint8_t
k
=
0
;
uint8_t
*
ext_n
;
desc4a_init
(
desc
);
desc4a_set_tsid
(
desc
,
tsid
+
800
);
desc4a_set_onid
(
desc
,
onid
+
800
);
desc4a_set_sid
(
desc
,
sid
+
800
);
// extended event linkage
desc4a_set_linkage
(
desc
,
DESC4A_LINKAGE_EXT_EVENT
);
desc_set_length
(
desc
,
255
);
ext_n
=
desc4a_get_ext_event
(
desc
,
k
++
);
desc4an_set_ext_event_target_event_id
(
ext_n
,
event_id
+
1000
);
desc4an_set_ext_event_target_listed
(
ext_n
,
false
);
desc4an_set_ext_event_simulcast
(
ext_n
,
true
);
desc4an_set_ext_event_link_type
(
ext_n
,
1
);
// HD
desc4an_set_ext_event_target_id_type
(
ext_n
,
3
);
// user defined id
desc4an_set_ext_event_onid_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_service_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_user_defined_id
(
ext_n
,
7878
);
desc4an_set_ext_event_target_tsid
(
ext_n
,
tsid
+
1000
);
// !!!
desc4an_set_ext_event_target_onid
(
ext_n
,
onid
+
1000
);
// !!!
desc4an_set_ext_event_service_id
(
ext_n
,
sid
+
1000
);
// !!!
ext_n
=
desc4a_get_ext_event
(
desc
,
k
++
);
desc4an_set_ext_event_target_event_id
(
ext_n
,
event_id
+
2000
);
desc4an_set_ext_event_target_listed
(
ext_n
,
true
);
desc4an_set_ext_event_simulcast
(
ext_n
,
true
);
desc4an_set_ext_event_link_type
(
ext_n
,
0
);
// SD
desc4an_set_ext_event_target_id_type
(
ext_n
,
0
);
// onid_id_flag, target_service_id_flag
desc4an_set_ext_event_onid_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_service_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_user_defined_id
(
ext_n
,
8787
);
// !!!
desc4an_set_ext_event_target_tsid
(
ext_n
,
tsid
+
2000
);
// !!!
desc4an_set_ext_event_target_onid
(
ext_n
,
onid
+
2000
);
desc4an_set_ext_event_service_id
(
ext_n
,
sid
+
2000
);
ext_n
=
desc4a_get_ext_event
(
desc
,
k
++
);
desc4an_set_ext_event_target_event_id
(
ext_n
,
event_id
+
3000
);
desc4an_set_ext_event_target_listed
(
ext_n
,
true
);
desc4an_set_ext_event_simulcast
(
ext_n
,
true
);
desc4an_set_ext_event_link_type
(
ext_n
,
2
);
// 3D
desc4an_set_ext_event_target_id_type
(
ext_n
,
1
);
// target_tsid, onid_id_flag, target_service_id_flag
desc4an_set_ext_event_onid_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_service_id_flag
(
ext_n
,
true
);
desc4an_set_ext_event_user_defined_id
(
ext_n
,
8787
);
// !!!
desc4an_set_ext_event_target_tsid
(
ext_n
,
tsid
+
3000
);
desc4an_set_ext_event_target_onid
(
ext_n
,
onid
+
3000
);
desc4an_set_ext_event_service_id
(
ext_n
,
sid
+
3000
);
ext_n
=
desc4a_get_ext_event
(
desc
,
k
++
);
desc4an_set_ext_event_target_event_id
(
ext_n
,
event_id
+
4000
);
desc4an_set_ext_event_target_listed
(
ext_n
,
false
);
desc4an_set_ext_event_simulcast
(
ext_n
,
false
);
desc4an_set_ext_event_link_type
(
ext_n
,
0
);
// SD
desc4an_set_ext_event_target_id_type
(
ext_n
,
0
);
// onid_id_flag, target_service_id_flag
desc4an_set_ext_event_onid_id_flag
(
ext_n
,
false
);
desc4an_set_ext_event_service_id_flag
(
ext_n
,
false
);
desc4an_set_ext_event_user_defined_id
(
ext_n
,
8787
);
// !!!
desc4an_set_ext_event_target_tsid
(
ext_n
,
tsid
+
4000
);
// !!!
desc4an_set_ext_event_target_onid
(
ext_n
,
onid
+
4000
);
// !!!
desc4an_set_ext_event_service_id
(
ext_n
,
sid
+
4000
);
// !!!
ext_n
=
desc4a_get_ext_event
(
desc
,
k
);
desc_set_length
(
desc
,
ext_n
-
desc
-
DESC_HEADER_SIZE
);
}
/* DVB Descriptor 0x4b: NVOD_reference_descriptor */
static
void
build_desc4b
(
uint8_t
*
desc
,
bool
b_available
)
{
uint8_t
k
=
0
;
...
...
@@ -1462,6 +1565,9 @@ static void generate_nit(void) {
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc41
(
desc
);
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc4a_std
(
desc
);
// Finish descriptor generation
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
);
// Get next descriptor pos
descs_set_length
(
desc_loop
,
desc
-
desc_loop
-
DESCS_HEADER_SIZE
);
...
...
@@ -1488,6 +1594,9 @@ static void generate_nit(void) {
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc41
(
desc
);
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc4a_mobile
(
desc
);
// Finish descriptor generation
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
);
// Get next descriptor pos
descs_set_length
(
desc_loop
,
desc
-
desc_loop
-
DESCS_HEADER_SIZE
);
...
...
@@ -1860,6 +1969,9 @@ static void generate_eit(void) {
desc_loop
=
eitn_get_descs
(
eit_n
);
descs_set_length
(
desc_loop
,
DESCS_MAX_SIZE
);
// This is needed so descs_get_desc(x, n) works
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc4a_event
(
desc
);
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc4e
(
desc
);
...
...
@@ -1887,6 +1999,9 @@ static void generate_eit(void) {
desc_loop
=
eitn_get_descs
(
eit_n
);
descs_set_length
(
desc_loop
,
DESCS_MAX_SIZE
);
// This is needed so descs_get_desc(x, n) works
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc4a_extended_event
(
desc
);
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc54
(
desc
);
...
...
examples/dvb_print_si.output.txt
View file @
ef59fee1
...
...
@@ -45,12 +45,15 @@ new NIT actual networkid=40000 version=1
- desc 41 service_list sid=20100 type=0x02
- desc 41 service_list sid=20200 type=0x01
- desc 41 service_list sid=20300 type=0x02
- desc 4a linkage tsid=10500 onid=40500 sid=0 linkage=0x04 linkage_txt="TS containing complete Network/Bouquet SI"
* ts tsid=10100 onid=40100
* ts tsid=10200 onid=40200
- desc 41 service_list sid=20000 type=0x01
- desc 41 service_list sid=20100 type=0x02
- desc 41 service_list sid=20200 type=0x01
- desc 41 service_list sid=20300 type=0x02
- desc 4a linkage tsid=10600 onid=40600 sid=20600 linkage=0x08 linkage_txt="mobile hand-over"
- mobile_handover handover_type=1 origin_type=0 nid=41000 initial_sid=21000
* ts tsid=10300 onid=40300
end NIT
new BAT networkid=40000 version=0
...
...
@@ -124,6 +127,8 @@ new EIT tableid=0x4e type=actual_pf version=1 tsid=10000 onid=40000 seg_last_sec
* EVENT id=30000 start_time=1234567890 start_time_dec="2009-02-13 23:31:30 UTC" duration=86399 duration_dec=23:59:59 running_status=2 free_CA_mode=0
- desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!"
* EVENT id=30100 start_time=1 start_time_dec="1970-01-01 00:00:01 UTC" duration=3600 duration_dec=01:00:00 running_status=1 free_CA_mode=0
- desc 4a linkage tsid=10700 onid=40700 sid=20700 linkage=0x0d linkage_txt="event linkage"
- event_linkage target_event_id=31000 target_listed=1 event_simulcast=1
- desc 4e extended_event desc_number=0 last_desc_number=0 lang=eng text="Wow, what an event!"
- extended_event_item description="Director" text="Famous director"
- extended_event_item description="Year" text="2011"
...
...
@@ -131,6 +136,11 @@ new EIT tableid=0x4e type=actual_pf version=1 tsid=10000 onid=40000 seg_last_sec
- desc 4d short_event lang=eng event_name="Major TV event" text="The event of the century!"
- desc 61 short_smoothing_buffer sb_size=1 sb_leak_rate=10
* EVENT id=30200 start_time=999999999 start_time_dec="2001-09-09 01:46:39 UTC" duration=7200 duration_dec=02:00:00 running_status=0 free_CA_mode=0
- desc 4a linkage tsid=10800 onid=40800 sid=20800 linkage=0x0e linkage_txt="extended event linkage"
- extended_event_linkage target_event_id=31000 target_listed=0 event_simulcast=1 link_type=1 link_type_txt="HD" target_id_type=3 target_id_type_txt="use user_defined_id" onid_id_flag=1 service_id_flag=1 user_defined_id=7878 target_tsid=0 target_onid=0 target_service_id=0
- extended_event_linkage target_event_id=32000 target_listed=1 event_simulcast=1 link_type=0 link_type_txt="SD" target_id_type=0 target_id_type_txt="use tsid" onid_id_flag=1 service_id_flag=1 user_defined_id=0 target_tsid=0 target_onid=42000 target_service_id=22000
- extended_event_linkage target_event_id=33000 target_listed=1 event_simulcast=1 link_type=2 link_type_txt="3D" target_id_type=1 target_id_type_txt="use target_tsid" onid_id_flag=1 service_id_flag=1 user_defined_id=0 target_tsid=13000 target_onid=43000 target_service_id=23000
- extended_event_linkage target_event_id=34000 target_listed=0 event_simulcast=0 link_type=0 link_type_txt="SD" target_id_type=0 target_id_type_txt="use tsid" onid_id_flag=0 service_id_flag=0 user_defined_id=0 target_tsid=0 target_onid=0 target_service_id=0
- desc 54 content content_l1=2 content_l2=4 user=78
- desc 54 content content_l1=6 content_l2=8 user=177
- desc 53 ca_identifier ca_sysid=0xaabb
...
...
examples/dvb_print_si.output.xml
View file @
ef59fee1
...
...
@@ -73,6 +73,10 @@
<SERVICE_LIST_DESC
sid=
"20200"
type=
"0x01"
/>
<SERVICE_LIST_DESC
sid=
"20300"
type=
"0x02"
/>
</DESC>
<DESC
id=
"0x4a"
length=
"7"
value=
"29049e34000004"
>
<LINKAGE_DESC
tsid=
"10500"
onid=
"40500"
sid=
"0"
linkage=
"0x04"
linkage_txt=
"TS containing complete Network/Bouquet SI"
>
</LINKAGE_DESC>
</DESC>
</TS>
<TS
tsid=
"10100"
onid=
"40100"
>
</TS>
...
...
@@ -83,6 +87,11 @@
<SERVICE_LIST_DESC
sid=
"20200"
type=
"0x01"
/>
<SERVICE_LIST_DESC
sid=
"20300"
type=
"0x02"
/>
</DESC>
<DESC
id=
"0x4a"
length=
"12"
value=
"29689e985078081ea0285208"
>
<LINKAGE_DESC
tsid=
"10600"
onid=
"40600"
sid=
"20600"
linkage=
"0x08"
linkage_txt=
"mobile hand-over"
>
<MOBILE_HANDOVER_INFO
handover_type=
"1"
origin_type=
"0"
nid=
"41000"
initial_sid=
"21000"
/>
</LINKAGE_DESC>
</DESC>
</TS>
<TS
tsid=
"10300"
onid=
"40300"
>
</TS>
...
...
@@ -215,6 +224,11 @@
</DESC>
</EVENT>
<EVENT
id=
"30100"
start_time=
"1"
start_time_dec=
"1970-01-01 00:00:01 UTC"
duration=
"3600"
duration_dec=
"01:00:00"
running_status=
"1"
free_CA_mode=
"0"
>
<DESC
id=
"0x4a"
length=
"10"
value=
"29cc9efc50dc0d7918ff"
>
<LINKAGE_DESC
tsid=
"10700"
onid=
"40700"
sid=
"20700"
linkage=
"0x0d"
linkage_txt=
"event linkage"
>
<EVENT_LINKAGE
target_event_id=
"31000"
target_listed=
"1"
event_simulcast=
"1"
/>
</LINKAGE_DESC>
</DESC>
<DESC
id=
"0x4e"
length=
"73"
value=
"00656e6730084469726563746f720f46616d6f7573206469726563746f720459656172043230313106526174696e67052a2a2a2b2b13576f772c207768617420616e206576656e7421"
>
<EXTENDED_EVENT_DESC
desc_number=
"0"
last_desc_number=
"0"
lang=
"eng"
text=
"Wow, what an event!"
>
<EXTENDED_EVENT_ITEM
description=
"Director"
text=
"Famous director"
/>
...
...
@@ -230,6 +244,14 @@
</DESC>
</EVENT>
<EVENT
id=
"30200"
start_time=
"999999999"
start_time_dec=
"2001-09-09 01:46:39 UTC"
duration=
"7200"
duration_dec=
"02:00:00"
running_status=
"0"
free_CA_mode=
"0"
>
<DESC
id=
"0x4a"
length=
"31"
value=
"2a309f6051400e79185f1ec67d00c3a41055f080e8e732c8a7f859d884d000"
>
<LINKAGE_DESC
tsid=
"10800"
onid=
"40800"
sid=
"20800"
linkage=
"0x0e"
linkage_txt=
"extended event linkage"
>
<EXTENDED_EVENT_LINKAGE
target_event_id=
"31000"
target_listed=
"0"
event_simulcast=
"1"
link_type=
"1"
link_type_txt=
"HD"
target_id_type=
"3"
target_id_type_txt=
"use user_defined_id"
onid_id_flag=
"1"
service_id_flag=
"1"
user_defined_id=
"7878"
target_tsid=
"0"
target_onid=
"0"
target_service_id=
"0"
/>
<EXTENDED_EVENT_LINKAGE
target_event_id=
"32000"
target_listed=
"1"
event_simulcast=
"1"
link_type=
"0"
link_type_txt=
"SD"
target_id_type=
"0"
target_id_type_txt=
"use tsid"
onid_id_flag=
"1"
service_id_flag=
"1"
user_defined_id=
"0"
target_tsid=
"0"
target_onid=
"42000"
target_service_id=
"22000"
/>
<EXTENDED_EVENT_LINKAGE
target_event_id=
"33000"
target_listed=
"1"
event_simulcast=
"1"
link_type=
"2"
link_type_txt=
"3D"
target_id_type=
"1"
target_id_type_txt=
"use target_tsid"
onid_id_flag=
"1"
service_id_flag=
"1"
user_defined_id=
"0"
target_tsid=
"13000"
target_onid=
"43000"
target_service_id=
"23000"
/>
<EXTENDED_EVENT_LINKAGE
target_event_id=
"34000"
target_listed=
"0"
event_simulcast=
"0"
link_type=
"0"
link_type_txt=
"SD"
target_id_type=
"0"
target_id_type_txt=
"use tsid"
onid_id_flag=
"0"
service_id_flag=
"0"
user_defined_id=
"0"
target_tsid=
"0"
target_onid=
"0"
target_service_id=
"0"
/>
</LINKAGE_DESC>
</DESC>
<DESC
id=
"0x54"
length=
"4"
value=
"244e68b1"
>
<CONTENT_DESC
content_l1=
"2"
content_l2=
"4"
user=
"78"
/>
<CONTENT_DESC
content_l1=
"6"
content_l2=
"8"
user=
"177"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment