Anton Khirnov
9d0bfc5052
lavfi: make AVFilterPad opaque after two major bumps.
...
It will allow adding new fields to it without ABI breaks.
13 years ago
Anton Khirnov
6d58358a3a
lavfi: make avfilter_get_video_buffer() private on next bump.
...
They are only useful inside filters and we don't allow user filters for
now.
13 years ago
Nicolas George
0f62125643
buffersrc: deprecate flat options syntax.
13 years ago
Nicolas George
9ca440679d
buffersrc: accept the frame rate as argument.
13 years ago
Nicolas George
dcaa4efcee
buffersrc: accept key=value arguments.
...
The current flat arguments syntax is not easily extensible
due to sws_param possibly containing commas.
This is also consistent with abuffersrc.
13 years ago
Anton Khirnov
803391f719
lavfi: remove request/poll and drawing functions from public API on next bump
...
They are only useful inside filters and we don't allow user filters for
now.
13 years ago
Anton Khirnov
b74a1da49d
lavfi: make formats API private on next bump.
...
It is only useful inside filters and we don't allow user filters for
now.
13 years ago
Stefano Sabatini
0f0f3bd1e0
lavfi: use av_default_item_name() as filter private context logger
...
avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.
13 years ago
Stefano Sabatini
4d6a8a2bdb
lavfi: add avfilter_default_filter_name()
...
The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.
This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
13 years ago
Michael Niedermayer
a5c7525bcb
set some categories of some AVClass structs
...
Please help setting the category for all remaining AVClasses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
6adefeef45
buffersrc: cosmetic: reindent.
13 years ago
Nicolas George
aa1246ea42
lavfi: unify src_buffer and buffersrc.
...
Most of the code is moved to buffersrc.c
to help Git see the similarities.
src_buffer.c still contains the obsolete compatibility functions.
The format change detection code was removed as it has been
implemented directly in ffmpeg.
It can easily be brought back from the history.
13 years ago
Michael Niedermayer
3e2cf79e15
buffersrc: export forgotten function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
4c66c40718
lavfi: add an audio buffer source.
13 years ago
Anton Khirnov
720c6b78d1
buffersrc: add av_buffersrc_write_frame().
...
It's the same as av_vsrc_buffer_add_frame(), except it doesn't take pts
or pixel_aspect parameters. Those are read from AVFrame.
Deprecate av_vsrc_buffer_add_frame().
13 years ago
Anton Khirnov
8b05e13df3
buffersrc: fix invalid read in uninit if the fifo hasn't been allocated
13 years ago
Anton Khirnov
fad729fa50
lavfi: rename vsrc_buffer.c to buffersrc.c
...
Most of the code will be shared for both audio and video version.
13 years ago
Nicolas George
5cb4f1a127
vsrc_buffer: return EAGAIN if no frame is available.
...
This is not an erroneous condition, do not print a warning.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Nicolas George
2ae5af8094
lavfi: rename vsrc_buffer.c into src_buffer.c.
13 years ago
Nicolas George
7ad0d9864e
lavfi: merge asrc_abuffer into vsrc_buffer.
13 years ago
Nicolas George
2d6522bab0
vsrc_buffer: count the number of failed requests.
13 years ago
Nicolas George
f75ee4031e
vsrc_buffer: return EAGAIN if no frame is available.
...
This is not an erroneous condition, do not print a warning.
13 years ago
Michael Niedermayer
5cd460ba63
vsrc_buffer: fix null ptr segfault
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
7bf9e3391f
vsrc_buffer: fix check from 7ae7c41
.
...
The user submitted variable in this function is frame, not buf.
13 years ago
Anton Khirnov
7ae7c41413
vsrc_buffer: allow using a NULL buffer to signal EOF.
13 years ago
Michael Niedermayer
25eae29ea1
vsrc_buffer: remove overwrite support.
...
the overwrite flag became unused when merging support for buffering
multiple frames.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
a03f8ea0a8
vsrc_buffer: when no frame is available, return an error instead of segfaulting.
13 years ago
Anton Khirnov
95587d29d7
vsrc_buffer: allow buffering arbitrary number of frames.
13 years ago
Michael Niedermayer
2d54bbb950
vsrc_buffer: Store allocated scale filter and free it later.
...
Fixes a memleak.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
43fe6a2905
vsrc_buffer: release the buffer on uninit.
13 years ago
Anton Khirnov
5d25140f71
vsrc_buffer: error on changing frame parameters.
13 years ago
Diego Biurrun
3dc99a18d4
cosmetics: drop some pointless parentheses
13 years ago
Anton Khirnov
e1d9dbf2d4
lavfi: add a new function av_buffersrc_buffer().
...
It can be used to directly pass a AVFilterBufferRef to lavfi, avoiding a
memcpy.
13 years ago
Stefano Sabatini
1c9e340d35
lavfi: add avfilter_copy_frame_props()
...
avfilter_copy_frame_props() avoids code duplication and increases
robustness.
13 years ago
Reimar Döffinger
5af7daabc4
Mark AVFilterPad[] compound literals as const.
...
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
2982b02b79
vsrc_buffer: FIx incompatible pointer type warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
e26782a9b4
lavfi: add ff_parse_pixel_format() internal function, and use it
...
Reduce code duplication.
13 years ago
Mina Nagy Zaki
fd2c0a5db2
lavfi: add layout negotiation fields and helper functions.
14 years ago
Stefano Sabatini
27bcf55f45
vsrc_buffer: add flags param to av_vsrc_buffer_add_video_buffer_ref
...
The new flags parameter allows to specify if the video ref to add
should overwrite the cache, if the flag is not set vsrc_buffer will
complain and abort; otherwise it will clean the already cached video
ref before to overwrite it, thus avoiding a leak.
14 years ago
Stefano Sabatini
9e66b64c36
vsrc_buffer: propagate error code in av_vsrc_buffer_add_frame()
...
Propagate av_vsrc_buffer_add_video_buffer_ref() error code rather than
return 0.
14 years ago
Stefano Sabatini
cf06e3e4dd
vsrc_buffer: return an error code if no frames are available
...
Also decrease the log level of the corresponding message to WARNING,
since the error is not fatal.
14 years ago
Stefano Sabatini
f7053dc41a
vsrc_buffer: tweak error message in init()
...
Change:
Expected 7 arguments, but only %d found in '%s'\n
to:
Expected 7 arguments, but %d found in '%s'\n
as the user may provide more than 7 arguments, in that case the error
is not misleading.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
c000a9f783
vsrc_buffer: add av_vsrc_buffer_add_frame()
...
The new function is a wrapper around
av_vsrc_buffer_add_video_buffer_ref(), and allows to simplify the act
of pushing AVFrame data to the source buffer.
14 years ago
Stefano Sabatini
50764e19a8
vsrc_buffer: make the source accept sws_param in init
...
Avoid the need of two distinct av_vsrc_add_video_buffer_ref*
functions. Simplify the interface.
14 years ago
Stefano Sabatini
509b32cf5d
vsrc_buffer: propagate avfilter_open() error code
14 years ago
Stefano Sabatini
3799805e56
vsrc_buffer: fix style
14 years ago
Stefano Sabatini
6070b7e1c5
vsrc_buffer: remove dependency on AVFrame
...
Rename av_vsrc_buffer_add_frame to
av_vsrc_buffer_add_video_buffer_ref(), and change its inteface to make
it accept in input an AVFilterBufferRef rather than an AVFrame.
This way the interface can be used without requiring the
inclusion/installation of libavcodec headers.
14 years ago
Stefano Sabatini
ea7f73c52e
vsrc_buffer: during init, print information about timebase and sample aspect ratio
14 years ago
Stefano Sabatini
64c06615d2
vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface
...
Now that pix_fmt, width, and height are directly embedded in the AVFrame,
there is no need to pass these values as separate arguments.
14 years ago
Stefano Sabatini
566666caf3
lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
...
avfilter_copy_frame_props() avoids code duplication and increases
robustness.
The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
14 years ago