summaryrefslogtreecommitdiff
path: root/ffmpeg.c
Commit message (Collapse)AuthorAge
* Replace avcodec_get_pix_fmt_name() by av_get_pix_fmt_name().Stefano Sabatini2011-06-03
| | | | | This fixes warnings about avcodec_get_pix_fmt_name() being deprecated. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Remove unused variablesMans Rullgard2011-06-02
|
* cmdutils: remove OPT_FUNC2Stefano Sabatini2011-05-28
| | | | | | | | | 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>
* ffserver: Fix a null pointer dereference as a result of the ↵Mike Williams2011-05-26
| | | | | | | | | | | | | | FF_API_MAX_STREAMS cleanup. Fixed another dereference in the RTSP code. Removed a useless variable. Changed an unnecessary looping assignment to a simple assignment suggested by Maksym. Added fixes and tweaks suggested by Maksym Veremeyenko [verem@m1stereo.tv] and Clément B.
* ffmpeg: get rid of useless AVInputStream.nb_streams.Anton Khirnov2011-05-25
| | | | It's a duplicate of AVFormatContext.nb_streams.
* ffmpeg: simplify managing input files and streamsAnton Khirnov2011-05-25
| | | | | | Grow the file and stream list in opt_input_file() instead of creating it all at once in transcode(). This is simpler and will be useful for following commits.
* ffmpeg: purge redundant AVInputStream.index.Anton Khirnov2011-05-25
| | | | AVStream.index stores the same thing.
* ffmpeg: Don't trigger url_interrupt_cb on the first signalMartin Storsjö2011-05-22
| | | | | | | | | | | | | | Currently, the url_interrupt_cb callback will abort all IO after the first received signal. This makes the output files from e.g. the mov muxer to be unreadable if the transcode is aborted with ctrl+c. After this patch, the first signal cleanly breaks out of the transcoding loop, but won't forcibly abort all IO. After the second signal is received, the url_interrupt_cb callback will abort all IO. Signed-off-by: Martin Storsjö <martin@martin.st>
* ffmpeg: get rid of the -vglobal option.Anton Khirnov2011-05-21
| | | | | It's badly documented and does the same thing as -flags global_header, so it's redundant.
* Add support for request_sample_format in ffmpeg and ffplay.Justin Ruggles2011-05-18
|
* ffmpeg: fix -aspect cli optionBaptiste Coudurier2011-05-16
| | | | | | | | | | | | | | | | | | | | | Redesign the way -aspect option is handled. This is done by making ffmpeg read the sample aspect ratio set in the corresponding input stream by default, and overriding it using the value specified by -aspect. If the output display aspect ratio is specified with -aspect, it is set at the end of the filterchain, thus overriding the value set by filters in the filterchain. This implementation is more robust, since does not modify the filterchain description (which was creating potential syntax errors). (Cherry-pick abf8342aa94bdf06bb324f6723a6743dd628d5c6) Another aspect ratio fix try. This leaves the setdar addition at the end (preferred by people). (Cherry-pick e7c7b0d000e81d24327602e04d8fed400dbb7193)
* Restructure video filter implementation in ffmpeg.c.Michael Niedermayer2011-05-16
| | | | | | | | This fixes several bugs like multiple outputs and -aspect mixed with -vf (cherry picked from commit 1762d9ced70ccc46c5d3e5d64e56a48d0fbbd4f7) (cherry picked from commit 5c20c81bfa526b3a269db9c88b0c9007861f0917) (cherry picked from commit a7844c580d83d8466c161a0e3979b3902d0d9100)
* ffmpeg: use parse_number_and_die() when it makes senseStefano Sabatini2011-05-13
| | | | | | | | | | Prefer parse_number_or_die() over atoi()/atol() parsing for the options: -pass, -top, -vc, and -qscale. Improve input validation. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: get rid of the 'q' key schizofreniaAnton Khirnov2011-05-13
| | | | SIGINT for quitting should be enough for everybody.
* ffmpeg: factorize quality calculationMichael Niedermayer2011-05-12
| | | | | | | Calculate quality value once per stream in print_report(). Also fix segfault, as coded_frame can be NULL. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* ffmpeg: call pre_process_video_frame() only if decoding is neededStefano Sabatini2011-05-11
| | | | | | | | | | | | In output_packet(), move the pre_process_video_frame() call inside the if (ist->decoding_needed) { } block. This way pre_process_video_frame() is not called when stream-copy has been selected. Also simplify. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: reformat resample condition code in transcode()Stefano Sabatini2011-05-11
| | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: factorize resampling condition check in do_video_out()Stefano Sabatini2011-05-11
| | | | | | | Simplify and improve readability. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: prefer "dec" over "ist->st->codec" in do_video_out() snippetStefano Sabatini2011-05-11
| | | | | | | Simplify, ease readability. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: improve reporting if size/pixel format changesStefano Sabatini2011-05-11
| | | | | | | | | | | Use av_log() rather than fprintf(stderr, ...), and show information related to the previous size/pixel format configuration. Consistent with the corresponding message issued in case of audio configuration change. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: warns the user when the selected pixel format is ignoredStefano Sabatini2011-05-11
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: Simplify decode loop condition to not use next_ptsAlexander Strange2011-05-10
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* ffmpeg: remove unused fields AVOutputStream.original_width/heightStefano Sabatini2011-05-10
| | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: remove unused variable padding_src in do_video_out()Stefano Sabatini2011-05-10
| | | | | Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: fix negative verbosity.Michael Niedermayer2011-05-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg: rename configure_filters() to configure_video_filters()Stefano Sabatini2011-05-10
| | | | | | | | | Mostly useful for the audio-filters branch, to make more apparent the distinction between configure_audio_filters() and configure_video_filters(). Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* cmdutils: remove list_fmts(), simplifyStefano Sabatini2011-05-10
| | | | | | | | | | | | | 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>
* Add missing CONFIG_AVFILTER check.Takashi Mochizuki2011-05-10
| | | | | | Fix configure --disable-avfilter issue. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffmpeg.c: reset avoptions after each input/output file.Anton Khirnov2011-05-09
| | | | This is consistent with how all the other options work.
* ffmpeg.c: store per-output stream sws flags.Anton Khirnov2011-05-09
|
* ffmpeg.c: check for interlaced flag in the correct place.Anton Khirnov2011-05-08
| | | | In the corresponding codec context, not global options storage.
* Replace strncpy() with av_strlcpy().Alex Converse2011-05-03
|
* Make ffmpeg support generic data streamLuca Barbato2011-05-03
| | | | The patch is the first step to support -dcodec copy
* Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.Stefano Sabatini2011-05-02
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().Stefano Sabatini2011-05-02
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Remove some disabled printf debug cruft.Diego Biurrun2011-04-29
|
* vsrc_buffer: add sample_aspect_ratio fields to arguments.Michael Niedermayer2011-04-26
| | | | | | | | This fixes aspect handling in ffmpeg. This is based on a patch by Baptiste. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Lowercase all ff* program names.Diego Biurrun2011-04-23
|
* error: remove AVERROR_NUMEXPECTEDStefano Sabatini2011-04-21
| | | | | | | | | | | AVERROR_NUMEXPECTED is used only in the image muxer and demuxer, and has a too much specific meaning, which is better explained through a log message. Thus it can be replaced by AVERROR(EINVAL). This breaks API. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* prefer avio_check() over url_exist()Stefano Sabatini2011-04-19
| | | | | | | | | | | | | | The problem with url_exist() is that it tries to open a resource in RDONLY mode. If the file is a FIFO and there is already a reading client, the open() call will hang. By using avio_check() with access mode of 0, the second reading process will check if the file exists without attempting to open it, thus avoiding the lock. Fix issue #1663. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-19
| | | | | | | | Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
* lavc: remove the FF_API_SET_STRING_OLD cruft.Anton Khirnov2011-04-19
|
* lavf: remove FF_API_MAX_STREAMS cruftAnton Khirnov2011-04-19
|
* Redefine sameqLou Logan2011-04-10
| | | | | | | | I think the documentation of sameq is causing confusion and misuse of this option. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: get rid of ffm-specific stuff in avformat.hAnton Khirnov2011-04-08
|
* lavf: rename avf_sdp_create to av_sdp_create.Anton Khirnov2011-04-08
| | | | The new name is more consistent with the rest of the API.
* avio: avio_ prefix for url_set_interrupt_cb.Anton Khirnov2011-04-07
|
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-07
|
* Add silence support for AV_SAMPLE_FMT_U8.Alex Converse2011-04-05
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>