Commit Graph
100 Commits
Author SHA1 Message Date
Nicolas George 8f92a1862a tools/dvd2concat: generate VOBSUB extradata
The extradata contains the frame size of the subtitles images
and the palette.
2021-09-16 10:17:59 +02:00
Nicolas George 94aa7e8a76 lavf/concatdec: add stream_extradata directive 2021-09-16 10:17:59 +02:00
Nicolas George 5b052c4bcb tools/dvd2concat: add support for chapters 2021-09-16 10:17:59 +02:00
Nicolas George 2263ff505c lavf/concat: add support for chapters 2021-09-16 10:17:59 +02:00
Nicolas George 1a0aff8ca5 tools/dvd2concat: specify stream_codec for subtitles
Avoid requiring a huge probe size and analyze duration.
2021-09-16 10:17:59 +02:00
Nicolas George 0a267bc5e2 lavf/concatdec: add stream_codec directive 2021-09-16 10:17:59 +02:00
Nicolas George 449ba49a9f tests/concat-demuxer: add stream_meta test 2021-09-16 10:17:59 +02:00
Nicolas George 86b2a86169 tools/dvd2concat: include language metadata 2021-09-16 10:17:59 +02:00
Nicolas George c753b49c38 lavf/concatdec: support stream metadata 2021-09-16 10:17:59 +02:00
Nicolas George 76cf1ff979 lavf/concat: deprecate file_packet_metadata 2021-09-16 10:17:59 +02:00
Nicolas George 7517777d06 lavf/concat: add file_packet_meta directive
Same as file_packet_metadata without the double parsing.
2021-09-16 10:17:59 +02:00
Nicolas George 74ab93fa7f lavf/concat: refactor parsing 2021-09-16 10:17:59 +02:00
Nicolas George 252128561e tools/dvd2concat: use option keyword
subfile,,start,X,end,Y,,: is ugly and will be gone some day.
2021-08-22 11:44:17 +02:00
Nicolas George 6d82d894ee tools/dvd2concat: document that -protocol_whitelist is needed 2021-08-22 11:44:17 +02:00
Nicolas George 0210c8fee2 lavf/concatdec: support per-file options 2021-08-22 11:44:16 +02:00
Nicolas George 46fb395952 libavformat/concatdec: remove support for unsafe=-1
It only makes sense as the default value,
but it is not the default since 689211d572.
2021-08-22 11:44:16 +02:00
Nicolas George 52091fcb5c lavfi/sine: switch to activate
Allow to set the EOF timestamp.

Signed-off-by: Nicolas George <george@nsup.com>
2021-08-21 16:11:11 +02:00
Nicolas George 1698cd8422 doc/examples/encode_video: add explanations in comments. 2021-08-20 17:05:10 +02:00
Nicolas George b06f12b68b lavfi/formats: document the negotiation process 2021-08-20 10:26:36 +02:00
Nicolas George 24de2b7618 lavfi/formats: rename AVFilterNegotiation.nb to nb_mergers 2021-08-20 10:26:36 +02:00
Nicolas George 703c3c4151 lavfi/formats: cosmetic: move negotiation stuff at the end
It was between AVFilterFormats and AVFilterChannelLayouts.
2021-08-20 10:26:36 +02:00
Nicolas George 318e184022 doc/git-howto: be more strict about commit message formatting.
Explain the format of the first line: "context: summary".
Add examples and explain bad practices.
Make it a section, so that we can link to it.
2021-08-17 10:11:44 +02:00
Nicolas George 85a6404d7e lavfi/formats: describe conversion in negotiation structure. 2021-08-14 09:17:45 +02:00
Nicolas George 86d3dd5627 lavfi/formats: put merge functions in structures.
It makes the code clearer and will allow adding new stages
of negotiation easier.
2021-08-14 09:17:45 +02:00
Nicolas George 1d8e1afc00 lavu/internal: add FF_FIELD_AT(). 2021-08-14 09:17:45 +02:00
Nicolas George 670051b524 lavfi/drawtext: ignore final LF of textfile.
A standard text file ends with a final LF.
Without this change, it is interpreted as an empty final line,
and visible with the box option.
The current behavior can be achieved by actually having
an empty line at the end of the file.

Fix trac ticket #7948.
2021-02-17 11:53:51 +01:00
Nicolas George 3bf5cc9c58 fate: add scale filters for big-endian architectures.
Filters mostly work in native endianness, but they must output
a specified endianness, usually little: that requires a final
conversion for big endian.

I do not know what's the deal with gif-deal: inserting explicitly
the filters that are implicitly inserted result in less frames in
output. Probably a strange problem of duration.
2020-09-30 16:39:34 +02:00
Nicolas George b0203fa72b lavfi/buffersink: cast to uint64_t before shifting.
Fix CID 1466666.
2020-09-09 16:39:55 +02:00
Nicolas George d1f3d721df Revert "avfilter/src_movie: switch to activate"
This reverts commit abc884bcc0.

This patch was pushed without actual review.
An actual review would have revealed that the switch to activate
was not done correctly because the logic between request_frame()
and frame_wanted is not as direct with filters with multiple
outputs than with a single output.
2020-09-08 14:57:53 +02:00
Nicolas George ddba05afe4 lavfi/vsrc_testsrc: switch to activate.
Allow to set the EOF timestamp.

Also: doc/filters/testsrc*: specify the rounding of the duration option.

The changes in the ref files are right.

For filter-fps-down, the graph is testsrc2=r=7:d=3.5,fps=3.
3.5=24.5/7, so the EOF of testsrc2 will have PTS 25/7.
25/7=(10+5/7)/3, so the EOF PTS for fps should be 11/7,
and the output should contain a frame at PTS 10.

For filter-fps-up, the graph is testsrc2=r=3:d=2,fps=7,
for filter-fps-up-round-down and filter-fps-up-round-up
it is the same with explicit rounding options.
But there is no rounding: testsrc2 produces exactly 6 frames
and 2 seconds, fps converts it into exactly 14 frames.

The tests should probably be adjusted to restore them to
a useful coverage.
2020-09-08 14:39:43 +02:00
Nicolas George e6d625d008 doc: include general in *-all pages. 2020-09-08 14:29:19 +02:00
Nicolas George 6accb7718a doc/general: move contents into a separate file.
It will allow to include it.
2020-09-08 14:29:19 +02:00
Nicolas George 7d7e44a3aa doc/texi2pod: support @float. 2020-09-08 14:29:19 +02:00
Nicolas George fe964d80fe lavfi/formats: more logical testing of inputs and outputs.
ff_set_common_formats() is currently only called after
graph_check_validity(), guaranteeing that inputs and outputs
are connected.
If we want to support configuring partially-connected graphs,
we will have a lot of redesign to do anyway.

Fix CID 1466262 / 1466263.
2020-09-08 14:22:24 +02:00
Nicolas George f08e024ac7 fate: disable automatic conversions on many tests.
Explicitly insert the scale or aresample filter where it would
have been inserted by the negotiation.
Re-enable conversions if it cannot be done easily.

If a conversion is needed in a test, we want to know about it.
If the negotiation changes and makes new conversion necessary,
we want to know about it even more.
2020-09-08 14:16:08 +02:00
Nicolas George 697fb09e3d ffmpeg: add auto_conversion_filters option. 2020-09-08 14:16:08 +02:00
Nicolas George 0d942357f6 lavfi/buffersink: remove redundant channel layouts.
The channel_layouts and channel_counts options set what buffersink
is supposed to accept. If channel_counts contains 2, then stereo is
already accepted, there is no point in having it in channel_layouts
too. This was not properly documented until now, so only print a
warning.
2020-09-08 14:10:31 +02:00
Nicolas George 69f5f6ea37 lavfi: check the validity of formats lists.
Part of the code expects valid lists, in particular no duplicates.
These tests allow to catch bugs in filters (unlikely but possible)
and to give a clear message when the error comes from the user
((a)formats) or the application (buffersink).

If we decide to switch to a more efficient merging algorithm,
possibly sorting the lists, these functions will be the preferred
place for pre-processing, and can be renamed accordingly.
2020-09-08 14:10:31 +02:00
Nicolas George 6479f40afa lavfi/formats: simplify a macro parameters. 2020-09-08 14:02:42 +02:00
Nicolas George 2f76476549 lavfi: regroup formats lists in a single structure.
It will allow to refernce it as a whole without clunky macros.

Most of the changes have been automatically made with sed:

sed -i '
  s/-> *in_formats/->incfg.formats/g;
  s/-> *out_formats/->outcfg.formats/g;
  s/-> *in_channel_layouts/->incfg.channel_layouts/g;
  s/-> *out_channel_layouts/->outcfg.channel_layouts/g;
  s/-> *in_samplerates/->incfg.samplerates/g;
  s/-> *out_samplerates/->outcfg.samplerates/g;
  ' src/libavfilter/*(.)
2020-09-08 14:02:40 +02:00
Nicolas George 7969551a22 fate: remove "-v 0" from ffprobe tests. 2020-08-24 14:30:18 +02:00
Nicolas George 2b71cd3e0b lavu/buffer: forward av_buffer_realloc() error code.
Fix CID 1457235.
2020-08-21 11:44:30 +02:00
Nicolas George 06f2651204 lavu/avstring: deprecate av_d2str().
It is no longer used in our code base and does not seem
to be used much in other projects.
2020-08-21 11:01:39 +02:00
Nicolas George 03c8fe49ea lavfi: remove request_samples.
Filters can use min_samples/max_samples if the number is constant
or activate and ff_inlink_consume_samples().
2020-08-20 18:55:19 +02:00
Nicolas George 4ca1fb9d2a lavfi: remove needs_fifo. 2020-08-20 18:55:19 +02:00
Nicolas George 29e0c30b1c lavfi/vaf_spectrumsynth: switch to activate.
Preserve the original workings, that does not use frames timestamps
and therefore is very fragile.

Allow to remove needs_fifo.
2020-08-20 18:55:19 +02:00
Nicolas George 7c1fbf7cf3 lavfi/vf_overlay_qsv: remove needs_fifo.
It is not relevant when using activate and framesync.
2020-08-20 18:55:19 +02:00
Nicolas George 973540118a ffplay: do not set redundant channel count on abuffersink. 2020-08-20 12:49:08 +02:00
Nicolas George f103731e21 lavfi/buffersink: add a summary documentation of the API. 2020-08-20 12:49:08 +02:00
Nicolas George 1f12b7b1d3 lavfi/buffersink: clearly document that the Params struct are unused. 2020-08-20 12:49:08 +02:00
Nicolas George 1201687da2 lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().
Also add and update some tests.

Change the semantic a little, because for filesytem paths
symlinks complicate things.
See the comments in the code for detail.

Fix trac tickets #8813 and 8814.
2020-08-12 16:45:21 +02:00
Nicolas George d853293679 lavf/url: add ff_url_decompose(). 2020-08-12 16:33:09 +02:00
Nicolas George a45be55d5b lavf/tee: pass options to protocol.
Fix trac ticket #8705.
2020-06-04 10:52:42 +02:00
Nicolas George 88567a2e52 lavfi: add untile filter. 2020-05-23 15:52:27 +02:00
Nicolas George 2a52f19a91 lavfi/framesync: use av_gcd_q(). 2020-05-23 15:51:45 +02:00
Nicolas George 6b65c4ec54 lavu: add av_gcd_q(). 2020-05-23 15:51:44 +02:00
Nicolas George beb98c0181 lavfi/tests/formats: reindent. 2020-05-23 15:50:20 +02:00
Nicolas George d5e5c6862b lavfi/formats: remove dead code.
Move the contents of all_channel_layouts.inc directly into
libavfilter/tests/formats.c.
2020-05-23 15:50:20 +02:00
Nicolas George df123590f0 lavfi/vf_crop: use ff_formats_pixdesc_filter(). 2020-05-23 15:50:20 +02:00
Nicolas George 563e1df5d6 lavfi/formats: add ff_formats_pixdesc_filter(). 2020-05-23 15:50:20 +02:00
Nicolas George 26ae9c9f8a lavd/opengl_enc: check strings before parsing them.
Fix a segfault if OpenGL was not initialized before calling
write_header().
2020-02-20 14:37:11 +01:00
Nicolas George fbb36d74ac lavd/opengl_enc: use proper context for logging.
Log as [opengl @ 0xaddress] instead of [opengl outdev @ 0xaddress].
2020-02-20 14:27:11 +01:00
Nicolas George e16cd7b86c doc/fftools-common-opts: small fix to -report documentation. 2020-01-20 17:05:53 +01:00
Nicolas George f09ae7309d lavfi/buffersrc: push frame directly.
This allows to remove the queued frame entirely.
2019-12-23 13:03:38 +01:00
Nicolas George 02daafb45c lavfi: remove AVFilterPad.poll_frame().
This design is no longer used and was replaced a long time ago.
2019-12-23 13:03:38 +01:00
Nicolas George f3a6ef69bf lavfi/buffersrc: remove poll_frame. 2019-12-23 13:03:38 +01:00
Nicolas George 65e6850c56 lavfi: remove ff_poll_frame().
It is never used.
2019-12-23 13:03:38 +01:00
Nicolas George 9ea7e68907 lavfi/buffersrc: remove fifo.
The frame is immediately pushed, the fifo has never more than one.
2019-12-23 13:03:38 +01:00
Nicolas George 3add65e052 lavf/concat: implement FFSEEK_SIZE. 2019-08-13 15:38:57 +02:00
Nicolas George 6e1a2dc112 lavf/aviobuf: make AVSEEK_SIZE usable from outside. 2019-08-13 15:38:57 +02:00
Nicolas George 2b4c1a0f3c tools/aviocat: add verbose mode.
For now: print the input size as detected by AVSEEK_SIZE.
2019-08-13 15:38:57 +02:00
Nicolas George b09a092edd lavf/libsmbclient: return AVERROR_EOF for EOF.
Fix trac ticket #7387.
2018-09-02 18:37:09 +02:00
Nicolas George 962c9313af lavfi/avf_concat: switch to activate.
Fix trac ticket #7351.
2018-08-26 12:16:48 +02:00
Nicolas George 01735b4852 tools/uncoded_frame: remove use of AVStream.codec. 2018-01-06 15:03:38 +01:00
Nicolas George 34dfe36971 tools/uncoded_frame: use buffersink accessors.
No longer access buffersink's link structure directly.
2018-01-06 15:03:38 +01:00
Nicolas George 29b5f3115d lavfi/framesync: remove an invalid free. 2018-01-03 19:54:39 +01:00
Nicolas George 9ace76697a lavfi/framesync: document frame ownership for dualinput. 2018-01-03 19:54:39 +01:00
Nicolas George e45f7bca73 lavf/concatdec: properly init streams timestamp parameters.
pts_wrap_bits defaults to 33 (like MPEG), that causes valid
timestamps to be unwrapped and become invalid.
Inspired by a patch by Wu Zhiqiang <mymoeyard@gmail.com>.
2017-12-31 10:33:24 +01:00
Nicolas George dfa859b85a lavc/pngdec: fix av_bprint_finalize() usage. 2017-11-09 14:08:29 +01:00
Nicolas George d5995c531d lavfi/framepool: use av_image_check_size2().
Allow filters to handle larger frames.
2017-11-02 12:23:46 +01:00
Nicolas George 345e7072ab lavfi: check links properties after configuring them.
For now, check the image size.
Inspired by a patch from Paul B Mahol.

Invalid sizes would be detected later by allocation failures,
detecting problems earlier is cleaner.
2017-11-02 10:42:16 +01:00
Nicolas George a8305b0ea3 lavfi/testsrc2: fix hang with very small sizes.
Move a subtraction to the other side of the equal to avoid overflows.
2017-10-31 09:17:28 +01:00
Nicolas George 158a79c31d lavf/aviobuf: return EINVAL when reading from a write-only context.
Signed-off-by: Nicolas George <george@nsup.org>
2017-10-29 19:40:52 +02:00
Nicolas George a606f27f4c lavf/avio: temporarily accept 0 as EOF.
Print a warning to let applicatios fix their use.
After a deprecation period, check with a low-level assert.
Also make the constraint explicit in the doxygen comment.

Signed-off-by: Nicolas George <george@nsup.org>
2017-10-29 19:40:52 +02:00
Nicolas George bfb1a94625 examples/avio_reading: return AVERROR_EOF at EOF.
Signed-off-by: Nicolas George <george@nsup.org>
2017-10-29 19:40:52 +02:00
Nicolas George 549ef6ef9a lavfi/framesync: remove dead code.
Fix CID 1416960.
2017-09-12 12:30:40 +02:00
Nicolas George 9bad5e5319 lavfi/framesync: reword repeatlast option help. 2017-09-12 11:14:25 +02:00
Nicolas George 064c9d45ff doc: update filter_design.txt. 2017-09-12 11:03:51 +02:00
Nicolas George 5f5dcf44e3 lavfi: rename framesync2 to framesync. 2017-09-12 11:03:51 +02:00
Nicolas George 1b8e061cc5 lavfi: remove framesync. 2017-09-12 11:03:51 +02:00
Nicolas George 61b0b03f3f lavfi/af_sidechaincompress: use helper macros. 2017-09-12 11:03:50 +02:00
Nicolas George 567d318b1c lavfi/af_agate: use helper macros. 2017-09-12 11:03:50 +02:00
Nicolas George 76613618d9 lavfi: add helper functions and macros for activate. 2017-09-12 11:03:50 +02:00
Nicolas George 8043d8eb3b ffmpeg: send EOF pts to filters. 2017-09-08 10:31:07 +02:00
Nicolas George 5ba2aef6ec lavfi/buffersrc: add av_buffersrc_close(). 2017-09-08 10:31:01 +02:00
Nicolas George 36c111c40f ffmpeg: use reordered duration for stream PTS. 2017-09-08 10:21:59 +02:00
Nicolas George dfed8e2cbb ffmpeg: rename a variable.
Makes the reason of the "FIXME" comment more obvious.
Avoid name conflicts for the next commit.
2017-09-08 10:21:59 +02:00
Nicolas George f5a9c63401 lavfi: guess a timestamp for compat status change.
Use the earliest input with the same status.
If that fails, print a warning and use the earliest source.
With this change, simple filter forward correctly the timestamp
of EOF.
Filters that are supposed to change it should be updated to
actually forward it.
2017-09-08 10:21:59 +02:00
Nicolas George 7302d5e325 lavfi: bump minor version after change in options. 2017-08-29 15:46:36 +02:00
Nicolas George 844bc0d89e doc/filters: document framesync options. 2017-08-29 10:19:38 +02:00