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
cafd3176
Commit
cafd3176
authored
Oct 12, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb/si: Add support for descriptor 0x68 (DSNG descriptor).
parent
cb5e4762
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
4 deletions
+90
-4
README
README
+1
-0
TODO
TODO
+0
-1
dvb/si/desc_67.h
dvb/si/desc_67.h
+7
-2
dvb/si/desc_68.h
dvb/si/desc_68.h
+66
-0
dvb/si/descs_list.h
dvb/si/descs_list.h
+1
-0
examples/dvb_gen_si.c
examples/dvb_gen_si.c
+10
-1
examples/dvb_print_si.output.txt
examples/dvb_print_si.output.txt
+1
-0
examples/dvb_print_si.output.xml
examples/dvb_print_si.output.xml
+3
-0
mpeg/psi/descs_print.h
mpeg/psi/descs_print.h
+1
-0
No files found.
README
View file @
cafd3176
...
...
@@ -137,6 +137,7 @@ Supported DVB descriptors
* Descriptor 0x65: Scrambling descriptor
* Descriptor 0x66: Data broadcast id descriptor
* Descriptor 0x67: Transport stream descriptor
* Descriptor 0x68: DSNG descriptor
* Descriptor 0x6a: AC-3 descriptor [p]
Legend:
...
...
TODO
View file @
cafd3176
...
...
@@ -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 0x68: DSNG_descriptor
- Descriptor 0x69: PDC_descriptor
- Descriptor 0x6b: ancillary_data_descriptor
- Descriptor 0x6c: cell_list_descriptor
...
...
dvb/si/desc_67.h
View file @
cafd3176
...
...
@@ -78,6 +78,7 @@ static inline void desc67_print(const uint8_t *p_desc, f_print pf_print,
void
*
opaque
,
print_type_t
i_print_type
)
{
uint8_t
i_bytes_length
,
i
;
bool
b_dsng_desc
=
desc_get_tag
(
p_desc
)
==
0x68
;
const
uint8_t
*
p_bytes
=
desc67_get_bytes
(
p_desc
,
&
i_bytes_length
);
char
psz_bytes
[
2
*
255
+
1
];
char
psz_bytes_txt
[
255
+
1
];
...
...
@@ -95,14 +96,18 @@ static inline void desc67_print(const uint8_t *p_desc, f_print pf_print,
switch
(
i_print_type
)
{
case
PRINT_XML
:
pf_print
(
opaque
,
"<TRANSPORT_STREAM_DESC bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
/>"
,
!
b_dsng_desc
?
"<TRANSPORT_STREAM_DESC bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
/>"
:
"<DSNG_DESC bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
/>"
,
psz_bytes
,
psz_bytes_txt
);
break
;
default:
pf_print
(
opaque
,
" - desc 67 transport_stream bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
"
,
!
b_dsng_desc
?
" - desc 67 transport_stream bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
"
:
" - desc 68 dsng bytes=
\"
%s
\"
bytes_txt=
\"
%s
\"
"
,
psz_bytes
,
psz_bytes_txt
);
...
...
dvb/si/desc_68.h
0 → 100644
View file @
cafd3176
/*****************************************************************************
* desc_68.h: ETSI EN 300 468 Descriptor 0x68: DSNG descriptor
*****************************************************************************
* Copyright (C) 2011 Unix Solutions Ltd.
*
* Authors: Georgi Chorbadzhiyski <georgi@unixsol.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*****************************************************************************/
/*
* Normative references:
* - ETSI EN 300 468 V1.11.1 (2010-04) (SI in DVB systems)
*/
#ifndef __BITSTREAM_DVB_DESC_68_H__
#define __BITSTREAM_DVB_DESC_68_H__
#include <bitstream/common.h>
#include <bitstream/mpeg/psi/descriptors.h>
#include <bitstream/dvb/si/desc_67.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/*****************************************************************************
* Descriptor 0x68: DSNG descriptor
*****************************************************************************/
#define DESC68_HEADER_SIZE DESC_HEADER_SIZE
static
inline
void
desc68_init
(
uint8_t
*
p_desc
)
{
desc_set_tag
(
p_desc
,
0x68
);
desc_set_length
(
p_desc
,
0
);
}
#define desc68_get_bytes_length desc67_get_bytes_length
#define desc68_get_bytes desc67_get_bytes
#define desc68_set_bytes desc67_set_bytes
#define desc68_validate desc67_validate
#define desc68_print desc67_print
#ifdef __cplusplus
}
#endif
#endif
dvb/si/descs_list.h
View file @
cafd3176
...
...
@@ -74,6 +74,7 @@
#include <bitstream/dvb/si/desc_65.h>
#include <bitstream/dvb/si/desc_66.h>
#include <bitstream/dvb/si/desc_67.h>
#include <bitstream/dvb/si/desc_68.h>
#include <bitstream/dvb/si/desc_6a.h>
#include <bitstream/dvb/si/desc_83p28.h>
#include <bitstream/dvb/si/desc_88p28.h>
...
...
examples/dvb_gen_si.c
View file @
cafd3176
...
...
@@ -1084,7 +1084,13 @@ static void build_desc67(uint8_t *desc, char *bytes) {
desc67_set_bytes
(
desc
,
(
uint8_t
*
)
bytes
,
strlen
(
bytes
));
}
/* --- Descriptor 0x68: DSNG_descriptor */
/* DVB Descriptor 0x68: DSNG_descriptor */
static
void
build_desc68
(
uint8_t
*
desc
)
{
char
*
dsng_bytes
=
"1234,SNG_Headquarter,SNG_Provider"
;
desc68_init
(
desc
);
desc68_set_bytes
(
desc
,
(
uint8_t
*
)
dsng_bytes
,
strlen
(
dsng_bytes
));
}
/* --- Descriptor 0x69: PDC_descriptor */
/* DVB Descriptor 0x6a: AC-3 descriptor */
/* --- Descriptor 0x6b: ancillary_data_descriptor */
...
...
@@ -1280,6 +1286,9 @@ static void generate_tsdt(void) {
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc67
(
desc
,
"CONT"
);
desc
=
descs_get_desc
(
desc_loop
,
desc_counter
++
);
build_desc68
(
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
);
...
...
examples/dvb_print_si.output.txt
View file @
cafd3176
...
...
@@ -23,6 +23,7 @@ end TSDT
new TSDT version=1
- desc 67 transport_stream bytes="445642" bytes_txt="DVB"
- desc 67 transport_stream bytes="434f4e54" bytes_txt="CONT"
- desc 68 dsng bytes="313233342c534e475f48656164717561727465722c534e475f50726f7669646572" bytes_txt="1234,SNG_Headquarter,SNG_Provider"
end TSDT
new NIT actual networkid=40000 version=0
end NIT
...
...
examples/dvb_print_si.output.xml
View file @
cafd3176
...
...
@@ -35,6 +35,9 @@
<DESC
id=
"0x67"
length=
"4"
value=
"434f4e54"
>
<TRANSPORT_STREAM_DESC
bytes=
"434f4e54"
bytes_txt=
"CONT"
/>
</DESC>
<DESC
id=
"0x68"
length=
"33"
value=
"313233342c534e475f48656164717561727465722c534e475f50726f7669646572"
>
<DSNG_DESC
bytes=
"313233342c534e475f48656164717561727465722c534e475f50726f7669646572"
bytes_txt=
"1234,SNG_Headquarter,SNG_Provider"
/>
</DESC>
</TSDT>
<NIT
tid=
"64"
networkid=
"40000"
version=
"0"
current_next=
"1"
>
</NIT>
...
...
mpeg/psi/descs_print.h
View file @
cafd3176
...
...
@@ -168,6 +168,7 @@ static inline void descl_print(uint8_t *p_descl, uint16_t i_length,
CASE_DESC
(
65
)
CASE_DESC
(
66
)
CASE_DESC
(
67
)
CASE_DESC
(
68
)
CASE_DESC
(
6
a
)
#undef CASE_DESC
...
...
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