summaryrefslogtreecommitdiff
path: root/fftools/cmdutils.c
Commit message (Collapse)AuthorAge
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/cpu: Use av_cpu_ prefixThilo Borgmann2021-07-20
|
* fftools/cmdutils.c: Add cmd line option to override detection of cpu count.Thilo Borgmann2021-07-16
|
* avdevice/avdevice: Constify av_*_device_next APIAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/avdevice: Constify avdevice_list_input_sources/output_sinksAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavresample: Remove deprecated libraryAndreas Rheinhardt2021-04-27
| | | | | | | | Deprecated in c29038f3041a4080342b2e333c1967d136749c0f. The resample filter based upon this library has been removed as well. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: replace strncpy() with direct assignmentAnton Khirnov2021-03-16
| | | | | | | | Only one character is actually rewritten. Fixes truncation warnings, such as warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation] in gcc 10.2.0
* lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADSAnton Khirnov2021-03-16
| | | | | | | | | | This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump.
* fftools: Switch to const AVCodec * where possibleAndreas Rheinhardt2021-03-02
| | | | | | | | | | | The obstacle to do so was in filter_codec_opts: It uses searches the AVCodec for options via the AV_OPT_SEARCH_FAKE_OBJ method, which requires using a void * that points to a pointer to a const AVClass. When using const AVCodec *, one can not simply use a pointer that points to the AVCodec's pointer to its AVClass, as said pointer is const, too. This is fixed by using a temporary pointer to the AVClass. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/cmdutils: Use av_strstart instead of strncmpAndreas Rheinhardt2021-02-28
| | | | | | | It makes the intent clearer and avoids searching for a delimiter in advance. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/cmdutils: also print warnings when using -sinks and -sourcesMarton Balint2020-12-03
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools: switch to the new child class iteration APIAnton Khirnov2020-06-10
|
* fftools/ffmpeg: update text requesting samplesAndriy Gelman2020-06-01
| | | | | Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Reviewed-by: Marton Balint <cus@passwd.hu>
* cmdutils: drop libavformat/network.h includeAnton Khirnov2020-05-22
| | | | | It is not a public header and has not been used since 10173c0e58e557582dbd659f42c6aa164a8682db
* fftools/cmdutils: remove lossless and intra only capability entries from ↵James Almer2020-05-21
| | | | | | | | print_codec() They are codec properties, not encoder capabilities. Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: stop using deprecated av_codec_next()Anton Khirnov2020-04-20
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* cmdutils: fix crash if no name for "ffmpeg -h protocol"Jun Zhao2020-01-30
| | | | | | | | | | fix crash when used the command like: - ffmpeg -h protocol - ffmpeg -h protocol= Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: add show_help_protocol for get protocol optionsSteven Liu2020-01-30
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* cmdutils: Fix compilation on cygwin wrt SetDllDirectory and GetModuleHandleMartin Storsjö2020-01-08
| | | | | | | | | | | | After 06ec9c4746ebc1d3b613c1847e434bbd0b4407b4 we check for these functions in configure (which will succeed in cygwin), but cmdutils.c only includes windows.h if _WIN32 is defined (which it isn't in cygwin). Retain the old intent from before 06ec9c4746ebc1d3b613c1847e434bbd0b4407b4, that these functions only would be used when _WIN32 is defined, while only using them if configure has agreed that they do exist. Signed-off-by: Martin Storsjö <martin@martin.st>
* fftools/cmdutils: Fix break command dump for -map optionJun Zhao2019-12-23
| | | | | | | | | | | | | | Before this fix, ffmpeg -h full | grep map get the command dump like: -map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_s set input stream mapping ^ | truncated after this fix, we can get full option dump. Found-by: vacingfang <vacingfang@tencent.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* configure: Check for the SetDllDirectory and GetModuleHandle functionsMartin Storsjö2019-12-13
| | | | | | | | | | | | These functions aren't available when building for the restricted UWP/WinRT/WinStore API subsets. Normally when building in this mode, one is probably only building the libraries, but being able to build ffmpeg.exe still is useful (and a ffmpeg.exe targeting these API subsets still can be run e.g. in wine, for testing). Signed-off-by: Martin Storsjö <martin@martin.st>
* cmdutils: trailing options may be ignoredLou Logan2019-10-01
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: mypopy <mypopy@gmail.com>
* cmdutils: promote report level if loglevel is higherGyan Doshi2019-09-13
|
* fftools: Use right function signature and pointersAndreas Rheinhardt2019-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tables of the various fftools (in particular ffprobe) are arrays of OptionDef; said type contains a union of a pointer to void and a function pointer of type int (*)(void *, const char *, const char *) as well as a size_t. Some entries (namely the common entry for writing a report as well as several more of ffprobe's entries) used the pointer to void to store a pointer to functions of type int (*)(const char *) or type int (*)(const char *, const char *); nevertheless, when the functions are actually called in write_option (in cmdutils.c), it is done via a pointer of the first type. There are two things wrong here: 1. Pointer to void can be converted to any pointer to incomplete or object type and back; but they are nevertheless not completely generic pointers: There is no provision in the C standard that guarantees their convertibility with function pointers. C90 lacks a generic function pointer, C99 made every function pointer a generic function pointer and still disallows the convertibility with void *. 2. The signature of the called function differs from the signature of the pointed-to type. This is undefined behaviour in C99 (given that C90 lacks a way to convert function pointers at all, it doesn't say anything about such a situation). It only works because none of the functions this patch is about make any use of their parameters at all. Therefore this commit changes the type of the relevant functions to match the type used for the call and uses the union's function pointer to store it. This is legal even in C90. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: print a more descriptive error message in show_help_bsf() when no ↵James Almer2018-07-28
| | | | | | | bsf is specified Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/cmdutils: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* cmdutils: dump supported hardware devices in print_codec()Jun Zhao2018-05-28
| | | | | | | dump the supported hardware devices for codec when use the command like ./ffmpeg -h decoder=h264. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* cmdutils: print missing caps in print_codec().Jun Zhao2018-05-28
| | | | | | print full caps type in print_codec(). Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/cmdutils: add support for level flag in loglevel option parserTobias Rapp2018-04-03
| | | | | | | | | | Allows to manage the AV_LOG_PRINT_LEVEL flag as a prefix to the loglevel option value, similar to the existing AV_LOG_SKIP_REPEATE flag. Adds support for setting flags relative to the existing value by using a +/- prefix. Previous version reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* cmdutils: fix new API break the "ffmpeg -muxers/demuxers"Jun Zhao2018-04-02
| | | | | | | fix commit 2238190 break the "ffmpeg -muxers/demuxers". Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Josh de Kock <josh@itanimul.li>
* cmdutils: use new APIsJosh de Kock2018-03-31
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* cmdutils: print supported codecs in show_help_bsf()James Almer2018-03-22
| | | | | Tested-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: remove a superfluous line breakJames Almer2018-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: support dump bit stream filter options.Jun Zhao2018-03-16
| | | | | | | | Support dump bit stream filter option in ffmpeg -h full and ffmpeg -h bsf=FooBar. Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "cmdutils: make use of new iteration APIs"James Almer2018-02-08
| | | | | | | | | | This reverts commit cdc78058c78dfa4966758a342acd2c1f3b282c46. It introduced several issues in the command line tools, and it's implementing a new API that may still see some changes. Revert for the time being until the state of the API is defined. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/bsf: make BSF iteration the same as other iteratorsJosh de Kock2018-02-06
|
* cmdutils: make use of new iteration APIsJosh de Kock2018-02-06
|
* Merge commit '908f737d6c2900b5d34319ca6ea1d1cb71221463'James Almer2017-11-01
| | | | | | | * commit '908f737d6c2900b5d34319ca6ea1d1cb71221463': cmdutils: Mark conditionally used variable as av_unused Merged-by: James Almer <jamrial@gmail.com>
* Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'James Almer2017-10-01
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524': build: Move cli tool sources to a separate subdirectory Merged-by: James Almer <jamrial@gmail.com>