Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
9607e755
Commit
9607e755
authored
Jun 10, 2015
by
Daniel Kamil Kozar
Committed by
Jean-Paul Saman
Jun 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump the content labelling descriptor in dvbinfo
Signed-off-by:
Jean-Paul Saman
<
jpsaman@videolan.org
>
parent
151adbdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
examples/dvbinfo/libdvbpsi.c
examples/dvbinfo/libdvbpsi.c
+68
-0
No files found.
examples/dvbinfo/libdvbpsi.c
View file @
9607e755
...
...
@@ -772,6 +772,18 @@ static void handle_PAT(void* p_data, dvbpsi_pat_t* p_pat)
dvbpsi_pat_delete
(
p_pat
);
}
static
void
dump_hex_data
(
const
char
*
prefix
,
const
uint8_t
*
data
,
unsigned
int
length
)
{
unsigned
int
i
;
printf
(
"%s : [ "
,
prefix
);
for
(
i
=
0
;
i
<
length
;
++
i
)
{
printf
(
"0x%02"
PRIx8
" "
,
data
[
i
]);
}
printf
(
"]
\n
"
);
}
/*****************************************************************************
* GetTypeName of PMT stream_type
*****************************************************************************/
...
...
@@ -1046,6 +1058,58 @@ static void DumpMPEG4AudioDescriptor(const void *p_descriptor)
mpeg4_descriptor
->
i_mpeg4_audio_profile_and_level
);
}
static
void
DumpContentLabellingDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_content_labelling_dr_t
*
p_content_lbl_dr
=
p_descriptor
;
printf
(
"Metadata application format : 0x%04"
PRIx16
"
\n
"
,
p_content_lbl_dr
->
i_metadata_application_format
);
if
(
p_content_lbl_dr
->
i_metadata_application_format
==
0xFFFF
)
{
printf
(
"
\t\t
Metadata application format identifier : 0x%08"
PRIx32
"
\n
"
,
p_content_lbl_dr
->
i_metadata_application_format_identifier
);
}
printf
(
"
\t\t
Content reference ID record flag : %d
\n
"
,
p_content_lbl_dr
->
b_content_reference_id_record_flag
);
printf
(
"
\t\t
Content time base indicator : 0x%02"
PRIx8
"
\n
"
,
p_content_lbl_dr
->
i_content_time_base_indicator
);
if
(
p_content_lbl_dr
->
b_content_reference_id_record_flag
)
{
dump_hex_data
(
"
\t\t
Content reference ID"
,
p_content_lbl_dr
->
p_content_reference_id
,
p_content_lbl_dr
->
i_content_reference_id_record_length
);
}
if
(
p_content_lbl_dr
->
i_content_time_base_indicator
==
1
||
p_content_lbl_dr
->
i_content_time_base_indicator
==
2
)
{
printf
(
"
\t\t
Content time base value : 0x%09"
PRIx64
"
\n
"
,
p_content_lbl_dr
->
i_content_time_base_value
);
printf
(
"
\t\t
Metadata time base value : 0x%09"
PRIx64
"
\n
"
,
p_content_lbl_dr
->
i_metadata_time_base_value
);
}
if
(
p_content_lbl_dr
->
i_content_time_base_indicator
==
2
)
{
printf
(
"
\t\t
contentId : 0x%02"
PRIx8
"
\n
"
,
p_content_lbl_dr
->
i_contentId
);
}
if
(
p_content_lbl_dr
->
i_content_time_base_indicator
>=
3
&&
p_content_lbl_dr
->
i_content_time_base_indicator
<=
7
)
{
dump_hex_data
(
"
\t\t
Time base association data"
,
p_content_lbl_dr
->
p_time_base_association_data
,
p_content_lbl_dr
->
i_time_base_association_data_length
);
}
if
(
p_content_lbl_dr
->
i_private_data_len
)
{
dump_hex_data
(
"
\t\t
Private data"
,
p_content_lbl_dr
->
p_private_data
,
p_content_lbl_dr
->
i_private_data_len
);
}
}
/*****************************************************************************
* DumpSystemClockDescriptor
*****************************************************************************/
...
...
@@ -1655,6 +1719,10 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
p_decoded
=
dvbpsi_DecodeMPEG4AudioDr
(
p_descriptor
);
dump_dr_fn
=
DumpMPEG4AudioDescriptor
;
break
;
case
0x24
:
p_decoded
=
dvbpsi_DecodeContentLabellingDr
(
p_descriptor
);
dump_dr_fn
=
DumpContentLabellingDescriptor
;
break
;
case
0x4c
:
p_decoded
=
dvbpsi_DecodeTimeShiftedServiceDr
(
p_descriptor
);
dump_dr_fn
=
DumpTimeShiftedServiceDescriptor
;
...
...
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