Andreas Rheinhardt
790f793844
avutil/common: Don't auto-include mem.h
...
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.
Keep it for external users in order to not cause breakages.
Also improve the other headers a bit while just at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
9 months ago
Andreas Rheinhardt
b800327f4c
avformat/avformat: Add FFInputFormat, hide internals of AVInputFormat
...
This commit does for AVInputFormat what commit
59c9dc82f4
did for AVOutputFormat:
It adds a new type FFInputFormat, moves all the internals
of AVInputFormat to it and adds a now reduced AVInputFormat
as first member.
This does not affect/improve extensibility of both public
or private fields for demuxers (it is still a mess due to lavd).
This is possible since 50f34172e0
(which removed the last usage of an internal field of AVInputFormat
in fftools).
(Hint: tools/probetest.c accesses the internals of FFInputFormat
as well, but given that it is a testing tool this is not considered
a problem.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
10 months ago
Michael Niedermayer
80f6e0378b
avformat/format: Stop reading data at EOF during probing
...
Issue found by: Сергей Колесников
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
Andreas Rheinhardt
4f98bf9dbd
avformat/avio_internal: Don't include url.h
...
It is only included because two very rarely used functions
use pointers to URLContexts; use struct URLContext instead.
Also move ffio_geturlcontext() so that one can avoid
a forward declaration of struct URLContext (which would be
necessary as soon as FF_API_AVIODIRCONTEXT is no more).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
1 year ago
Michael Niedermayer
19a74bc794
avformat/format: Remove redundant FFMIN() in ff_match_url_ext()
...
Found-by: Leo Izen
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
a7b06bfc5d
avformat: add ff_match_url_ext()
...
Match url against a list of extensions similar to av_match_ext()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Andreas Rheinhardt
145f6b2223
avformat/avformat: Remove AVOutputFormat.data_codec
...
No AVOutputFormat has this set.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2 years ago
Andreas Rheinhardt
33d1c71931
avformat/format: Also search for image2-codecs for image2pipe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Martin Storsjö
a78f136f3f
configure: Use a separate config_components.h header for $ALL_COMPONENTS
...
This avoids unnecessary rebuilds of most source files if only the
list of enabled components has changed, but not the other properties
of the build, set in config.h.
Signed-off-by: Martin Storsjö <martin@martin.st>
3 years ago
Anton Khirnov
be97d2a825
lavf: add a flag for experimental (de)muxers
3 years ago
Andreas Rheinhardt
baf89ab9a7
avformat/format: Improve const-correctness
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Andreas Rheinhardt
56450a0ee4
avformat: Constify the API wrt AV(In|Out)putFormat
...
Also constify AVProbeData.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years ago
Carl Eugen Hoyos
6a3520bf98
lavf: Constify AVProbeData* in av_probe_input_format().
6 years ago
Carl Eugen Hoyos
3aa6208db9
lavf: Constify AVInputFormat pointer.
6 years ago
Carl Eugen Hoyos
9461e4bc69
lavf: Constify AVOutputFormat pointer.
6 years ago
Jun Zhao
053ee996a0
lavf/format: Remove the dead code in av_probe_input_buffer2.
...
Remove the dead code in av_probe_input_buffer2
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
7 years ago
Josh de Kock
d1221f3351
lavf/format: use const AVInputFormat for iteration
...
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years ago
Josh de Kock
85bf89885a
Revert "avformat/format: temporarily use old next api"
...
This reverts commit 909e00ae81
.
There is no need to use the old API anymore as the new API now
behaves in the same way (treating devices as formats when loaded).
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years ago
Josh de Kock
d8ae40611b
Revert "lavd: add new API for iterating input and output devices"
...
This reverts commit 0fd475704e
.
Revert "lavd: fix iterating of input and output devices"
This reverts commit ce1d77a5e7
.
Signed-off-by: Josh de Kock <josh@itanimul.li>
7 years ago
Muhammad Faiz
909e00ae81
avformat/format: temporarily use old next api
...
Should fix https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225066.html
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
7 years ago
Josh de Kock
0fd475704e
lavd: add new API for iterating input and output devices
...
This also adds an avpriv function to register devices in
libavformat
7 years ago
Josh de Kock
0694d87024
lavf: add new API for iterating muxers and demuxers
7 years ago
James Almer
57960b1f28
avformat: use mutexes instead of atomics in av_register_{input,output}_format()
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Michael Niedermayer
4cc896ea5f
avformat/format: Fix registering a format more than once and related races
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
2ccf9ae6cc
avformat/format: Print debug info when probe score is increased due to mime type
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
77864be44a
avformat/format: Weight the filename extension higher if there is nearly no data after an ID3 available
...
Fixes Ticket5205
Based-on-patch-by: Carl Eugen Hoyos
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8619582bdf
avformat/format: Replace nodat by enum
...
This makes the code much more readable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
6ea457f76d
avformat/format: silence -Wdiscarded-qualifiers
...
lpd.buf is non-const and discards the const qualifier of zerobuffer.
This fixes -Wdiscarded-qualifiers observed with a variety of compilers, including GCC 5.2.
Note that this does not change the type of zerobuffer, and merely makes the intent explicit.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Timothy Gu
d36eac698f
Revert "avformat/format: silence -Wdiscarded-qualifiers"
...
This reverts commit 27cbe4588a
.
See
https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179002.html
Requested-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
9 years ago
Ganesh Ajjanagadde
27cbe4588a
avformat/format: silence -Wdiscarded-qualifiers
...
lpd.buf is non-const and discards the const qualifier of zerobuffer.
This fixes -Wdiscarded-qualifiers observed with GCC 5.2.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Clément Bœsch
c8370a17f5
avformat: fix style after recent commits
9 years ago
Alex Agranovsky
9b10ae5727
avformat/format: Remove parameters from mime type before comparission for probing
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
75a730a22b
avformat/format: Add generic trace av_log in av_probe_input_format3()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anshul Maheshwari
a47c9331ef
avformat: Improve data streams/codec support
...
This adds data codec/stream handling where previously there was only
audio/video/subtitles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cebe8c8095
avformat/format: Use av_match_name() instead of list in av_match_ext()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e96fb980dc
avformat/format: move mime_type_opt declaration to where its used
...
also remove a related dead store
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
b15b06ebf5
avformat: use const char* instead of uint8_t* for AVProbeData.mime_type
...
This makes the field consistent with AVInputFormat.mime_type and the
argument type of av_match_name.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
0d92b0d5f4
avutil/avstring: Factor av_match_list() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
883e98bc25
probe: Bump the score for mime type matching
...
It should be more trustworthy than extension matching.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Andreas Cadhalpun
bcac0f4010
lavf/format.c: use AVPROBE_SCORE_MIME instead of AVPROBE_SCORE_EXTENSION for matching mime types
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
917d14e6a2
avformat/format: Run image2 probe again when file content data is available
...
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
4b1f5e5090
cosmetics: Write NULL pointer inequality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
fce8817a01
avformat/format: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
24e87f7f42
Remove obsolete FF_API_PROBE_MIME cruft.
11 years ago
Michael Niedermayer
98e42a249e
avformat/format: Check for av_guess_format() failure
...
Fixes null pointer dereference
Fixes Ticket3812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
26ffa8eaee
avformat/format: use av_match_name() in av_guess_codec()
...
Fixes part of Ticket2236
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d38edeee9b
avformat/format: fix memleak and error code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4182728c78
avformat/format.c: remove duplicate include, put libavutil includes together
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6d69503883
avformat/format: simplify ifdeffery
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9694695a21
avformat: fix probe mime version checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago