summaryrefslogtreecommitdiff
path: root/cmdutils.c
Commit message (Collapse)AuthorAgeFilesLines
* cmdutils: fix an opt name/val swap in set_context_opts()Etienne Buira2011-07-021-1/+1
| | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
* Make all option parsing functions match the function pointer type through ↵Jeff Downs2011-06-301-8/+16
| | | | | | | | | which they are called. All option parsing functions now match the function pointer signature through which they are called (int f(const char *, const char *), thereby working reliably on all platforms. Prefix all option processing functions with opt_
* parse_options(): Avoid passing NULL as a string arg to fprintfJeff Downs2011-06-241-1/+1
|
* cmdutils: remove outcommented merge trashMichael Niedermayer2011-06-201-36/+0
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: add vsink_buffer, and use it in ff* toolsStefano Sabatini2011-06-191-68/+0
| | | | Also add the public interface libavfilter/vsink_buffer.h.
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-181-1/+83
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavc: add opt_find to AVCodecContext class. h264: Complexify frame num gap shortening code intreadwrite.h: fix AV_RL32/AV_RB32 signedness. Fix decoding of mpegts streams with h264 video that does *NOT* have b frames Add minor bumps and APIChanges entries for lavf private options. ffmpeg: deprecate -vc and -tvstd ffmpeg: use new avformat_open_* API. ffserver: use new avformat_open_* API. ffprobe: use new avformat_open_* API. ffplay: use new avformat_open_* API. cmdutils: add opt_default2(). dict: add AV_DICT_APPEND flag. lavf: add avformat_write_header() as a replacement for av_write_header(). Deprecate av_open_input_* and remove their uses. lavf: add avformat_open_input() as a replacement for av_open_input_* AVOptions: add av_opt_find() as a replacement for av_find_opt. AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context. ffmpeg: don't abuse a global for passing frame size from input to output ffmpeg: don't abuse a global for passing pixel format from input to output ffmpeg: initialise encoders earlier. Conflicts: cmdutils.c doc/APIchanges ffmpeg.c ffplay.c ffprobe.c libavcodec/h264.c libavformat/avformat.h libavformat/utils.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cmdutils: add opt_default2().Anton Khirnov2011-06-161-4/+46
| | | | | | | | | | | | It stores options in a dictionary to be passed to new open calls. It will replace opt_default once all the pieces are in place.
| * AVOptions: add av_opt_find() as a replacement for av_find_opt.Anton Khirnov2011-06-161-3/+3
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-131-1/+1
|\ \ | |/ | | | | | | | | | | | | * qatar/master: cmdutils: add missing NULL check in parse_options() x11grab: remove a memory allocation and the associated memcpy. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cmdutils: add missing NULL check in parse_options()Stefano Sabatini2011-06-121-1/+1
| | | | | | | | | | | | Fix ffplay -i FILE, which was recently broken. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * cmdutils: add missing const qualifierMans Rullgard2011-06-041-1/+1
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * cmdutils: remove OPT_FUNC2Stefano Sabatini2011-05-281-4/+2
| | | | | | | | | | | | | | | | | | Make ff* tools only accept opt_* functions taking two arguments. The distinction between functions with one and two arguments is quite pointless. Simplify parse_options() code. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | cmdutils: remove unnecessary OPT_DUMMY implementationStefano Sabatini2011-06-051-2/+0
| | | | | | | | | | | | The -i INPUT option can be implemented more cleanly by using a function option, which can easily be done now that the parse_arg_function passed to parse_options has a standard signature.
* | cmdutils: change the signature of the function argument in parse_options()Stefano Sabatini2011-06-051-3/+5
| | | | | | | | This is required for a pending simplification.
* | cmdutils: remove OPT_FUNC2Stefano Sabatini2011-05-281-6/+4
| | | | | | | | | | | | | | Make ff* tools only accept opt_* functions taking two arguments. The distinction between functions with one and two arguments is quite pointless. Simplify parse_options() code.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-271-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) ARM: disable ff_vector_fmul_vfp on VFPv3 systems ARM: check for VFPv3 swscale: Remove unused variables in x86 code. doc: Drop DJGPP section, Libav now compiles out-of-the-box on FreeDOS. x86: Add appropriate ifdefs around certain AVX functions. cmdutils: use sws_freeContext() instead of av_freep(). swscale: delay allocation of formatConvBuffer(). swscale: fix build with --disable-swscale-alpha. movenc: Deprecate the global RTP hinting flag, use a private AVOption instead movenc: Add an AVClass for setting muxer specific options swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions. configure: report yasm/nasm presence properly tcp: make connect() timeout properly rawdec: factor video demuxer definitions into a macro. rtspdec: add initial_pause private option. lavf: deprecate AVFormatParameters.width/height. tty: add video_size private option. rawdec: add video_size private option. x11grab: add video_size private option. x11grab: factorize returning error codes. ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cmdutils: use sws_freeContext() instead of av_freep().Ronald S. Bultje2011-05-271-1/+2
| | | | | | | | | | av_freep(swsContext) will leak all memory potentially allocated within the swsContext.
| * ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i ↵Benjamin Larsson2011-05-111-2/+2
| | | | | | | | | | | | "file" and ffplay -i "file". Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * cmdutils: add OPT_INT check in parse_number_or_die()Stefano Sabatini2011-05-101-0/+2
| | | | | | | | | | | | | | Check that the value passed for an OPT_INT option is an int, fail otherwise. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * cmdutils: remove list_fmts(), simplifyStefano Sabatini2011-05-101-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The function was only used in opt_sample_fmt() for listing the sample formats. Move list_fmts() functionality directly into opt_sample_fmt(). Also fix the warning: ffmpeg.c: In function ‘opt_audio_sample_fmt’: ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’ Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | preset dir for win32Gianluigi Tiesi2011-05-211-0/+17
| |
* | cmdutils: use const AVClass * when sensefulStefano Sabatini2011-05-201-3/+4
| | | | | | | | | | | | | | | | | | Fix warnings: cmdutils.c: In function ‘opt_default’: cmdutils.c:304: warning: initialization discards qualifiers from pointer target type cmdutils.c: In function ‘set_context_opts’: cmdutils.c:431: warning: passing argument 2 of ‘alloc_priv_context’ discards qualifiers from pointer target type cmdutils.c:414: note: expected ‘struct AVClass *’ but argument is of type ‘const struct AVClass *’
* | cmdutils: reset *picref_ptr to NULL in get_filtered_frame()Stefano Sabatini2011-05-201-0/+1
| | | | | | | | | | Avoid the presence of an invalid pointer, fix a crash in case of get_filtered_frame() failure.
* | cmdutils: Allocate private decoder context if its not allocated yet.Michael Niedermayer2011-05-161-1/+12
| | | | | | | | | | This fixes and simplifies setting decoder private options. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Allocate per codec options, now that options are freed between inputs and ↵Baptiste Coudurier2011-05-101-1/+1
| | | | | | | | outputs.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-05-101-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegaudiodec: group #includes more sanely mpegaudio: remove #if 0 blocks ffmpeg.c: reset avoptions after each input/output file. ffmpeg.c: store per-output stream sws flags. mpegaudio: remove CONFIG_MPEGAUDIO_HP option mpegtsenc: Clear st->priv_data when freeing it udp: Fix receiving RTP data over multicast rtpproto: Remove an unused variable regtest: fix wma tests NOT pulled: mpegaudio: remove CONFIG_AUDIO_NONSHORT regtest: separate flags for encoding and decoding Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffmpeg.c: reset avoptions after each input/output file.Anton Khirnov2011-05-091-0/+1
| | | | | | | | This is consistent with how all the other options work.
| * lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.Roger Pau Monné2011-04-261-0/+2
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavfi: rename AVFilterBufferRefVideoProps.pixel_aspect to sample_aspect_ratioStefano Sabatini2011-05-011-1/+1
| | | | | | | | | | | | | | | | | | Improve consistency with libavcodec. This breaks libavfilter API/ABI. The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously done with the lavfi minor number.
* | lavc: add a sample_aspect_ratio field to AVFrameStefano Sabatini2011-05-011-0/+1
| | | | | | | | | | | | | | The sample aspect ratio is a per-frame property, so it makes sense to define it in AVFrame rather than in the codec/stream context. Simplify application-level sample aspect ratio information extraction, and allow further simplifications.
* | lavc: add a pkt_pos field to AVFrameStefano Sabatini2011-05-011-0/+1
| | | | | | | | | | | | This is similar to what was done with pkt_pts. This simplifies the operation of extracting the pos information from the AVPacket, and allows further simplifications.
* | FFMPEG: support demuxer specific options.Michael Niedermayer2011-04-301-0/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-261-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: graphparser: add a NULL check on the argument passed to strstr setdar: prefer "sar" over "par" in log info message fade: fix draw_slice() check on fade->factor value fade: make draw_slice() chroma check against planes 1 and 2 win32: include the correct header in cmdutils.c ac3: fix memleak in fixed-point encoder flashsv: Return more meaningful error values. flashsv: Employ explicit AVCodec struct initializers. read AVI palette from the end of extradata cosmetics: K&R coding style and more whitespace for Flash Screen Video Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * win32: include the correct header in cmdutils.cLuca Barbato2011-04-251-0/+1
| | | | | | | | CommandLineToArgvW requires windows.h, include it directly
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-241-0/+63
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Handle unicode file names on windows rtp: Rename the open/close functions to alloc/free Lowercase all ff* program names. Refer to ff* tools by their lowercase names. NOT Pulled Replace more FFmpeg instances by Libav or ffmpeg. Replace `` by $() syntax in shell scripts. patcheck: Allow overiding grep program(s) through environment variables. NOT Pulled Remove stray libavcore and _g binary references. vorbis: Rename decoder/encoder files to follow general file naming scheme. aacenc: Fix whitespace after last commit. cook: Fix small typo in av_log_ask_for_sample message. aacenc: Finish 3GPP psymodel analysis for non mid/side cases. Remove RDFT dependency from AAC decoder. Add some debug log messages to AAC extradata Fix mov debug (u)int64_t format strings. bswap: use native types for av_bwap16(). doc: FLV muxing is supported. applehttp: Handle AES-128 encrypted streams Add a protocol handler for AES CBC decryption with PKCS7 padding doc: Mention that DragonFly BSD requires __BSD_VISIBLE set Conflicts: ffplay.c ffprobe.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Handle unicode file names on windowsKirill Gavrilov2011-04-241-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | All file names should be in UTF-8 within libavformat. This is handled by mapping the open() function to an internal one in os_support.h for windows. fopen() could be overridden in the same way, but if that would be used from ffmpeg.c, it would add a dependency on an ff prefixed internal lavf function. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-201-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: remove the FF_API_SET_STRING_OLD cruft.Anton Khirnov2011-04-191-1/+1
| |
| * avio: deprecate av_protocol_next().Anton Khirnov2011-04-081-12/+8
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Prefer codec specific options over global ones, allowing codecBaptiste Coudurier2011-04-191-37/+42
| | | | | | | | to override global options.
* | In libx264 wrapper, add -preset and -tune optionsBaptiste Coudurier2011-04-161-2/+3
| |
* | cmdutils: add OPT_INT check in parse_number_or_die()Stefano Sabatini2011-04-161-0/+2
| | | | | | | | | | Check that the value passed for an OPT_INT option is an int, fail otherwise.
* | Add key_frame and pict_type to AVFilterBufferRefVideo.Roger Pau Monné2011-04-161-0/+2
| |
* | cmdutils: remove list_fmts(), simplifyStefano Sabatini2011-03-261-10/+0
| | | | | | | | | | | | | | | | | | | | | | The function was only used in opt_sample_fmt() for listing the sample formats. Move list_fmts() functionality directly into opt_sample_fmt(). Als fix the warning: ffmpeg.c: In function ‘opt_audio_sample_fmt’: ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’
* | Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"Michael Niedermayer2011-03-171-2/+2
| | | | | | | | This reverts commit 29ba091136a5e04574f7bfc1b17536c923958f6f.
* | Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"Michael Niedermayer2011-03-171-2/+2
| | | | | | | | This reverts commit a03be6e1ba4cbf9984b0bbdb674704bbb2da6713.
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-171-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: Changelog doc/APIchanges doc/optimization.txt libavformat/avio.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*Janne Grunau2011-03-161-2/+2
| |
| * replace FFMPEG with LIBAV in FFMPEG_CONFIGURATIONJanne Grunau2011-03-161-2/+2
| | | | | | | | also update the multiple inclusion guards in config.h|mak