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
b57df29f
Commit
b57df29f
authored
Jun 28, 2011
by
Mina Nagy Zaki
Committed by
Stefano Sabatini
Jul 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add audio channel packing negotiation fields
Signed-off-by:
Stefano Sabatini
<
stefano.sabatini-lala@poste.it
>
parent
7bda0c9a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
3 deletions
+51
-3
APIchanges
doc/APIchanges
+8
-0
avfilter.c
libavfilter/avfilter.c
+3
-0
avfilter.h
libavfilter/avfilter.h
+16
-2
avfiltergraph.c
libavfilter/avfiltergraph.c
+5
-1
defaults.c
libavfilter/defaults.c
+8
-0
formats.c
libavfilter/formats.c
+11
-0
No files found.
doc/APIchanges
View file @
b57df29f
...
...
@@ -13,6 +13,14 @@ libavutil: 2011-04-18
API changes, most recent first:
2011-07-16 - xxxxxx - lavfi 2.27.0
Add audio packing negotiation fields and helper functions.
In particular, add AVFilterPacking enum, planar, in_packings and
out_packings fields to AVFilterLink, and the functions:
avfilter_set_common_packing_formats()
avfilter_all_packing_formats()
2011-07-10 - a67c061 - lavf 53.3.0
Add avformat_find_stream_info(), deprecate av_find_stream_info().
...
...
libavfilter/avfilter.c
View file @
b57df29f
...
...
@@ -221,6 +221,9 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
if
(
link
->
out_chlayouts
)
avfilter_formats_changeref
(
&
link
->
out_chlayouts
,
&
filt
->
outputs
[
filt_dstpad_idx
]
->
out_chlayouts
);
if
(
link
->
out_packing
)
avfilter_formats_changeref
(
&
link
->
out_packing
,
&
filt
->
outputs
[
filt_dstpad_idx
]
->
out_packing
);
return
0
;
}
...
...
libavfilter/avfilter.h
View file @
b57df29f
...
...
@@ -29,7 +29,7 @@
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 2
6
#define LIBAVFILTER_VERSION_MINOR 2
7
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
@@ -264,6 +264,11 @@ AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
*/
AVFilterFormats
*
avfilter_all_channel_layouts
(
void
);
/**
* Return a list of all audio packing formats.
*/
AVFilterFormats
*
avfilter_all_packing_formats
(
void
);
/**
* Return a format list which contains the intersection of the formats of
* a and b. Also, all the references of a, all the references of b, and
...
...
@@ -482,6 +487,7 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int per
void
avfilter_set_common_pixel_formats
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
formats
);
void
avfilter_set_common_sample_formats
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
formats
);
void
avfilter_set_common_channel_layouts
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
formats
);
void
avfilter_set_common_packing_formats
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
formats
);
/** Default handler for query_formats() */
int
avfilter_default_query_formats
(
AVFilterContext
*
ctx
);
...
...
@@ -570,6 +576,11 @@ struct AVFilterContext {
void
*
priv
;
///< private data for use by the filter
};
enum
AVFilterPacking
{
AVFILTER_PACKED
=
0
,
AVFILTER_PLANAR
,
};
/**
* A link between two filters. This contains pointers to the source and
* destination filters between which this link exists, and the indexes of
...
...
@@ -597,9 +608,10 @@ struct AVFilterLink {
int
w
;
///< agreed upon image width
int
h
;
///< agreed upon image height
AVRational
sample_aspect_ratio
;
///< agreed upon sample aspect ratio
/* These
two
parameters apply only to audio */
/* These parameters apply only to audio */
int64_t
channel_layout
;
///< channel layout of current buffer (see libavutil/audioconvert.h)
int64_t
sample_rate
;
///< samples per second
int
planar
;
///< agreed upon packing mode of audio buffers. true if planar.
int
format
;
///< agreed upon media format
...
...
@@ -615,6 +627,8 @@ struct AVFilterLink {
AVFilterFormats
*
in_chlayouts
;
AVFilterFormats
*
out_chlayouts
;
AVFilterFormats
*
in_packing
;
AVFilterFormats
*
out_packing
;
/**
* The buffer reference currently being sent across the link by the source
...
...
libavfilter/avfiltergraph.c
View file @
b57df29f
...
...
@@ -203,8 +203,12 @@ static void pick_format(AVFilterLink *link)
link
->
channel_layout
=
link
->
in_chlayouts
->
formats
[
0
];
avfilter_formats_unref
(
&
link
->
in_chlayouts
);
avfilter_formats_unref
(
&
link
->
out_chlayouts
);
}
link
->
in_packing
->
format_count
=
1
;
link
->
planar
=
link
->
in_packing
->
formats
[
0
]
==
AVFILTER_PLANAR
;
avfilter_formats_unref
(
&
link
->
in_packing
);
avfilter_formats_unref
(
&
link
->
out_packing
);
}
}
static
void
pick_formats
(
AVFilterGraph
*
graph
)
...
...
libavfilter/defaults.c
View file @
b57df29f
...
...
@@ -239,11 +239,19 @@ void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *
offsetof
(
AVFilterLink
,
out_chlayouts
));
}
void
avfilter_set_common_packing_formats
(
AVFilterContext
*
ctx
,
AVFilterFormats
*
formats
)
{
set_common_formats
(
ctx
,
formats
,
AVMEDIA_TYPE_AUDIO
,
offsetof
(
AVFilterLink
,
in_packing
),
offsetof
(
AVFilterLink
,
out_packing
));
}
int
avfilter_default_query_formats
(
AVFilterContext
*
ctx
)
{
avfilter_set_common_pixel_formats
(
ctx
,
avfilter_all_formats
(
AVMEDIA_TYPE_VIDEO
));
avfilter_set_common_sample_formats
(
ctx
,
avfilter_all_formats
(
AVMEDIA_TYPE_AUDIO
));
avfilter_set_common_channel_layouts
(
ctx
,
avfilter_all_channel_layouts
());
avfilter_set_common_packing_formats
(
ctx
,
avfilter_all_packing_formats
());
return
0
;
}
...
...
libavfilter/formats.c
View file @
b57df29f
...
...
@@ -173,6 +173,17 @@ AVFilterFormats *avfilter_all_channel_layouts(void)
return
avfilter_make_format64_list
(
chlayouts
);
}
AVFilterFormats
*
avfilter_all_packing_formats
(
void
)
{
static
int
packing
[]
=
{
AVFILTER_PACKED
,
AVFILTER_PLANAR
,
-
1
,
};
return
avfilter_make_format_list
(
packing
);
}
void
avfilter_formats_ref
(
AVFilterFormats
*
f
,
AVFilterFormats
**
ref
)
{
*
ref
=
f
;
...
...
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