Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
ec7937f4
Commit
ec7937f4
authored
Feb 29, 2024
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/iamf: remove duplicated function
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
4a134eb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
31 deletions
+15
-31
iamf.h
libavformat/iamf.h
+14
-0
iamf_reader.c
libavformat/iamf_reader.c
+1
-17
iamf_writer.h
libavformat/iamf_writer.h
+0
-14
No files found.
libavformat/iamf.h
View file @
ec7937f4
...
...
@@ -165,6 +165,20 @@ struct IAMFSoundSystemMap {
extern
const
AVChannelLayout
ff_iamf_scalable_ch_layouts
[
10
];
extern
const
struct
IAMFSoundSystemMap
ff_iamf_sound_system_map
[
13
];
static
inline
IAMFParamDefinition
*
ff_iamf_get_param_definition
(
const
IAMFContext
*
iamf
,
unsigned
int
parameter_id
)
{
IAMFParamDefinition
*
param_definition
=
NULL
;
for
(
int
i
=
0
;
i
<
iamf
->
nb_param_definitions
;
i
++
)
if
(
iamf
->
param_definitions
[
i
]
->
param
->
parameter_id
==
parameter_id
)
{
param_definition
=
iamf
->
param_definitions
[
i
];
break
;
}
return
param_definition
;
}
void
ff_iamf_free_audio_element
(
IAMFAudioElement
**
paudio_element
);
void
ff_iamf_free_mix_presentation
(
IAMFMixPresentation
**
pmix_presentation
);
void
ff_iamf_uninit_context
(
IAMFContext
*
c
);
...
...
libavformat/iamf_reader.c
View file @
ec7937f4
...
...
@@ -98,22 +98,6 @@ static int audio_frame_obu(AVFormatContext *s, const IAMFDemuxContext *c,
return
0
;
}
static
const
IAMFParamDefinition
*
get_param_definition
(
AVFormatContext
*
s
,
const
IAMFDemuxContext
*
c
,
unsigned
int
parameter_id
)
{
const
IAMFContext
*
const
iamf
=
&
c
->
iamf
;
const
IAMFParamDefinition
*
param_definition
=
NULL
;
for
(
int
i
=
0
;
i
<
iamf
->
nb_param_definitions
;
i
++
)
if
(
iamf
->
param_definitions
[
i
]
->
param
->
parameter_id
==
parameter_id
)
{
param_definition
=
iamf
->
param_definitions
[
i
];
break
;
}
return
param_definition
;
}
static
int
parameter_block_obu
(
AVFormatContext
*
s
,
IAMFDemuxContext
*
c
,
AVIOContext
*
pbc
,
int
len
)
{
...
...
@@ -144,7 +128,7 @@ static int parameter_block_obu(AVFormatContext *s, IAMFDemuxContext *c,
pb
=
&
b
.
pub
;
parameter_id
=
ffio_read_leb
(
pb
);
param_definition
=
get_param_definition
(
s
,
c
,
parameter_id
);
param_definition
=
ff_iamf_get_param_definition
(
&
c
->
iamf
,
parameter_id
);
if
(
!
param_definition
)
{
av_log
(
s
,
AV_LOG_VERBOSE
,
"Non existant parameter_id %d referenced in a parameter block. Ignoring
\n
"
,
parameter_id
);
...
...
libavformat/iamf_writer.h
View file @
ec7937f4
...
...
@@ -29,20 +29,6 @@
#include "avio.h"
#include "iamf.h"
static
inline
IAMFParamDefinition
*
ff_iamf_get_param_definition
(
const
IAMFContext
*
iamf
,
unsigned
int
parameter_id
)
{
IAMFParamDefinition
*
param_definition
=
NULL
;
for
(
int
i
=
0
;
i
<
iamf
->
nb_param_definitions
;
i
++
)
if
(
iamf
->
param_definitions
[
i
]
->
param
->
parameter_id
==
parameter_id
)
{
param_definition
=
iamf
->
param_definitions
[
i
];
break
;
}
return
param_definition
;
}
int
ff_iamf_add_audio_element
(
IAMFContext
*
iamf
,
const
AVStreamGroup
*
stg
,
void
*
log_ctx
);
int
ff_iamf_add_mix_presentation
(
IAMFContext
*
iamf
,
const
AVStreamGroup
*
stg
,
void
*
log_ctx
);
...
...
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