summaryrefslogtreecommitdiff
path: root/ffmpeg.c
Commit message (Collapse)AuthorAge
* 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>
* Add audio_service_type field to AVCodecContext for encoding and reportingJustin Ruggles2011-03-25
| | | | of the service type in the audio bitstream.
* Make sure kbhit() is in conio.hDave Yeo2011-03-22
| | | | | | | | Conio.h is a non-standard header and may not have kbhit() prototyped. This fixes compile on OS/2 where the EMX version (we're using a fork) of conio.h only has getch() and getche(). Signed-off-by: Mans Rullgard <mans@mansr.com>
* Do no modify terminal parameters using termios.hPanagiotis H.M. Issaris2011-03-20
| | | | | | | | | | | | | | Remove usage of tcgetattr and tcsetattr to modify terminal parameters, and rely on ctrl-c to stop instead of pressing 'q'. On systems with conio.h, keep the old behavior. Changing the terminal settings causes problems if multiple instances are running asynchronously on the same terminal, such as during a parallel FATE run, or if the process crashes before restoring the terminal. In both cases, the terminal state is messed up requiring a manual reset. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ffmpeg: modify help text for the map optionStefano Sabatini2011-03-20
| | | | | | | | | | Change "file:stream[:syncfile:syncstream]" to "file.stream[:syncfile.syncstream]", the latter syntax is more consistent with the stream identifier form printed by av_dump_format(), and more readable. Both syntaxes are currently accepted by the opt_map() code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* ffmpeg: remove unused variable in ffmpeg_exit()Stefano Sabatini2011-03-12
| | | | | | | | Fix the warning: ffmpeg.c: In function ‘ffmpeg_exit’: ffmpeg.c:509: warning: unused variable ‘j’ Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: avio_ prefix for url_fsizeAnton Khirnov2011-03-07
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* ffmpeg: Use av_pkt_dump_log2Martin Storsjö2011-03-02
| | | | | | | This makes dumped packet timestamps proper for streams with timebases other than AV_TIME_BASE. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avio: rename url_fopen/fclose -> avio_open/close.Anton Khirnov2011-02-23
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: add av_ prefix to dump_format()Anton Khirnov2011-02-16
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Merge libavcore into libavutilReinhard Tartler2011-02-15
| | | | | | | | | | | | It is pretty hopeless that other considerable projects will adopt libavutil alone in other projects. Projects that need small footprint are better off with more specialized libraries such as gnulib or rather just copy the necessary parts that they need. With this in mind, nobody is helped by having libavutil and libavcore split. In order to ease maintenance inside and around FFmpeg and to reduce confusion where to put common code, avcore's functionality is merged (back) to avutil. Signed-off-by: Reinhard Tartler <siretart@tauware.de>