Commit Graph

385 Commits

Author SHA1 Message Date
Stefano Sabatini 26513856d6 cmdutils: remove OPT_FUNC2
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>
2011-05-28 09:40:19 -04:00
Diego Biurrun 6c6c976fa9 ffplay: Remove disabled code. 2011-05-26 16:26:17 +02:00
Justin Ruggles bc778a0cea Add support for request_sample_format in ffmpeg and ffplay. 2011-05-18 17:27:06 -04:00
Stefano Sabatini 3a7c977417 ffplay: remove audio_write_get_buf_size() forward declaration
Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
(cherry picked from commit 8776f3d22e)
2011-05-16 14:13:03 -07:00
Diego Biurrun 046f081b46 configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.
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.
2011-05-12 11:41:59 +02:00
Benjamin Larsson 91199cfe55 ffplay: add a dummy option -i so that it is easy to switch between ffmpeg -i "file" and ffplay -i "file".
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-11 07:32:36 +02:00
Oskar Arvidsson 6e3ef511d7 Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:33 -04:00
Stefano Sabatini 6209669de4 Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-02 11:24:45 +02:00
Diego Biurrun 045dd4b928 Replace some commented-out debug printf() / av_log() messages with av_dlog(). 2011-04-29 17:27:01 +02:00
Diego Biurrun 89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Anton Khirnov 41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Anton Khirnov 80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Martin Storsjö 648c79624f ffplay: Don't assume ic->pb is non-null
This fixes crashes on exit when plaing some RealRTSP streams
(among other), e.g.
rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3.
These crashes have been present since 3e68b3ba7b.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 15:08:09 -04:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Anton Khirnov 3e68b3ba7b avio: deprecate url_ferror
AVIOContext.error should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:28 -04:00
Anton Khirnov 66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov 76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov 610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Reinhard Tartler 737eb5976f Merge libavcore into libavutil
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>
2011-02-15 16:18:21 +01:00
Stefano Sabatini b7ec5cc401 Remove disabled legacy code in ffplay.
The code was setting aspect ratio from the DTG active format, and was
present and disabled since the creation of ffplay.

See thread:
Subject: [FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in
        disabled code.
Date: Sat, 12 Feb 2011 18:46:19 +0100

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 12:11:56 +00:00
Alexander Strange c0b102ca03 Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.

avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.

Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Alexander Strange 37b00b47cb Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-09 09:17:28 -05:00
Alexander Strange 6b47495397 Adopt pkt_dts/pkt_pts in lavc clients
No behavior change; this makes DTS reliable with the next patch.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-05 16:37:43 -05:00
Stefano Sabatini 4359288c56 Make avfilter_graph_free() free the graph.
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.

Simplify usage.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 02:55:11 +00:00
Stefano Sabatini 75ea596de1 ffplay: factorize code from video_thread() into configure_video_filters()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-02 12:09:46 +00:00
Stefano Sabatini 2855080447 In ffplay:get_video_frame(), use frame->pkt_pts rather than reordered_opaque.
AVCodecContext.reordered_opaque is deprecated for this specific use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-30 19:02:19 +00:00
Stefano Sabatini 13156f40e1 ffplay: in video_thread(), use av_dlog() for timestamp logging.
Disable logging of rescaled timestamps if DEBUG is not enabled.
Avoid debug log spamming with -loglevel debug.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-30 17:52:01 +00:00
Stefano Sabatini db2ddd3885 Remove outdated and confusing comment.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 13:06:06 +00:00
Stefano Sabatini d72858f89f Merge two if (got_picture) {} blocks in ffplay.c:get_video_frame(). 2011-01-17 22:31:11 +01:00
Stefano Sabatini 8f83a3b054 Remove outcommented fossil code. 2011-01-17 22:04:06 +01:00
Stefano Sabatini 199c18a784 Fix weird indent in get_video_frame().
Originally committed as revision 26390 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-16 17:26:00 +00:00
Stefano Sabatini 24d13ebc15 Reindent after the last commit.
Originally committed as revision 26372 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:21:12 +00:00
Stefano Sabatini 112c4b8796 In ffplay, do not open display if -nodisp is set.
Fixes issue 1017.

Originally committed as revision 26371 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 17:21:09 +00:00
Stefano Sabatini d881a0e895 Cosmetics: fix weird indent.
Originally committed as revision 26350 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:28:00 +00:00
Michael Niedermayer 393cbb963b Add AVFrame.pkt_pts that contains the correctly reordered AVPacket.pts
Originally committed as revision 26260 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-07 23:07:24 +00:00
Nicolas George be732b7089 Fix ffplay -an/-vn options that were swapped by r26105.
Originally committed as revision 26115 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-28 09:52:31 +00:00
Michael Niedermayer 0ccabeeaef Support filters and decoders that dont support negative linesizes.
This patch is based on work by stefano.

Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 15:10:21 +00:00
Nicolas George 406f0f1bcf Use av_find_best_stream in ffplay.
Originally committed as revision 26105 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-27 09:08:36 +00:00
Stefano Sabatini 037be76e15 Add avfilter_graph_create_filter().
Originally committed as revision 25862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-02 20:12:27 +00:00
Stefano Sabatini 5d6e4c160a Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-12 11:04:40 +00:00
Stefano Sabatini 1e80a0eaa4 Remove graphparser.h header, move AVFilterInOut and
avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h.

Simplify, and less confusing for the user.

Originally committed as revision 25705 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 22:56:29 +00:00
Stefano Sabatini 7313132bcc Rename AVFilterInOut field filter to filter_ctx, more semantically correct.
Originally committed as revision 25700 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-07 18:40:18 +00:00
Stefano Sabatini 97dd1e4a87 Rename avfilter_graph_destroy() to avfilter_graph_free().
The new name is shorter and more consistent with the rest of the API.

This change breaks libavfilter API/ABI.

Originally committed as revision 25674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:24 +00:00
Stefano Sabatini e15aeea656 Implement avfilter_graph_alloc().
Originally committed as revision 25673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-04 20:34:19 +00:00
Stefano Sabatini ba7d6e798e Remove usage of deprecated libavcodec/audioconvert.h functions.
Originally committed as revision 25668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:19:34 +00:00
Stefano Sabatini ff0652e503 Implement a common get_filtered_video_frame(), shared between ffplay.c
and ffmpeg.c.

Originally committed as revision 25520 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:57:11 +00:00
Stefano Sabatini 2a24df9357 Add avfilter_graph_config().
Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 10:20:53 +00:00
Stefano Sabatini f7ead94c69 Factorize definition of the output_filter defined in both ffplay.c and
ffmpeg.c.
Replace it with a more generic definition which can be shared.

Originally committed as revision 25453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:26 +00:00
Stefano Sabatini 387b4ac993 Fix timebase handling at the begin and at the end of the ffplay video
filterchain.

Set timebase in the ffplay input, and make get_filtered_video_frame()
rescale the output frames PTSes according to their timebase.

Originally committed as revision 25450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:40:16 +00:00