1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

93 Commits

Author SHA1 Message Date
Mina Nagy Zaki
3ee0bedcc0 lavfi: refactor query_formats and auto-insert audio conversion filters
Behaviour has been changed to fail negotiation if fields have been
left empty.

Patch was originally based on a patch by Hemanth.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2011-09-16 20:44:27 +02:00
Michael Niedermayer
c0323b9c9b avfilter: dont crash on filters with NULL instance names.
Found-by: Rolf Siegrist
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-06 22:23:15 +02:00
Michael Niedermayer
ea36c44e84 avfilter_graph_queue_command: Allow queueing commands out of order
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 20:55:22 +02:00
Michael Niedermayer
3d8176d2f5 avfilter: Add avfilter_graph_que_command()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 20:16:10 +02:00
Michael Niedermayer
1e5014c7c7 avfilter: Add command passing support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 20:16:01 +02:00
Mina Nagy Zaki
b57df29f95 lavfi: add audio channel packing negotiation fields
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-07-16 19:22:49 +02:00
Mina Nagy Zaki
fd2c0a5db2 lavfi: add layout negotiation fields and helper functions. 2011-06-19 22:58:32 +02:00
Stefano Sabatini
d468ed0321 lavfi: fix signature for avfilter_graph_parse() and avfilter_graph_config()
Require "void *" rather than "AVClass *" for the log context type.
2011-06-11 12:23:03 +02:00
Stefano Sabatini
f5901fd392 avfiltergraph: use meaningful error codes 2011-06-11 11:55:54 +02:00
Stefano Sabatini
ab543afe47 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4359288c56)
2011-02-06 20:31:42 +01:00
Stefano Sabatini
caeb0c3027 Make avfilter_graph_free() do nothing if graph is NULL.
Originally committed as revision 26323 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-12 21:23:16 +00:00
Stefano Sabatini
b59dd1ea4f Fix style nits in avfiltergraph.c.
Originally committed as revision 26116 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 14:10:12 +00:00
Stefano Sabatini
037be76e15 Add avfilter_graph_create_filter().
Originally committed as revision 25862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-02 20:12:27 +00:00
Stefano Sabatini
3fa77bde1b In libavfilter, use consistently "Copyright (c)" in the license
headers.

Originally committed as revision 25838 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-28 10:22:58 +00:00
Stefano Sabatini
4fcbb2af33 Prefix with "ff_" the functions:
ff_avfilter_graph_check_validity()
ff_avfilter_graph_config_links()
ff_avfilter_graph_config_formats()

and move their declaration to internal.h. These functions are never
used in application code, so it is better to consider them internal
functions, this can be changed later if necessary. Simplify API.

Originally committed as revision 25737 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-13 00:21:28 +00:00
Stefano Sabatini
24de0edbd5 Rename avfilter_destroy() as avfilter_free().
The new name is shorter and more consistent with the FFmpeg API, and
sounds less evil.

Originally committed as revision 25707 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-08 12:32:39 +00:00
Stefano Sabatini
97dd1e4a87 Rename avfilter_graph_destroy() to avfilter_graph_free().
The new name is shorter and more consistent with the rest of the API.

This change breaks libavfilter API/ABI.

Originally committed as revision 25674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:24 +00:00
Stefano Sabatini
e15aeea656 Implement avfilter_graph_alloc().
Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:19 +00:00
Stefano Sabatini
2a24df9357 Add avfilter_graph_config().
Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:20:53 +00:00
Stefano Sabatini
84c0386960 Change avfilter_open() signature, from:
AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name);
to:
int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);

This way it is possible to propagate an error code telling the reason
of the failure.

Originally committed as revision 24765 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 11:44:51 +00:00
S.N. Hemanth Meenakshisundaram
bdab614be8 Generalize pixel format enum fields to int formats.
This is needed to make the libavfilter framework work with audio
filters.

In particular add a type field to AVFilterLink, change the field types:
enum PixelFormat format   -> int format   in AVFilterBuffer
enum PixelFormat *formats -> int *formats in AVFilterFormats
enum PixelFormat *format  -> int format   in AVFilterLink

and change the function signatures:
AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); ->
AVFilterFormats *avfilter_make_format_list(const int *fmts);

int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); ->
int avfilter_add_format(AVFilterFormats **avff, int fmt);

AVFilterFormats *avfilter_all_colorspaces(void); ->
AVFilterFormats *avfilter_all_formats(enum AVMediaType type);

This change breaks libavfilter API/ABI.

Patch by S.N. Hemanth Meenakshisundaram |smeenaks|ucsd|edu|.

Originally committed as revision 24424 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 11:12:47 +00:00
Stefano Sabatini
3748b2b8e8 Fix leak in avfilter_graph_add_filter().
In case of reallocation failure the pointer to the original filter
array was lost. The correct behavior seems to just keep the old array
and count.

Originally committed as revision 22905 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-18 20:10:43 +00:00
Stefano Sabatini
22b7b23c17 Make avfilter_graph_add_filter() returns AVERROR(ENOMEM) in case of
failed reallocation, rather than just -1.

Originally committed as revision 22878 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-13 23:22:22 +00:00
Stefano Sabatini
f37c934d20 Make query_formats() print an error message if an auto-inserted scale
filter cannot convert between input and output formats.

Originally committed as revision 21176 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 00:09:24 +00:00
Stefano Sabatini
9ea977210c Make query_formats() increment the scaler_count after each scaler
insertion.

Originally committed as revision 21124 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 14:23:19 +00:00
Stefano Sabatini
3fb8e77a8d Add a log context to avfilter_graph_config_links().
Originally committed as revision 21121 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-10 13:39:56 +00:00
Stefano Sabatini
4ec42240ca Implement avfilter_graph_config_links().
Originally committed as revision 19066 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-31 16:30:12 +00:00
Stefano Sabatini
d7dbe55823 Rename avfilter_destroy_graph() to avfilter_graph_destroy(), for better
consistency with the rest of the API.

Originally committed as revision 17623 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-26 22:02:09 +00:00
Stefano Sabatini
39c07b8e44 Implement in AVFilterGraph the scale_sws_opts field, and pass its
value in the args for the auto-inserted scale filters.

Originally committed as revision 17547 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-23 23:45:21 +00:00
Stefano Sabatini
822005ed45 Implement avfilter_graph_check_validity().
Originally committed as revision 16809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-26 20:21:25 +00:00
Vitor Sessak
4e4a3e2314 Handle av_realloc() failure
Commited in SoC by Vitor Sessak on 2008-04-04 15:35:38

Originally committed as revision 12754 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:47 +00:00
Vitor Sessak
51bf654d79 Use sizeof(var) instead of sizeof(type)
Commited in SoC by Vitor Sessak on 2008-04-03 19:53:18

Originally committed as revision 12753 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:45 +00:00
Vitor Sessak
a6f88fbc8f Give a more meaningful instance name to auto-inserted scaler
Commited in SoC by Vitor Sessak on 2008-04-03 16:51:39

Originally committed as revision 12752 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:42 +00:00
Vitor Sessak
779cc07aa2 Merge two ifs
Commited in SoC by Vitor Sessak on 2008-04-03 16:44:27

Originally committed as revision 12751 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:40 +00:00
Vitor Sessak
e1a43a4146 Remove unused check
Commited in SoC by Vitor Sessak on 2008-04-03 16:38:51

Originally committed as revision 12750 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:38 +00:00
Vitor Sessak
a10477173a Cosmetical: alignment
Commited in SoC by Vitor Sessak on 2008-04-03 16:36:13

Originally committed as revision 12749 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:35 +00:00
Vitor Sessak
2ad720679c Remove some unwanted todos
Commited in SoC by Vitor Sessak on 2008-04-03 16:32:37

Originally committed as revision 12748 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:32 +00:00
Vitor Sessak
d2027baac5 I should not have merged the graph parser with the graph
framework. Split it.

Commited in SoC by Vitor Sessak on 2008-04-03 16:29:07

Originally committed as revision 12746 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:27 +00:00
Vitor Sessak
966b8f2dcb Replace consume_char() function by *(*buf)++
Commited in SoC by Vitor Sessak on 2008-03-30 15:46:38

Originally committed as revision 12745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:23 +00:00
Vitor Sessak
4f409baa06 Add backslash '\' support to the parser
Commited in SoC by Vitor Sessak on 2008-03-29 16:26:47

Originally committed as revision 12744 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:20 +00:00
Vitor Sessak
398f12970f Remove AVFilterGraphDesc struct.
Now the parser link the filters from the graph directly
with avfilter_link().

Commited in SoC by Vitor Sessak on 2008-03-29 15:12:47

Originally committed as revision 12743 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:17 +00:00
Vitor Sessak
c4913b812d Rename uninit() to avfilter_destroy_graph() and make it non-static
Commited in SoC by Vitor Sessak on 2008-03-27 19:34:24

Originally committed as revision 12742 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:14 +00:00
Vitor Sessak
d66e946b12 Rename functions now static
Commited in SoC by Vitor Sessak on 2008-03-26 21:06:01

Originally committed as revision 12741 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:11 +00:00
Vitor Sessak
de0e3e81d3 Move funtion to avoid forward declaration
Commited in SoC by Vitor Sessak on 2008-03-26 20:57:17

Originally committed as revision 12740 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:08 +00:00
Vitor Sessak
0c3177737b Move mess (to be removed) to where it is actually used.
Commited in SoC by Vitor Sessak on 2008-03-26 20:56:05

Originally committed as revision 12739 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:06 +00:00
Vitor Sessak
87506daafd Remove usage of AVFilterGraphDesc outside avfiltergraph.c
Commited in SoC by Vitor Sessak on 2008-03-26 20:51:24

Originally committed as revision 12738 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:09:02 +00:00
Vitor Sessak
58f472d10f Simplify graph_load_from_desc3()
Commited in SoC by Vitor Sessak on 2008-03-26 20:37:43

Originally committed as revision 12737 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:08:59 +00:00
Vitor Sessak
9f39bb37e4 Rename variable GraphContext -> AVFilterGraph
Commited in SoC by Vitor Sessak on 2008-03-26 20:31:53

Originally committed as revision 12736 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:08:56 +00:00
Vitor Sessak
5c2ff9fd46 Merge avfiltergraphdesc.c in avfiltergraph.c
Commited in SoC by Vitor Sessak on 2008-03-24 20:46:50

Originally committed as revision 12735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:08:52 +00:00
Vitor Sessak
f2ee8083c8 Remove avfilter_vf_graph
Commited in SoC by Vitor Sessak on 2008-03-24 20:13:01

Originally committed as revision 12734 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-04-04 20:08:49 +00:00