Lukasz Marek
f753956252
lavfi/src_movie: minor simplifications
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Lukasz Marek
9739255365
lavfi/src_movie: remove frame from priv context
This variable is used only inside one function.
There is no need to store it in context.
This also may prevent crush by double free frame.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
48f7d5f0cf
avfilter/src_movie: Check that the pixel format hasnt changed
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
e756effd58
lavfi/movie: fix display of pushed frame information
It was broken since 7e350379f8
.
Also fix warnings:
libavfilter/src_movie.c: In function ‘describe_frame_to_str’:
libavfilter/src_movie.c:392:5: warning: ‘type’ is deprecated (declared at ./libavutil/frame.h:313) [-Wdeprecated-declarations]
libavfilter/src_movie.c:408:9: warning: ‘type’ is deprecated (declared at ./libavutil/frame.h:313) [-Wdeprecated-declarations]
11 years ago
Michael Niedermayer
ee97982408
avfilter/src_movie: Fix handling of packet size for video
See Ticket2556
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
87bc648930
libavfilter/src_movie: fix which packet is reset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
015cc3239a
lavfi/movie: free packet on decoder error
Prevents infinite loop, see Ticket2556
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Alexander Strasser
ac604e446b
lavfi/src_movie: Use movie_common_init instead individual wrappers
Makes it easier to understand that there is no difference in init
callback for movie and amovie. Also saves a few lines of code.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Alexander Strasser
c679a1c358
lavfi/src_movie: Check pointer is not NULL before deref
Also do not check against empty string, the lower levels should
be able to deal with it.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Michael Niedermayer
adaa7743f5
src_movie: fix scanf string
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
73180f5b0e
lavfi: flag more dynamic i/o filters.
12 years ago
Michael Niedermayer
292f68154b
avfilter: Filter options that are used for both video and audio should have both flags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fd6228e657
lavfi: remove now unused args parameter from AVFilter.init and init_opaque
This is mostly automated global search and replace
The deprecated aconvert filter is disabled, if it still has users
it should be updated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
05854f5505
lavfi/movie: raise filter_frame() error.
12 years ago
Hendrik Leppkes
c69acbf881
lavfi/moviesrc: use refcounted frames
12 years ago
Clément Bœsch
2d9d444051
lavfi: convert remaining input/output list compound literals to named objects.
This is following 568c70e79e
.
12 years ago
Michael Niedermayer
eb1424b4fe
src_movie: switch to filter_frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cd7febd33f
lavfi: replace filter_samples by filter_frame
Based on patch by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
2b442ff5f5
lavfi/movie: return proper error code in case of av_get_token() allocation failure
Also slightly clarify logic, and should fix coverity issue CID 717771.
12 years ago
Stefano Sabatini
42d621d131
lavfi: add priv class to filter definitions and flags to filter internal options
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
12 years ago
Stefano Sabatini
831a999dda
lavfi/movie: split class definitions for movie and amovie
This is required for iterating through the filter class (without
incurring into a loop).
12 years ago
Nicolas George
12d2bbf324
lavfi/movie: extend a doxygen comment.
12 years ago
Nicolas George
584acbf524
lavfi/movie: set pkt->stream_index for flushing.
Otherwise, the value of stream_index is kept from the last packet
read, which is not necessarily the stream that needs flushing.
12 years ago
Clément Bœsch
cc650cf029
Remove "Error parsing options string [...]" messages.
This reduces from 3 to 2 messages for the same syntax error in ffprobe,
and from 4 to 3 in filters.
12 years ago
Stefano Sabatini
52bd9cb4d2
lavfi/movie: force channel layout if not set by the decoder
This ensures that the output buffers will have the channel layout set,
which is required by filters.
Also consistent with ffmpeg.c behavior.
12 years ago
Stefano Sabatini
32390d6767
lavfi: move movie and amovie to a "multimedia sources" section
Since the recent changes, movie and amovie are able to deal with more
than one type of stream, so they should be categorized as "multimedia
sources" rather than audio/video sources.
12 years ago
Nicolas George
a7ac05ce2f
src_movie: implement multiple outputs.
The audio and video code paths were too different,
most of the decoding has been rewritten.
12 years ago
Steven Robertson
c88d98fe4a
lavfi/movie: reindent after the previous patch
Signed-off-by: Steven Robertson <steven@strobe.cc>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Steven Robertson
ac726a4f0c
lavfi/movie: flush decoder frames on EOF
movie currently forwards EOF (or begins looping) immediately upon
reaching the last packet in the input stream, which can leave frames in
the decoder. This change first tries to read any remaining packets from
the decoder before forwarding EOF.
Signed-off-by: Steven Robertson <steven@strobe.cc>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Stefano Sabatini
c17808cebd
lavfi: define macro AVFILTER_DEFINE_CLASS
The macro can be used to define consistently the internal class of a
filter, save some typing and factorize.
13 years ago
Paul B Mahol
54101214d8
lavfi: use designated initializers for AVClass
While here:
- add missing .version and .category,
- make .class_name consistent across filters,
- align declarations.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
c9e183b490
lavfi: update some deprecated functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Stefano Sabatini
647e2e070f
lavfi: remove more instances of avfilter_default_filter_name()
They were discarded in 0f0f3bd1e0
.
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
Stefano Sabatini
4d4098da00
lavfi: drop planar/packed negotiation support
The planar/packed switch and the packing_formats list is no longer
required, since the planar/packed information is now stored in the sample
format enum.
This is technically a major API break, possibly it should be not too
painful as we marked the audio filtering API as unstable.
13 years ago
Clément Bœsch
4522df52aa
lavfi: remove audio.h include from avfilter.h.
avfilter.h is a public header and the unexported audio.h header contains
only internal prototypes.
13 years ago
William Yu
d19d52d4a1
lavfi/movie: add loop parameter
Signed-off-by: William Yu <genwillyu@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Clément Bœsch
0b4e5451ba
lavfi: use the new audio API in amovie source filter.
13 years ago
Clément Bœsch
220481e1d6
lavfi: skip the frame in case of error.
This fixes playback with some audio files through filters.
13 years ago
Stefano Sabatini
2b1a4c5b34
amovie: avoid crash in amovie_request_frame() if no samplesref is available
The crash occurrs when a frame is successfully decoded, but no decoded
data is immediately available (typically happens with ogg/vorbis).
13 years ago
Nicolas George
68b531fe6a
src_movie: set the channel layout to default if the codec did not set it.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
e73cc2819e
src_movie: Fix incompatible pointer type warning.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
2c0317419b
lavfi: simplify signature for avfilter_get_audio_buffer() and friends
The additional parameters were never used and are complicating the
function interface. Also, they were inconsistent with the way the
video API works.
So this assumes that a requested samples buffer will have *always* the
format specified in the requested link.
This breaks audio filtering API and ABI.
13 years ago
Stefano Sabatini
24ddfb2bdb
lavfi: add amovie source - audio movie source
13 years ago
Stefano Sabatini
276f43be68
lavfi: rename vsrc_movie.c to src_movie.c
The file is going to contain the amovie source, so give it a less
specific name.
13 years ago
Stefano Sabatini
e0ddc2e953
vsrc_movie: rename video movie specific callbacks, prefix them with "movie"
13 years ago
Stefano Sabatini
3e4666f34c
vsrc_movie: create media agnostic movie init and uninit routines
Allow factorization for the pending work on the audio movie source.
13 years ago
Anton Khirnov
a67c061e0f
lavf: add avformat_find_stream_info()
It supports passing options to codecs.
14 years ago
Anton Khirnov
0b950fe240
lavc: introduce avcodec_open2() as a replacement for avcodec_open().
Adds support for decoder-private options and makes setting other options
simpler.
14 years ago