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
cc9231ee
Commit
cc9231ee
authored
Oct 10, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg/psi/pmt_print: Show text value of stream type.
parent
853d0789
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
5 deletions
+48
-5
mpeg/psi/pmt.h
mpeg/psi/pmt.h
+38
-0
mpeg/psi/pmt_print.h
mpeg/psi/pmt_print.h
+10
-5
No files found.
mpeg/psi/pmt.h
View file @
cc9231ee
...
...
@@ -114,6 +114,44 @@ static inline uint8_t pmtn_get_streamtype(const uint8_t *p_pmt_n)
return
p_pmt_n
[
0
];
}
static
inline
const
char
*
pmt_get_streamtype_txt
(
uint8_t
i_stream_type
)
{
/* ISO/IEC 13818-1 | Table 2-36 - Stream type assignments */
if
(
i_stream_type
==
0
||
(
i_stream_type
>
0x1c
&&
i_stream_type
<
0x7e
))
return
"Reserved"
;
switch
(
i_stream_type
)
{
case
0x01
:
return
"11172-2 video (MPEG-1)"
;
case
0x02
:
return
"13818-2 video (MPEG-2)"
;
case
0x03
:
return
"11172-3 audio (MPEG-1)"
;
case
0x04
:
return
"13818-3 audio (MPEG-2)"
;
case
0x05
:
return
"13818-1 private sections"
;
case
0x06
:
return
"13818-1 PES private data"
;
case
0x07
:
return
"13522 MHEG"
;
case
0x08
:
return
"H.222.0/13818-1 Annex A - DSM CC"
;
case
0x09
:
return
"H.222.1"
;
case
0x0A
:
return
"13818-6 type A"
;
case
0x0B
:
return
"13818-6 type B"
;
case
0x0C
:
return
"13818-6 type C"
;
case
0x0D
:
return
"13818-6 type D"
;
case
0x0E
:
return
"H.222.0/13818-1 auxiliary"
;
case
0x0F
:
return
"13818-7 Audio with ADTS transport syntax"
;
case
0x10
:
return
"14496-2 Visual (MPEG-4 part 2 video)"
;
case
0x11
:
return
"14496-3 Audio with LATM transport syntax (14496-3/AMD 1)"
;
case
0x12
:
return
"14496-1 SL-packetized or FlexMux stream in PES packets"
;
case
0x13
:
return
"14496-1 SL-packetized or FlexMux stream in 14496 sections"
;
case
0x14
:
return
"ISO/IEC 13818-6 Synchronized Download Protocol"
;
case
0x15
:
return
"Metadata in PES packets"
;
case
0x16
:
return
"Metadata in metadata_sections"
;
case
0x17
:
return
"Metadata in 13818-6 Data Carousel"
;
case
0x18
:
return
"Metadata in 13818-6 Object Carousel"
;
case
0x19
:
return
"Metadata in 13818-6 Synchronized Download Protocol"
;
case
0x1A
:
return
"13818-11 MPEG-2 IPMP stream"
;
case
0x1B
:
return
"H.264/14496-10 video (MPEG-4/AVC)"
;
case
0x42
:
return
"AVS Video"
;
case
0x7F
:
return
"IPMP stream"
;
default
:
return
"Unknown"
;
}
}
static
inline
void
pmtn_set_pid
(
uint8_t
*
p_pmt_n
,
uint16_t
i_pid
)
{
p_pmt_n
[
1
]
&=
~
0x1f
;
...
...
mpeg/psi/pmt_print.h
View file @
cc9231ee
...
...
@@ -30,7 +30,6 @@
#include <bitstream/common.h>
#include <bitstream/mpeg/psi/psi.h>
#include <bitstream/mpeg/psi/descriptors.h>
#include <bitstream/mpeg/psi/descs_print.h>
#include <bitstream/mpeg/psi/pmt.h>
...
...
@@ -68,12 +67,18 @@ static inline void pmt_print(uint8_t *p_pmt,
j
++
;
switch
(
i_print_type
)
{
case
PRINT_XML
:
pf_print
(
print_opaque
,
"<ES pid=
\"
%hu
\"
streamtype=
\"
0x%hx
\"
>"
,
pmtn_get_pid
(
p_es
),
pmtn_get_streamtype
(
p_es
));
pf_print
(
print_opaque
,
"<ES pid=
\"
%hu
\"
streamtype=
\"
0x%02x
\"
streamtype_txt=
\"
%s
\"
>"
,
pmtn_get_pid
(
p_es
),
pmtn_get_streamtype
(
p_es
),
pmt_get_streamtype_txt
(
pmtn_get_streamtype
(
p_es
))
);
break
;
default:
pf_print
(
print_opaque
,
" * ES pid=%hu streamtype=0x%hx"
,
pmtn_get_pid
(
p_es
),
pmtn_get_streamtype
(
p_es
));
pf_print
(
print_opaque
,
" * ES pid=%hu streamtype=0x%02x streamtype_txt=
\"
%s
\"
"
,
pmtn_get_pid
(
p_es
),
pmtn_get_streamtype
(
p_es
),
pmt_get_streamtype_txt
(
pmtn_get_streamtype
(
p_es
))
);
}
descs_print
(
pmtn_get_descs
(
p_es
),
pf_print
,
print_opaque
,
...
...
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