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
96aa2972
Commit
96aa2972
authored
Oct 10, 2011
by
Georgi Chorbadzhiyski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg/psi: Print text value of audiotype in descriptor 0x0a (Audio language).
parent
ab92287b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
mpeg/psi/desc_0a.h
mpeg/psi/desc_0a.h
+17
-4
No files found.
mpeg/psi/desc_0a.h
View file @
96aa2972
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
* Copyright (C) 2009-2010 VideoLAN
* Copyright (C) 2009-2010 VideoLAN
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Georgi Chorbadzhiyski <georgi@unixsol.org>
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* a copy of this software and associated documentation files (the
...
@@ -83,6 +84,14 @@ static inline uint8_t desc0an_get_audiotype(const uint8_t *p_desc_n)
...
@@ -83,6 +84,14 @@ static inline uint8_t desc0an_get_audiotype(const uint8_t *p_desc_n)
return
p_desc_n
[
3
];
return
p_desc_n
[
3
];
}
}
static
inline
const
char
*
desc0a_get_audiotype_txt
(
uint8_t
audio_type
)
{
return
audio_type
==
0x00
?
"undefined"
:
audio_type
==
0x01
?
"clean effects"
:
audio_type
==
0x02
?
"hearing impaired"
:
audio_type
==
0x03
?
"visual impaired commentary"
:
"reserved"
;
}
static
inline
bool
desc0a_validate
(
const
uint8_t
*
p_desc
)
static
inline
bool
desc0a_validate
(
const
uint8_t
*
p_desc
)
{
{
return
!
(
desc_get_length
(
p_desc
)
%
DESC0A_LANGUAGE_SIZE
);
return
!
(
desc_get_length
(
p_desc
)
%
DESC0A_LANGUAGE_SIZE
);
...
@@ -98,14 +107,18 @@ static inline void desc0a_print(uint8_t *p_desc, f_print pf_print,
...
@@ -98,14 +107,18 @@ static inline void desc0a_print(uint8_t *p_desc, f_print pf_print,
j
++
;
j
++
;
switch
(
i_print_type
)
{
switch
(
i_print_type
)
{
case
PRINT_XML
:
case
PRINT_XML
:
pf_print
(
opaque
,
"<AUDIO_LANGUAGE_DESC language=
\"
%3.3s
\"
audiotype=
\"
0x%hhx
\"
/>"
,
pf_print
(
opaque
,
"<AUDIO_LANGUAGE_DESC language=
\"
%3.3s
\"
audiotype=
\"
%u
\"
autiotype_txt=
\"
%s
\"
/>"
,
(
const
char
*
)
desc0an_get_code
(
p_desc_n
),
(
const
char
*
)
desc0an_get_code
(
p_desc_n
),
desc0an_get_audiotype
(
p_desc_n
));
desc0an_get_audiotype
(
p_desc_n
),
desc0a_get_audiotype_txt
(
desc0an_get_audiotype
(
p_desc_n
))
);
break
;
break
;
default:
default:
pf_print
(
opaque
,
" - desc 0a audio_language language=%3.3s audiotype=
0x%hhx
"
,
pf_print
(
opaque
,
" - desc 0a audio_language language=%3.3s audiotype=
%u audiotype_txt=
\"
%s
\"
"
,
(
const
char
*
)
desc0an_get_code
(
p_desc_n
),
(
const
char
*
)
desc0an_get_code
(
p_desc_n
),
desc0an_get_audiotype
(
p_desc_n
));
desc0an_get_audiotype
(
p_desc_n
),
desc0a_get_audiotype_txt
(
desc0an_get_audiotype
(
p_desc_n
))
);
}
}
}
}
}
}
...
...
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