Commit Graph

46 Commits

Author SHA1 Message Date
Andreas Rheinhardt 1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
Andreas Rheinhardt 46dac8cf3d avformat/avformat, utils: Make av_find_best_stream const-correct
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:14 -03:00
Jun Zhao f97fa89925 doc/examples/filtering_audio: Remove setting deprecated refcounted_frames
When use new decode APIs(avcodec_send_packet/avcodec_receive_frame),
don't need to setting the deprecated field refcounted_frames.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-04-22 15:39:22 +08:00
Josh de Kock 89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
Mark Thompson 10bcc41bb4 examples: Don't call deprecated functions which don't do anything 2018-02-09 21:38:42 +00:00
Jun Zhao 5c51d0edd4 examples/filtering_audio: suppress the build warning.
suppress the "warning: assignment discards ‘const’ qualifier from
pointer target type" build warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-01 02:10:09 +01:00
James Almer 99ba85a0e2 Merge commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436'
* commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436':
  lavfi: Drop unused and empty header file

Merged-by: James Almer <jamrial@gmail.com>
2017-10-26 16:46:11 -03:00
Muhammad Faiz 327a1c0dee examples: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-23 14:43:51 +07:00
Matthieu Bouron 03372d0a90 doc/examples/filtering_audio: switch to new decoding API 2017-03-30 16:20:13 +02:00
Clément Bœsch c3706bc255 doc/examples/filtering_*: switch to codecpar 2017-03-28 11:40:57 +02:00
Lou Logan 06eef96b69 fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-03-28 14:13:17 -08:00
Hendrik Leppkes c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Hendrik Leppkes 144fb06806 Remove left-over FF_API_AVFILTERBUFFER cruft 2015-09-05 16:27:19 +02:00
Stefano Sabatini d43c1ec684 examples/filtering: extend comments about setting the filter graph endpoints
That part is a constant source of confusions for readers, this should
help clarify the apparently inverted logic.
2015-01-29 11:12:39 +01:00
Michael Niedermayer 341639fe80 doc/examples: remove pathes from doxy examples
This makes the examples page less cluttered

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-17 13:50:53 +01:00
Stefano Sabatini ca57659440 examples/filtering_audio,video: do not call avcodec_register_all()
It is implied by av_register_all(). Simplify.
2014-01-24 12:20:46 +01:00
Stefano Sabatini b539a72bba examples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
The avcodec_get_frame_defaults() function is deprecated and its use
doesn't seem required.
2014-01-21 20:08:36 +01:00
Michael Niedermayer 210a78aeb5 doc/examples/filtering_audio: init packet0.data
Fixes use of uinitialized data and crash

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-03 00:01:07 +01:00
Stefano Sabatini c490cd4c1a doc/examples/filtering_audio: fix chunked audio decoding
Support the case when multiple frames are contained in a single packet.
In particular, fix fate-samples/lossless-audio/luckynight-partial.shn
sample decoding.
2013-12-02 15:21:52 +01:00
Stefano Sabatini 893f33e7f0 doc/examples/filtering_audio: fix style 2013-12-02 15:08:00 +01:00
Stefano Sabatini 55c57658d2 doc/examples/filtering_audio: add more error checks 2013-12-02 14:35:39 +01:00
Stefano Sabatini 82e74ee6e4 doc/examples/filtering: make use of av_err2str()
Simplify.
2013-12-02 14:35:31 +01:00
Stefano Sabatini 50a28b1393 doc/examples: do not check NULL values for avcodec_close()
avcodec_close() does nothing in case the argument is NULL. Simplify.
2013-11-21 23:29:56 +01:00
Michael Niedermayer f187390907 doc/examples/filtering_audio: make const arrays also static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 22:22:03 +02:00
Stefano Sabatini 838bd73139 lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at the next bump
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.

If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().

At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.

Should address trac ticket #2672.
2013-07-03 13:21:42 +02:00
Nicolas George 300ca0763b examples/filtering_audio: fix frame leak.
The frame is not used after being added to the filter
graph, there is no need to keep the reference.
2013-04-18 17:03:01 +02:00
Pavel Koshevoy e5644313c5 examples/filtering_audio: get rid of AVABufferSinkParams
AVABufferSinkParams are ignored by avfilter_graph_create_filter,
therefore the example is misleading.  Use av_opt_set_int_list to
configure abuffersink directly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 11:11:57 +02:00
Michael Niedermayer f2619cbd61 examples/filtering_audio: enable ref counted frames
Fixes accessing freed memory

Signe-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 11:11:57 +02:00
Clément Bœsch 9ab221f8d8 lavfi: deprecate aconvert.
This filter is not required anymore with aformat. Drop it at next bump.
2013-04-11 22:13:45 +02:00
Stefano Sabatini 9bb25dbd13 examples/filtering_*: constify AVFrame * for print_frame() and display_frame() functions 2013-03-14 21:39:15 +01:00
Stefano Sabatini 9076a6a943 examples/filtering_audio: update to new API
In particular, fix crash.
2013-03-14 21:39:09 +01:00
Nicolas George ceac5c54dd Remove references to the "ff" variant of buffersink. 2013-03-12 23:31:07 +01:00
Clément Bœsch 5e4bc96415 doc: fix examples. 2013-03-10 01:41:53 +01:00
Nicolas George dcc73aaaa9 doc/examples: do not allocate AVFrame directly.
The size of the AVFrame structure is not part of the ABI;
it can grow with later versions. Therefore, applications
are not supposed to allocate AVFrame directly, they are
supposed to use avcodec_alloc_frame() instead.
2013-02-17 15:51:50 +01:00
Michael Niedermayer ca28cb5f83 examples: fix doxy so they appear on the example page
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-26 16:32:32 +02:00
Michael Niedermayer 3061664a57 avoid ambigous buffersink names
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 06:05:08 +02:00
Gavin Kinsey 37b5959d96 examples/filtering: fix packet memleak
Free packets unconditionally after demuxing, and not only when the
packets belong to a given stream.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-06-26 19:04:17 +02:00
Michael Niedermayer 11f2cad127 examples/filtering_audio: update for avfilter API "cleanup"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-24 14:15:53 +02:00
Andrew Wason 1ef802d038 update filtering_audio example
The filtering_audio.c example needs to be updated for the new
"abuffer" filter args.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-05 03:02:41 +02:00
Clément Bœsch 4fd573970a doc/examples: make use of the parameter filters_descr parameter in init_filters(). 2012-05-19 12:29:05 +02:00
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.
2012-05-16 13:16:05 +02:00
Clément Bœsch 55e5f105d3 doc/examples: use buffersrc.h instead of deprecated asrc_abuffer.h. 2012-05-12 19:58:36 +02:00
Nicolas George 9f357e2bcd examples/filtering_audio: use av_buffersrc_add_frame. 2012-05-04 23:26:41 +02:00
Nicolas George a0a0199da3 examples/filtering_audio: do not stop on decode error.
Decode errors can happen with concatenated MP3s
with different formats.
2012-04-28 10:28:15 +02:00
Nicolas George 8f19483d06 examples/filtering_audio: fix a memory leak. 2012-04-28 10:28:15 +02:00
Clément Bœsch aecf0cf5ed doc/examples: add audio decoding/filtering example.
Mostly based on doc/examples/filtering.c. lavfi API is still limited to
"buffer feeding" instead of "frame feeding" at the moment, so this
example code sticks with it.
2012-02-21 16:45:37 +01:00