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.
On Windows/MinGW the SDL cflags re-define the main() function, which
results in a linking error if the define is not undeffed.
Since the addition of the SDL output device, SDL cflags are used also
for compiling ffmpeg and ffprobe, so we need to move this trick from
ffplay.c to a common header.
Fix trac issue #256.
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.
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>
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.
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>
avfilter_copy_frame_props() avoids code duplication and increases
robustness.
The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
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.
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.
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.
Also automatically select the show mode only if not specified by the
user.
Fix trac issue #109.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when
interactively resizing the SDL window.
This is done by forcing the minimum size to 1x1.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
The new name is less misleading, since the function will resume the
stream if it is currently paused.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
When CONFIG_AVFILTER, use a AVFrame -> AVPicture cast rather than
explicitely copy the image information from AVFrame to a new
AVPicture.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>