Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6c8c7c24
Commit
6c8c7c24
authored
May 01, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: Print AVAudioServiceType side data
parent
04070dbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
dump.c
libavformat/dump.c
+47
-0
No files found.
libavformat/dump.c
View file @
6c8c7c24
...
...
@@ -275,6 +275,49 @@ static void dump_stereo3d(void *ctx, AVPacketSideData *sd)
av_log
(
ctx
,
AV_LOG_INFO
,
" (inverted)"
);
}
static
void
dump_audioservicetype
(
void
*
ctx
,
AVPacketSideData
*
sd
)
{
enum
AVAudioServiceType
*
ast
=
(
enum
AVAudioServiceType
*
)
sd
->
data
;
if
(
sd
->
size
<
sizeof
(
*
ast
))
{
av_log
(
ctx
,
AV_LOG_INFO
,
"invalid data"
);
return
;
}
switch
(
*
ast
)
{
case
AV_AUDIO_SERVICE_TYPE_MAIN
:
av_log
(
ctx
,
AV_LOG_INFO
,
"main"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_EFFECTS
:
av_log
(
ctx
,
AV_LOG_INFO
,
"effects"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
:
av_log
(
ctx
,
AV_LOG_INFO
,
"visually impaired"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
:
av_log
(
ctx
,
AV_LOG_INFO
,
"hearing impaired"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_DIALOGUE
:
av_log
(
ctx
,
AV_LOG_INFO
,
"dialogue"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_COMMENTARY
:
av_log
(
ctx
,
AV_LOG_INFO
,
"comentary"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_EMERGENCY
:
av_log
(
ctx
,
AV_LOG_INFO
,
"emergency"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_VOICE_OVER
:
av_log
(
ctx
,
AV_LOG_INFO
,
"voice over"
);
break
;
case
AV_AUDIO_SERVICE_TYPE_KARAOKE
:
av_log
(
ctx
,
AV_LOG_INFO
,
"karaoke"
);
break
;
default:
av_log
(
ctx
,
AV_LOG_WARNING
,
"unknown"
);
break
;
}
}
static
void
dump_sidedata
(
void
*
ctx
,
AVStream
*
st
,
const
char
*
indent
)
{
int
i
;
...
...
@@ -312,6 +355,10 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
av_log
(
ctx
,
AV_LOG_INFO
,
"stereo3d: "
);
dump_stereo3d
(
ctx
,
&
sd
);
break
;
case
AV_PKT_DATA_AUDIO_SERVICE_TYPE
:
av_log
(
ctx
,
AV_LOG_INFO
,
"audio service type: "
);
dump_audioservicetype
(
ctx
,
&
sd
);
break
;
default:
av_log
(
ctx
,
AV_LOG_WARNING
,
"unknown side data type %d (%d bytes)"
,
sd
.
type
,
sd
.
size
);
...
...
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