Commit Graph

958 Commits

Author SHA1 Message Date
Stefano Sabatini 0464d272ff lavd/sdl: move compute_overlay_rect() before event_thread()
It will be used in event_thread() in a pending patch.
2013-11-26 18:15:18 +01:00
Stefano Sabatini 7467b4f71b lavd/sdl: factorize overlay rect size in a separate function 2013-11-26 18:15:12 +01:00
Stefano Sabatini 7de3b1394b lavd/sdl: add event handler thread
SDL_Init() is called on the event handler thread, as required by SDL in
Windows to avoid deadlocks as discovered by Roger Pack.

Fix trac ticket #1743 and #1744.
2013-11-26 18:14:52 +01:00
Stefano Sabatini 25c675b5a7 lavd/sdl: do not manually free window_title and icon_title fields
They are automatically freed when calling av_write_trailer(). Simplify.
2013-11-24 19:35:36 +01:00
Lukasz Marek 995f450b44 lavd/xv: free resources on errors
xv_write_header callback leave not freed resources on errors.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-11-15 09:56:58 +01:00
Lukasz Marek 57bca5a2b6 lavd/xv: add more supported formats
Add support for following pixel formats:
- AV_PIX_FMT_UYVY422
- AV_PIX_FMT_YUYV422

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-11-15 09:56:58 +01:00
Lukasz Marek 5d8619595b lavd/xv: simplify write_packet
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-11-15 09:56:58 +01:00
Lukasz Marek f04fe23a52 lavd/xv: fix memory leak
Results of XvQueryAdaptors have to be freed with XvFreeAdaptorInfo.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-11-13 11:34:19 +01:00
Lukasz Marek babf20a215 lavd/pulse: add ff_ prefix and fix param type
Add ff_ prefix for internal API function.
Change type of param from int into enum AVCodecID as it is more specific.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-11-04 00:47:00 +01:00
Lukasz Marek 398844f093 lavd/pulse_audio_enc: fix flush return code
Successful flushing is reported by returning 1 instead of 0.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-11-04 00:23:39 +01:00
Nicolas George 863fb11f63 lavd/lavfi: support unknown channel layouts. 2013-11-03 10:29:53 +01:00
Lukasz Marek e56d1a1203 lavd/alsa: add stream validation
Don't trust provided streams.
Return with error when stream count is not 1 or
provided stream is not an audio stream.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-11-03 10:28:15 +01:00
Lukasz Marek 6ac9afd16e lavd/alsa: fix timestamp calculation
Current implementation didn't include duration of
last processed packet.
Device may return negative timestamps without
this correction.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-11-03 10:28:15 +01:00
Lukasz Marek c617c669e9 lavd/xv: free graphics context
Valgrind detects mem leak from XCreateGC.
Free it with XFreeGC.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-11-01 16:20:50 +01:00
Derek Buitenhuis 327c439f81 timefilter: Handle memory allocation failure
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-29 11:40:04 +00:00
Derek Buitenhuis 069ceea7da timefilter: Fix typo in allocation failure message
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-29 11:38:35 +00:00
Michael Niedermayer d041f12513 avdevice/pulse_audio_enc: remove double ;
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-28 00:52:11 +01:00
Lukasz Marek b387a24cb4 lavd/fbdev_enc: remove unused variables
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 22:46:32 +01:00
Lukasz Marek b04af34600 lavd/fbdev_enc: more stream validation restrictive
So far fbdev_enc device picked up first video stream and ignored others.
It is required to provide exactly one video stream now.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-27 21:45:32 +01:00
Lukasz Marek 7f5e75eea9 lavd/pulse_audio_enc: more stream validation restrictive
So far pulse device picked up first audio stream and ignored others.
It is required to provide exactly one audio stream now.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-27 21:45:32 +01:00
Lukasz Marek 4fb3aa491b lavd:pulse_audio_enc: fix array compared against 0
fixes CID 1113222

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-27 21:45:26 +01:00
Lukasz Marek e5b3b75669 lavd/pulse_audio_enc: fix timestamp calculation
Current implementation didn't include duration of
last processed packet.
Also remove access to st->cur_dts and replace with pkt->pts.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-27 21:43:05 +01:00
Derek Buitenhuis 6ef30976e0 timefilter: Handle memory allocation failure
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-27 19:14:23 +00:00
Lukasz Marek c428170549 lavd/pulse_audio_enc: avoid vars in for()
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-26 01:58:18 +02:00
Lukasz Marek c6c70c2bf7 lavd/pulse_audio_enc: add another default to stream name
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-26 01:58:01 +02:00
Ingo Brückl 6c9c636c00 lavd/fbdev_common: fix compilation with older kernels
This will avoid errors due to conflicting declarations
with linux kernels prior to 2.6.30.

Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Ingo Brückl <ib@wupperonline.de>
2013-10-24 21:19:52 +02:00
Carl Eugen Hoyos f60c3a7c1b lavd/x11grab: Support AV_PIX_FMT_PAL8.
Fixes ticket #3068.
2013-10-24 11:56:36 +02:00
Michael Niedermayer 0491695358 avdevice/fbdev_enc: avoid declaring variables in for()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-24 10:19:38 +02:00
Lukasz Marek a547c496e9 lavd/fbdev: move common code to separate file
Move common fbdev dec/enc for separate file.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-24 08:45:59 +02:00
Lukasz Marek c720d0d9df lavd: rename fbdev.c into fbdev_dec.c
Rename existing fbdev.c to make it a more meaningful name.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-24 08:38:33 +02:00
Lukasz Marek 759388aa71 lavd: add fbdev output device
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-24 08:16:17 +02:00
Lukasz Marek d1f383341f lavd/pulse_audio_enc: add support for flushing
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-20 19:15:30 +02:00
Lukasz Marek f569592623 lavd/pulse_audio_enc: fix error check
Error check should be done by checking negative value, not non-zero.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-18 23:59:27 +02:00
Stefano Sabatini f6b56b1f26 lavd/fbdev: use av_str2err() macro for printing error messages
In particular fix wrong strerror(ret) with a negative value, and avoid
the use of non thread-safe strerror().
2013-10-18 23:38:54 +02:00
Lukasz Marek fb74c7e044 lavd/pulse_audio_dec: apply cosmetic changes
In particular, fix punctuation in docs and make option help messages
grammatically consistent.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-18 23:26:55 +02:00
Lukasz Marek 1421ee2637 lavd/fbdev: pass proper memory map length
fbdev->data was allocated with size fbdev->fixinfo.smem_len, release data
in fbdev_read_close() using the same size.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-18 23:23:23 +02:00
Lukasz Marek 7b1640c4a6 avdevice/pulse_audio_enc: fix stream index
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-10-12 13:52:26 +02:00
Carl Eugen Hoyos 3aa576513b lavd/xv.c: Include XShm.h before Xvlib.h.
This may fix compilation with libxv 1.0.4.
2013-10-09 19:01:11 +02:00
Carl Eugen Hoyos f4e85afd99 Add pulse_audio_common.h to skipheaders.
Fixes an error when running make checkheaders.
2013-10-09 09:39:57 +02:00
Lukasz Marek 60136345e6 lavd/pulse: move common code to separate file
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 23:02:47 +02:00
Lukasz Marek 1ab9f322ee lavd/pulse: rename pulse.c into pulse_audio_dec.c
This make name of the file more specific
as there is also encoder implementation.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 22:28:39 +02:00
Lukasz Marek 361b56c379 lavd: pulse audio encoder
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-08 14:31:50 +02:00
Michael Niedermayer d0c61571cf avdevice/v4l: remove duplicate include
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 15:36:33 +02:00
mrlika ed72542539 lavd/v4l2: do not fail when VIDIOC_ENUMSTD returns EINVAL without a valid match
With some (buggy) drivers, the VIDIOC_G_STD ioctl returns a std_id that cannot
be matched with any of the enumerated v4l2_standard structures (for example
std_id = 0 or std_id = 0xffffff). Do not fail when we reach the end of the
enumeration without a valid match.

Fixes ticket #2370

Note: This commit message has been modified by Giorgio Vazzana, the original
commit message was:

"Fixed regression for mandatory VIDIOC_ENUMSTD support by v4l2"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 22:57:31 +02:00
Giorgio Vazzana 7f6ec05f09 lavd/v4l2: Improve debug message
In particular, print the standard supported by the selected input.
Additionally, use PRIx64 everywhere when printing standards.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 14:30:52 +02:00
Carl Eugen Hoyos e337c9d564 Read h264 headers from v4l2 to allow stream-copying.
Fixes ticket #2882.
Analyzed and tested by William C Bonner.
2013-09-01 21:27:43 +02:00
Thilo Borgmann d814a839ac Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
James Almer 214293b143 lavd: Fix make checkheaders
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 00:40:30 +02:00
Michael Niedermayer b37ff488b8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: Make avpriv_open a library-internal function on msvcrt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:51:03 +02:00
Michael Niedermayer e3a296dfa5 Merge commit 'cb0244daaca83ab666798818f74f5181bf6bc387'
* commit 'cb0244daaca83ab666798818f74f5181bf6bc387':
  bktr: Changed a missed occurrance of open into avpriv_open

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:29:44 +02:00
Martin Storsjö e743e7ae6e libavutil: Make avpriv_open a library-internal function on msvcrt
Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:33 +03:00
Martin Storsjö cb0244daac bktr: Changed a missed occurrance of open into avpriv_open
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:32 +03:00
Michael Niedermayer 95fa1fe437 Merge commit '71bf6b41d974229a06921806c333ce98566a5d8a'
* commit '71bf6b41d974229a06921806c333ce98566a5d8a':
  libavdevice: use avpriv_open()

Conflicts:
	libavdevice/v4l2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 11:36:21 +02:00
Rémi Denis-Courmont 71bf6b41d9 libavdevice: use avpriv_open()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 21:16:05 +02:00
Michael Niedermayer c0ef5d6c16 avdevice/vfwcap: make constant arrays static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 22:24:31 +02:00
Michael Niedermayer 8862ed7340 avdevice/dshow: make constant arrays static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 22:24:11 +02:00
Michael Niedermayer bc4e798562 avdevice/timefilter: 2nd try at avoiding rounding issues
This hopefully fixes fate-timefilter

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 16:15:13 +02:00
Michael Niedermayer d6fd1242f3 avdevice/timefilter-test: provide more space for the printout to allow larger values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 16:11:29 +02:00
Michael Niedermayer 20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun 7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Michael Niedermayer 2b9590ebab avdevice/timefilter-test: dont try to optimize par1 for n0=0 case
for the n0=0 case there are multiple solutions and different
platforms pick different ones
This should reduce the issues with fate and the timefilter test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 17:06:13 +02:00
Michael Niedermayer 66487d73c3 avdevice/timefilter: cleanup the formating of the test output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-30 12:35:53 +02:00
Paul B Mahol 2634af575c avdevice/fbdev: use AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-26 15:21:25 +00:00
Paul B Mahol 0addc82880 avdevice/x11grab: use AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-07-26 15:21:21 +00:00
Michael Niedermayer f3d138ab22 avdevice/lavfi: fix input with unknown channel layout
Fixes handling of >8 channels

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-13 23:10:05 +02:00
Dan Flett 43d36599fe lavd/fbdev.c: Support RGB565 input colour space.
Tested on a Raspberry Pi.

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
2013-07-11 18:16:07 +02:00
Michael Niedermayer f9d7431272 avformat/AVFormatContext: Move fields down to match the fork
avconv uses private and internal fields from libavformat, we thus must
match the layout even of the fields marked non public.
Otherwise ffmpegs libavformat could not be used as a dropin replacement
on debian/ubuntu

The current soname of libavformat was not part of any release nor are any
fields marked public moved thus in theory
no installed shared lib ABI breakage should occur. Still the need for this
change is unfortunate and chilling.
If you installed shared libs from a recent development version of libavformat
that is more recent than the last release. You probably want to check or rebuild
applications that linked to it.

minor versions of avformat & avdevice are bumped to allow detecting this
as both use the updated struct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-09 19:06:32 +02:00
Stefano Sabatini 838bd73139 lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at the next bump
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.

If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().

At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.

Should address trac ticket #2672.
2013-07-03 13:21:42 +02:00
Michael Niedermayer 1ee8fadb81 avdevice/x11grab: allocate just one Cursor
Fixes resource leak and Ticket2450

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-21 12:00:11 +02:00
Stefano Sabatini 9f8937b5ef lavd: add xv output device
Based on the work of Jeff Moguillansky <Jeff.Moguillansky@am.sony.com>.

See thread:
Subject: [FFmpeg-devel] x11 output device for libavdevice
Date: Wed, 10 Apr 2013 23:10:47 +0000
2013-05-30 10:44:54 +02:00
Clément Bœsch 165bc9caa2 v4l2: make possible to disable libv4l2 at runtime.
Also disable it by default since it looks currently buggy. The
usefulness of such library is mostly limited to backward compatibility
with very old devices.
2013-05-22 19:49:29 +02:00
Clément Bœsch 9a7f1519aa lavd/v4l2enc: check write return value. 2013-05-20 16:33:21 +02:00
Clément Bœsch 16a75eaa20 lavd: add v4l2 outdev. 2013-05-20 01:11:33 +02:00
Clément Bœsch 8eec655320 lavd/v4l2: move pixel format conversion code to a separate place.
This will be shared with the output device.
2013-05-20 01:11:28 +02:00
Michael Niedermayer efc08e00cc Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'
* commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110':
  vf_aspect: use the name 's' for the pointer to the private context
  Remove commented-out debug #define cruft

Conflicts:
	libavcodec/4xm.c
	libavcodec/dvdsubdec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg12.c
	libavfilter/avfilter.c
	libavfilter/vf_aspect.c
	libavfilter/vf_fieldorder.c
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:56:43 +02:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Michael Niedermayer c7c71f95f8 replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:23:14 +02:00
Michael Niedermayer 0104570fb6 Merge commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7'
* commit 'a5f8873620ce502d37d0cc3ef93ada2ea8fb8de7':
  silly typo fixes

Conflicts:
	doc/protocols.texi
	libavcodec/aacpsy.c
	libavformat/utils.c
	tools/patcheck

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-04 10:17:52 +02:00
Diego Biurrun a5f8873620 silly typo fixes 2013-05-03 18:26:12 +02:00
Michael Niedermayer 9b595e86e3 avdevice/lavfi: add error checking for av_opt_set_int_list()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 20:39:07 +02:00
Michael Niedermayer 3fc7b47145 buffersink: switch from opaque to AVOptions for params
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 13:47:40 +02:00
Michael Niedermayer a1e7e02eaf abuffersink: switch from opaque to AVOptions for params
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-12 13:38:00 +02:00
Nicolas George 9dd54d7422 lavd/v4l2: fully init an ioctl argument.
Silence a valgrind warning about uninitialized memory.
2013-04-01 10:38:14 +02:00
Giorgio Vazzana 5009863ab5 lavd/v4l2: fix printing of list_formats table
In particular we needed a '\n' at the end of the line when the format is emulated.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 16:17:42 +01:00
Giorgio Vazzana b97f7d9d24 lavd/v4l2: replace ioctl() with v4l2_ioctl()
This is consistent with the rest of the file and makes listing of
emulated formats possible when ffmpeg is compiled with libv4l2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 16:17:04 +01:00
Michael Niedermayer ea4c99de4c dshow_pin: dont return a value from a void function
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-25 22:12:07 +01:00
Martin Storsjö fdaacc5932 sndio_dec: Add missing includes for av_gettime()
This is necessary after the old av_gettime in libavformat was
dropped.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-24 13:20:53 +02:00
Martin Storsjö fe2661121e bktr: Add missing includes for av_gettime()
This is necessary after the old av_gettime in libavformat was
dropped.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-23 23:36:58 +02:00
Giorgio Vazzana 785b849f1c lavd/v4l2: honor previously selected input channel
An input channel could have been previously set with another application, like
v4l2-ctl, so if no input channel is specified use the previosly selected one.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 13:43:56 +01:00
Clément Bœsch d4982b115d lavd/dshow: fix style and typo recently introduced. 2013-03-19 21:26:24 +01:00
dronus fdca977a22 libavdevice sdl: added window_fullscreen option to switch SDL output into fullscreen mode 2013-03-18 20:44:21 +01:00
Paul B Mahol 79b1835726 sndio_dec: add missing #include for av_gettime()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-17 11:10:26 +00:00
Giorgio Vazzana bcd3eb3e7a lavd/v4l2: silence libv4l2 logging
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-16 02:44:36 +01:00
Nicolas George b90912be68 lavd/lavfi: upgrade to AVFrame.
Fix a memory leak because the compat implementation of
AV_BUFFERSINK_FLAG_PEEK is not identical to the previous one.
2013-03-15 20:46:27 +01:00
Michael Niedermayer 2ffa9e611e avdevice: bump major
Our previous release (1.1) contained a version 54 libavdevice
and this version here is not ABI compatible thus a bump is
needed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-14 13:53:41 +01:00
Paul B Mahol b3b46cd74e bktr: add missing #include for av_gettime()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-13 10:48:09 +00:00
Nicolas George ceac5c54dd Remove references to the "ff" variant of buffersink. 2013-03-12 23:31:07 +01:00
Giorgio Vazzana ee4a658695 lavd/v4l2: fix bug in init_convert_timestamp()
The current code returned a period=0, resulting in identical pts for all frames
after time-filtering. This is because AV_TIME_BASE_Q={1, AV_TIME_BASE} and
not {AV_TIME_BASE, 1}. With this patch the correct period in microseconds is computed.
2013-03-12 17:14:47 +01:00
Michael Niedermayer a75f01d7e0 Merge commit 'd8b31be6caebd8d1321ecb754b6e7daaf81dc111'
* commit 'd8b31be6caebd8d1321ecb754b6e7daaf81dc111':
  Add the bumps and APIchanges entries for reference counted buffers changes.

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/version.h
	libavdevice/version.h
	libavfilter/version.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 15:35:39 +01:00
Michael Niedermayer 9cf788eca8 avformat/avdevice: add missing time.h includes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 15:28:22 +01:00
Giorgio Vazzana 9222978aed lavd/v4l2: simplify code
struct buff_data contains a pointer to struct video_data, so passing the
file descriptor again is redundant.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-09 16:59:13 +01:00
Giorgio Vazzana 0286b42540 lavd/v4l2: correctly handle error conditions in mmap_read_frame()
In particular:

1) save errno before it (possibly) gets overwritten by other calls
2) do not forget to enqueue the buffer again in case of error

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-09 16:58:53 +01:00
Michael Niedermayer 2653e12520 Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'
* commit '1afddbe59e96af75f1c07605afc95615569f388f':
  avpacket: use AVBuffer to allow refcounting the packets.

Conflicts:
	libavcodec/avpacket.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavformat/avidec.c
	libavformat/flacdec.c
	libavformat/id3v2.c
	libavformat/matroskaenc.c
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 19:12:03 +01:00
Anton Khirnov d8b31be6ca Add the bumps and APIchanges entries for reference counted buffers changes. 2013-03-08 07:41:49 +01:00
Anton Khirnov 1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Michael Niedermayer 3827734591 v4l2: fix regression that caused ffmpeg to occasionally get stuck
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-02 01:55:08 +01:00
Giorgio Vazzana 0d66268e15 lavd/v4l2: copy frames into normally allocated packets whenever there is just one buffer left available
This will avoid the possibility that we dequeue more buffers than we
have obtained from the v4l2 driver.

Fixes ticket #1570

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-02 00:50:17 +01:00
Michael Niedermayer b56e029bdc avformat/lavfi: force probesize to cover at least 30 frames
This ensures that fps and other values are estimated correctly,
the probesize also is intended to limit disk/protocol reads which
does not apply to lavfi inputs at all.

Fixes Ticket1051

Something similar could be usefull to other input devices

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-28 20:28:59 +01:00
Michael Niedermayer 54b2bddd22 v4l2: try to fix build on BSD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-18 00:53:17 +01:00
Carl Eugen Hoyos fdbe7628a9 Add yvu410 as a supported v4l2 input format. 2013-02-17 19:45:58 +01:00
Carl Eugen Hoyos fdec49cbe8 Add gray16 as a supported v4l2 input format. 2013-02-17 19:44:13 +01:00
rogerdpack 12c71f648c dshow: Fix MSVC support, remove av_export, which was apparently unneeded anyway.
Also cleanup exported symbols

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-15 00:08:12 +01:00
Stefano Sabatini f0703b6cba lavd/v4l2: fix error logic when enumerating standards
Set ret to 0 before enumerating standards in v4l2_set_parameters(), avoid
use of uninitialized variable.

Regression introduced in 60950adc18.
2013-02-10 20:59:06 +01:00
Stefano Sabatini 60950adc18 lavd/v4l2: implement consistent error handling
In particular, avoid use of non-thread-safe strerror(), and store errno
before calling av_log().
2013-02-10 17:09:57 +01:00
Luca Barbato 43e0e0c4e5 libcdio: support recent cdio-paranoia
Upstream decided to split the paranoia interface and move the headers
accordingly.
2013-01-17 21:41:18 +01:00
rogerdpack c916389bd2 dshow: allow for more codec ID's
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
2013-01-16 00:23:53 -07:00
rogerdpack 3b9166fc7e dshow: better error reporting
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
2013-01-16 00:18:40 -07:00
rogerdpack 6d33026668 dshow: fix log message
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
2013-01-16 00:11:15 -07:00
rogerdpack c540312ac3 Merge remote-tracking branch 'origin/master' into combined 2013-01-15 19:09:15 -07:00
Nicolas George 55910e1894 lavd/alsa: simplify reordering functions definition. 2013-02-02 14:13:11 +01:00
Giorgio Vazzana 514216d8a9 lavd/v4l2: read the correct time per frame from devices that support a standard
Generally speaking, there are two types of v4l2 devices [1]:

1) devices that support a standard, like PAL or NTFS (tv cards, for example). For
this class of devices the framerate is fixed by the standard (for example PAL uses
25 fps) and the v4l2 driver cannot usually negotiate a different framerate (unless
it can skip frames on the driver side, to save I/O bandwidth).

2) devices for which the notion of standard does not make sense (webcams, for example).
For these devices it is usually possibile to request a desidered framerate.

In either case, the desidered frame rate can be requested when the VIDIOC_G_PARM
ioctl returns the V4L2_CAP_TIMEPERFRAME flag in the capability field.

Currently the code does not check for V4L2_CAP_TIMEPERFRAME and supports only the
second category of devices, returning a time per frame of 0/0 for devices in the
first group that do not permit to negotiate the framerate.

This patch adds support to read the correct framerate in all cases.

[1] http://linuxtv.org/downloads/v4l-dvb-apis/standard.html

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-31 15:29:53 +01:00
Giorgio Vazzana ff23b76899 lavd/v4l2: add list_standards option
Since the user is expected to choose the standard by name (with -standard
option), add the possibility to list all the supported standards.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-31 12:38:03 +01:00
Stephan Hilb 0501d06468 lavd/v4l2: use avcodec_find_decoder in list_formats
Because libavdevice/v4l2 is a demuxer, it makes sense to look for
decoders instead of encoders when listing the formats supported by the
device.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-28 00:11:49 +01:00
Giorgio Vazzana 93d319a582 lavd/v4l2: select input immediately after opening the device
After opening the device, the first thing we should do is selecting the
input. This is because the image formats (VIDIOC_ENUM_FMT ioctl) and the
standards (VIDIOC_ENUMSTD ioctl) supported may depend on the selected
input ([1] and [2]).

[1] http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-enum-fmt.html
[2] http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-enumstd.html

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-27 18:19:27 +01:00
Stefano Sabatini 5306976be8 lavd/v4l2: sanitize logic of device_try_init(), so that it properly signal errors
Make device_try_init() return an error value, and allow to properly
report errors which are not due to a wrong pixel/codec configuration.

In particular, report intelligible feedback in case of busy device.
2013-01-27 17:58:16 +01:00
Michael Niedermayer 17596198ca Merge commit '80ac87c13dc8c6c063e26a464c5c542357c0583f'
* commit '80ac87c13dc8c6c063e26a464c5c542357c0583f':
  lavc: support ZenoXVID custom tag
  libcdio: support recent cdio-paranoia
  float_dsp: Add #ifdef HAVE_INLINE_ASM around vector_fmul_window
  theora: Skip zero-sized headers

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-18 13:36:39 +01:00
Nicolas George 0e79fe37e5 lavd/v4l2: init return value.
Fix a warning and random failures.
2013-01-16 12:21:58 +01:00
Stephan Hilb f245a2086a lavd/v4l2: update broken link to v4l2 video capture example
Reviewed-by: Stefano Sabatini
2013-01-16 11:27:20 +01:00
Stephan Hilb 36810215fa lavd/v4l2: improve debug message
Reviewed-by: Stefano Sabatini
2013-01-16 11:26:38 +01:00
rogerdpack 47e88486b4 hdyc col
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
2013-01-15 18:37:30 -07:00
rogerdpack a50049a197 dshow: use standardized raw pixel format lookup
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
2013-01-15 17:07:54 -07:00
Stefano Sabatini d012059e7b lavd/v4l2: apply grammar/consistency fixes to options help fields 2013-01-15 21:57:37 +01:00
Stefano Sabatini aa359d3808 lavd/v4l2: return meaningful error code from device_init()
In particular, propagate errno value in case of device init failure.
2013-01-15 21:48:36 +01:00
Stefano Sabatini fce165027f lavd/v4l2: fix misc messages 2013-01-15 21:48:27 +01:00
Stefano Sabatini 1b325ce91a lavd/v4l2: extend error/debug feedback in case of invalid codec/pix_fmt 2013-01-15 21:48:21 +01:00
Michael Niedermayer a646ac8ef5 Merge commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1'
* commit '90cfc084e3e6d37ab88fc96a95f0401d8e8b4cd1':
  avpacket: free side data in av_free_packet().
  v4l2: do not assert on a value received from outside of Libav
  v4l2: set the average framerate instead of codec timebase.

Conflicts:
	libavcodec/avpacket.c
	libavdevice/v4l2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 14:16:21 +01:00
Michael Niedermayer 53c2f401f7 Merge commit '246da0b13551b1f80f067e4f258e5bd691f5ab33'
* commit '246da0b13551b1f80f067e4f258e5bd691f5ab33':
  v4l2: avoid pointless indirection.
  vdpau: Add VC-1 decoding via hwaccel infrastructure
  vdpau: Add H.264 decoding via hwaccel infrastructure

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/version.h
	libavdevice/v4l2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 14:00:21 +01:00
Anton Khirnov 49dc82eef7 v4l2: do not assert on a value received from outside of Libav 2013-01-13 16:31:17 +01:00
Anton Khirnov 838b849e70 v4l2: set the average framerate instead of codec timebase.
Codec timebase is supposed to be set by decoders only.
2013-01-13 16:31:09 +01:00
Anton Khirnov 246da0b135 v4l2: avoid pointless indirection.
v4l2_read_header() does no cleanup, so it can return directly, without
any need for goto.
2013-01-13 16:30:38 +01:00
Michael Niedermayer e1cf1a9c89 Merge commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8'
* commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8':
  aviobuf: Partial support for reading in read/write contexts
  build: Avoid detecting bogus components named 'x'

Conflicts:
	libavcodec/allcodecs.c
	libavdevice/alldevices.c
	libavformat/allformats.c
	libavformat/aviobuf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-04 13:01:54 +01:00
Clément Bœsch 3048fae63c build: Avoid detecting bogus components named 'x'
The function find_things() in configure is confused by component
registration calls as part of multiline macros defining combined
component registration.  Coalesce those macros into one line to
work around the issue.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-03 15:11:25 +02:00
Clément Bœsch 613001d75f Merge back some registering macros in all*.c.
This breaks the sed in configure:find_things(). Fixes regression from
c73c87b. Fixes Ticket2079.

Found-by: jamal
2012-12-30 07:18:21 +01:00
Michael Niedermayer 4f1d7cc0ed bktr: fix warning: missing braces around initializer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-29 19:27:07 +01:00
Michael Niedermayer 83d4a8442c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cosmetics: Prettyprint codec/format/filter registration files

Conflicts:
	libavcodec/allcodecs.c
	libavdevice/alldevices.c
	libavfilter/allfilters.c
	libavformat/allformats.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-29 14:27:38 +01:00
Diego Biurrun c73c87b412 cosmetics: Prettyprint codec/format/filter registration files 2012-12-28 19:18:13 +01:00
Carl Eugen Hoyos 0fb79f30db Support H264 over video4linux2.
Tested-by: Val Malykh
2012-12-21 18:12:29 +01:00
Diego Biurrun 511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Ramiro Polla 83a9f29f60 dshow: call CoUninitialize() on dshow_read_close()
Every call to CoInitialize should have a matching CoUnititalize.

Based on patch by Don Moir <donmoir@comcast.net>.
2012-12-17 03:44:51 -02:00
Ramiro Polla 190f6135b4 dshow: handle events in graph
Handling DirectShow events prevents infinite loops when there is an error in
the graph, such as a device being disconnected. This makes it possible for
dshow to return an error to the caller and run the cleanup code.

Based on patch by Don Moir <donmoir@comcast.net>.
2012-12-17 03:44:12 -02:00
rogerdpack fe3e0e486e lavd/dshow: rename dshow class name
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-12-15 15:46:20 +01:00
Ramiro Polla f2c49da9ac dshow: fix return code when opening device
Successfully opening a device altered the ret variable, making the function
not cleanup properly and return an incorrect value for errors that happened
afterwards.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-08 21:44:30 +01:00
Clément Bœsch 377d201790 lavd/lavfi: fix float.h include.
float.h is a system header.
2012-12-06 15:09:47 +01:00
Michael Niedermayer 99efd59626 Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'
* commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967':
  Remove pointless #undefs of previously forbidden functions.
  fate: Add dependencies for bmp, cdxl, dfa, mp3

Conflicts:
	doc/examples/muxing.c
	libavfilter/filtfmts.c
	libavutil/des.c
	libavutil/eval.c
	libavutil/log.c
	libavutil/parseutils.c
	tests/fate/mp3.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 13:34:45 +01:00
Anton Khirnov cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Stefano Sabatini c9ff32215b lavu/opt: allow to set sample and pixel format with av_opt_set_int()
This change requires the user to specify min and max value, and makes
possible to prevent the user to set AV_{SAMPLE,PIX}_FMT_NONE if
forbidden.

Add required ifdeffery in case of mixed libraries, when libavutil is
updated but not the other libraries.

This is a followup of 08d0969c14.
2012-12-01 19:33:30 +01:00
Stefano Sabatini 08d0969c14 lavu/opt: change the way default pixel and sample format value is set
Use the i64 field rather than the string value. Using a string to set a
default sample/pixel format is weird, also the new interface is more
consistent with the rest of the API.

This is technically an API break, but hopefully there are no applications
using this feature outside of FFmpeg. In order to save backward
compatibility with mixed libraries in case libavutil is updated but not
the other libraries, some ifdeffery hacks are added.

Note that the version check is only performed when class->version != 0,
since if it is not defined then we assume that no version was defined and
the class is not affected by the change.

We will luckily get rid of the hack at the next major bump.
2012-11-30 00:01:53 +01:00
Alexander Strasser 7750c48d30 dshow: Use NO_DSHOW_STRSAFE for all dshow header inclusions
Move the NO_DSHOW_STRSAFE macro definition in front of the dshow.h
system header inclusion.

This excludes the usage of the STRSAFE functions consistently.

Further background on this can be found in the commit message of
revision 05ee0db1 where the #define was initially introduced.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2012-11-16 19:26:13 +01:00
Georg Lippitsch 15b02ddee0 Update iec61883 to handle multiple devices, and allow
selection of DV device by its GUID
2012-11-13 19:44:21 +01:00
Paul B Mahol 1acd2f6ba7 Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
Also remove it in once case when it is not needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-13 13:21:21 +00:00
Michael Niedermayer 03b078721c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'
* commit '97bf7c03b1338a867da52c159a2afecbdedcfa88':
  doc: git-howto: Leave reviewers time to react before pushing patches
  Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
  lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/git-howto.texi
	ffmpeg_filter.c
	libavcodec/flacdec.c
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c
	libavcodec/utils.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffer.c
	libavutil/Makefile
	libavutil/audioconvert.h
	libavutil/channel_layout.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-12 11:32:11 +01:00
Justin Ruggles a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Michael Niedermayer 1ba0d9b5d1 oss: warn when non block mode cannot be enabled.
Fixes CID732183
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-05 00:28:21 +01:00
Michael Niedermayer e1c804d883 dv1394: Swap the min and max values of the 'standard' option
DV1394_NTSC has a lower value than DV1394_PAL.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-02 11:25:48 +02:00
Michael Niedermayer ebfc212b02 dv1394: fix order of AVOption fields
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 02:07:15 +01:00
Michael Niedermayer 11d695d120 x11grab: fix mixed declaration and code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 22:24:10 +01:00
Stefano Sabatini b19bfd6c9f lavd/lavfi: fix leak in case of failure
Jump to the common release code in case of failure.
2012-10-25 21:35:40 +02:00
Stefano Sabatini 8b03cd3cd7 lavd/lavfi: add graph_file option
Allow to specify a filename where to put the filtergraph description.

This is useful to override limitations or glitches of particular shell
environments, and allows a level of indirection for specifying
filtergraphs.
2012-10-23 22:08:55 +02:00
Isaac Dooley 469a65b150 x11: Fix x11grab BadCursor
Fixes Ticket1738

Based-on: A fix found in a perl module (http://ffmpeg.org/pipermail/ffmpeg-user/2012-August/008804.html)
Reviewed-by: Clemens Fruhwirth <clemens@endorphin.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 21:49:01 +02:00
Clément Bœsch 6fb2fd895e lavc: add lavfi metadata support.
This commit introduces a new AVPacket side data type:
AV_PKT_DATA_STRINGS_METADATA. Its main goal is to provide a way to
transmit the metadata from the AVFilterBufferRef up to the AVFrame. This
is at the moment "only" useful for lavfi input from libavdevice:
lavd/lavfi only outputs packets, and the metadata from the buffer ref
kept in its context needs to be transmitted from the packet to the frame
by the decoders. The buffer ref can be destroyed at any time (along with
the metadata), and a duplication of the AVPacket needs to duplicate the
metadata as well, so the choice of using the side data to store them was
selected.

Making sure lavd/lavfi raises the metadata is useful to allow tools like
ffprobe to access the filters metadata (it is at the moment the only
way); ffprobe will now automatically show the AVFrame metadata in any
customizable output format for users. API users will also be able to
access the AVFrame->metadata pointer the same way ffprobe does
(av_frame_get_metadata).

All the changes are done in this single commit to avoid some memory
leaks: for instances, the changes in lavfi/avcodec.c are meant to
duplicate the metadata from the buffer ref into the AVFrame. Unless we
have an internal way of freeing the AVFrame->metadata automatically, it
will leak in most of the user apps. To fix this problem, we introduce
AVCodecContext->metadata and link avctx->metadata to the current
frame->metadata and free it at each decode frame call (and in the codec
closing callback for the last one). But doing this also means to update
the way the tiff decoder already handles the AVFrame->metadata (it's the
only one decoder with frame metadata at the moment), by making sure it
is not trying to free a pointer already freed by the lavc internals.

The lavfi/avcodec.c buffer ref code is based on an old Thomas Kühnel
work, the rest of the code belongs to the commit author.

Signed-off-by: Thomas Kühnel <kuehnelth@googlemail.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2012-10-21 17:29:10 +02:00
Michael Niedermayer 6f557a2e12 caca: fix 10l typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 19:05:58 +02:00
Paul B Mahol 82eba22667 lavd: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 15:58:37 +00:00
Michael Niedermayer 27ccc82e1b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavu,lavd: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavutil/imgutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 17:21:01 +02:00
Anton Khirnov 22c8cbc0da lavu,lavd: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Michael Niedermayer ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Michael Niedermayer 43c157f4a4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  af_resample: avoid conversion of identical sample formats for 1 channel
  avcodec: allow either planar or interleaved sample format when encoding mono
  adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
  timefilter: De-doxygenize normal code comments and drop silly ones
  gxf: Include the right header for the avpriv_frame_rate_tab declaration

Conflicts:
	libavcodec/adpcmenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 13:11:11 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Diego Biurrun 62ae37decd timefilter: De-doxygenize normal code comments and drop silly ones 2012-10-07 22:31:29 +02:00
Michael Niedermayer 55c49afc42 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  yuv4mpeg: return proper error codes.
  Give all anonymously typedeffed structs in headers a name
  fate: Add parseutils test
  parseutils-test: Drop random colors from parsing test
  vf_pad/scale: use double precision for aspect ratios.
  build: error on variable-length arrays
  ppc: swscale: rework yuv2planeX_altivec()
  ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
  x86: dsputil: kill VLA in gmc_mmx()
  libspeexenc: Updated commentary to reflect recent changes
  libspeexenc: Add an option for enabling DTX
  doc/APIchanges: fill in missing dates and hashes.
  lavr: bump major to 1 and declare it stable.
  lavr: change the type of the data buffers to uint8_t**.
  lavc: deprecate the audio resampling API.

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	ffplay.c
	libavcodec/dwt.h
	libavcodec/libspeexenc.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavformat/asf.h
	tests/fate/libavutil.mak
	tests/ref/fate/parseutils

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-06 13:45:08 +02:00
Diego Biurrun e4cbf7529b Give all anonymously typedeffed structs in headers a name
Anonymous structs cannot be forward declared and have no benefit.
2012-10-06 09:27:11 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun 14d3e7ad11 Remove some silly disabled code. 2012-10-01 10:24:28 +02:00
rogerdpack 1bdb4b26a8 dshow: enhance error message
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 15:48:49 +02:00
jamal a70b4935f1 Add missing version macros to libraries
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 15:10:18 +02:00
Stefano Sabatini 53d71335cb lavd/lavfi: push frames until the last sink is EOF
Previously the device was returning EOF when the first sink was ending,
with the current change the device will continue to return frames until
all the sinks are EOF, which seems the most expected behavior.
2012-09-20 12:13:17 +02:00
Stefano Sabatini 30a265f058 lavd/lavfi: apply stylistic fixes to the options help fields 2012-09-11 22:56:35 +02:00
Derek Buitenhuis 80d2ec6bc9 dshow: Change WINBOOL to BOOL
WINBOOL is MinGW-specific, and since both MSVC and MinGW
have BOOL, use that instead.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 22:23:32 +02:00
Stefano Sabatini 09cc23e0f7 lavd/sdl: decrease debug info notice log level from AV_LOG_INFO to VERBOSE
Decrease log spam.
2012-09-07 14:31:38 +02:00
Stefano Sabatini a7c7b34d29 lavd/sdl: remove trailing dot in messages
This is consistent with the apparently prevailing convention.
2012-09-07 14:31:37 +02:00
Ramiro Polla dc5fcdb896 lavd/dshow: use AV_OPT_TYPE_IMAGE_SIZE
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-09-07 09:59:12 +02:00
Ramiro Polla 37a0db50db lavd/dshow: support video codec and pixel format selection
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-09-07 09:59:12 +02:00
Michael Niedermayer d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Michael Niedermayer 99de3df3d3 Merge commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078'
* commit 'd58dd4b5b5d31cfd4092e38a5f2c894eee2ab078':
  avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Conflicts:
	libavcodec/libvpxenc.c
	libavcodec/options_table.h
	libavfilter/vf_drawtext.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:09:09 +02:00
Michael Niedermayer d5f65e9d40 Merge commit '124134e42455763b28cc346fed1d07017a76e84e'
* commit '124134e42455763b28cc346fed1d07017a76e84e':
  avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Conflicts:
	libavcodec/aacenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/options_table.h
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/vf_drawtext.c
	libavformat/movenc.c
	libavformat/options_table.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 13:58:11 +02:00
Martin Storsjö e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö 124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Michael Niedermayer 3061664a57 avoid ambigous buffersink names
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 06:05:08 +02:00
Michael Niedermayer e7b4337777 v4l2: fix compile on systems that lack V4L2_PIX_FMT_CPIA1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 04:35:06 +02:00
Stephan Hilb 6eac554659 Add CPiA video decoder
The cpia video decoder is intended to be used with the v4l2 demuxer.
There are some small changes to the v4l2 demuxer to support the
variable frame length of the format.
Fixes ticket #1537

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-31 00:24:11 +02:00
Ramiro Polla ad7fae4ee1 dshow: allow user to specify audio buffer size
Based on patch by rogerdpack <rogerpack2005@gmail.com>

Tested-by: Roger Pack <rogerdpack2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-29 18:58:20 +02:00
rogerdpack 415f4cca1d dshow:protect access to curbufsize to promote consistency
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 20:58:05 +02:00
rogerdpack a966d94891 dshow: avoid integer overflow when using curbufsize
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 20:56:45 +02:00
rogerdpack a93c221ccd dshow: protect access to curbufsize
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-19 18:36:26 +02:00
rogerdpack 42dbf06df0 dshow: cleanup reference
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-19 18:30:50 +02:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Stefano Sabatini 4270d8c04d lavd/x11grab: deprecate "nomouse" specification in filename
Favor draw_mouse option. Should simplify parsing, and make it more
robust.
2012-08-08 23:43:37 +02:00
Stefano Sabatini c93b796c3e lavd/x11grab: apply misc consistency fixes to options definition
In particular, do not upcase first word, do not use final dot, use a verb
to specify what the option does, sort entries by name, apply random
vertical align.
2012-08-08 23:43:37 +02:00
Michael Niedermayer bb2f13c19f rename missed CodecID to AVCodecID
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 23:57:21 +02:00
Michael Niedermayer 7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Clément Bœsch 16dc5f2050 Replace various inlined inverse AVRational with av_inv_q(). 2012-08-06 00:04:36 +02:00
Michael Niedermayer d1dad7c824 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpc8: return more meaningful error codes.
  mpc: return more meaningful error codes.
  wv,mpc8: don't return apetag data in packets.
  rtmp: do not warn about receiving metadata packets
  x86: h264dsp: Adjust YASM #ifdefs
  x86: yadif: Mark mmxext optimizations as such
  h264: convert loop filter strength dsp function to yasm.
  Improve descriptiveness of a number of codec and container long names

Conflicts:
	libavcodec/flvdec.c
	libavcodec/libopenjpegdec.c
	libavformat/apetag.c
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-31 22:41:00 +02:00
Diego Biurrun 0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Michael Niedermayer 706bd8ea19 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  h264_idct_10bit: port x86 assembly to cpuflags.
  x86inc: clip num_args to 7 on x86-32.
  x86inc: sync to latest version from x264.
  fft: rename "z" to "zc" to prevent name collision.
  wv: return meaningful error codes.
  wv: return AVERROR_EOF on EOF, not EIO.
  mp3dec: forward errors for av_get_packet().
  mp3dec: remove a pointless local variable.
  mp3dec: remove commented out cruft.
  lavfi: bump minor to mark stabilizing the ABI.
  FATE: add tests for yadif.
  FATE: add a test for delogo video filter.
  FATE: add a test for amix audio filter.
  audiogen: allow specifying random seed as a commandline parameter.
  vc1dec: Override invalid macroblock quantizer
  vc1: avoid reading beyond the last line in vc1_draw_sprites()
  vc1dec: check that coded slice positions and interlacing match.
  vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value
  configure: Move parts that should not be user-selectable to CONFIG_EXTRA
  lavf: remove commented out cruft in avformat_find_stream_info()
  ...

Conflicts:
	Makefile
	configure
	libavcodec/vc1dec.c
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264_deblock_10bit.asm
	libavcodec/x86/h264dsp_mmx.c
	libavfilter/version.h
	libavformat/mp3dec.c
	libavformat/utils.c
	libavformat/wv.c
	libavutil/x86/x86inc.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-29 02:16:26 +02:00
Anton Khirnov c4ef6a3e4b Add missing libavutil/time.h includes. 2012-07-28 09:02:07 +02:00
Diego Biurrun 24f8961f93 x11grab: cosmetics: consistent naming for x11grab-related things 2012-07-28 02:02:19 +02:00
Stefano Sabatini c0b91348fe lavd/caca: create display *after* checking dither options
Avoid fastidious creation and immediate destroy of the display in case
one of the dither options fails to be set.

Also add NULL checks in write_trailer(), which are now necessary since
the function can be called when not all the components have been
initialized.
2012-07-22 10:32:21 +02:00
Stefano Sabatini 9ce0e19ab6 lavd/caca: provide more meaningful feedback if fails to set a dither option 2012-07-22 10:32:15 +02:00
Stefano Sabatini fa71471cef lavd/caca: rename "colors" option to "color"
More consistent with libcaca function names. Should not harm since the
device was added less than one day ago.
2012-07-22 10:31:33 +02:00
Stefano Sabatini d510527885 lavd/caca: sort arguments for -list_dither 2012-07-22 10:28:23 +02:00
Stefano Sabatini 295e0e4b4f lavd/caca: extend error message for -list_dither option 2012-07-22 10:28:23 +02:00
Paul B Mahol 296c1b6bd1 libcaca output device 2012-07-21 03:33:02 +00:00
Nicolas George fd58678b86 v4l2: remove call to v4l2_fd_open.
v4l2_fd_open is already called at the end of v4l2_open;
calling a second time leaks structures inside libv4l2.

Fix trac ticket #1560.
2012-07-20 21:12:10 +02:00
Stefano Sabatini 7e17389c1e lavd/sdl: use verb in options help message
An help message tells what an option does, not what its argument is.
2012-07-19 23:56:59 +02:00
Michael Niedermayer a6a085a928 v4l2: use av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-08 17:59:56 +02:00
Lou Logan b22ecbc6a5 cosmetics: various spelling fixes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-06 17:08:22 +02:00
Georg Lippitsch 325fb246f2 FireWire DV/HDV input device using libiec61883
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2012-07-05 13:02:49 +02:00
Michael Niedermayer 039e9fe01c Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  lavfi: reclassify showfiltfmts as a TESTPROG
  graph2dot: fix printf format specifier
  swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
  vp8: loopfilter >=sse2 functions need aligned stack on x86-32.
  amr: remove shift out of the AMR_BIT() macro.
  dsputilenc: group yasm and inline asm function pointer assignment.
  mov: use forward declaration of a function instead of a table.
  Clarify Doxygen comment for FF_API_* #defines.
  configure: simplify get_version()
  Create version.h headers for libraries that lack them
  gitignore: Use full path instead of relative path to specify patterns
  mpegvideo: remove VLAs
  Add XTEA encryption support in libavutil
  Add Blowfish encryption support in libavutil
  eval: Add the isinf() function and tests for it
  flacdec: move lpc filter to flacdsp
  flacdec: split off channel decorrelation as flacdsp
  avplay: Add an option for not limiting the input buffer size
  FATE: add a test for WMA cover art.
  FATE: add a test for apetag cover art
  ...

Conflicts:
	.gitignore
	configure
	ffplay.c
	libavcodec/Makefile
	libavcodec/error_resilience.c
	libavcodec/mpegvideo.c
	libavcodec/ratecontrol.c
	libavdevice/avdevice.h
	libavfilter/Makefile
	libavfilter/filtfmts.c
	libavfilter/version.h
	libavformat/mov.c
	libavformat/version.h
	libavutil/Makefile
	libavutil/avutil.h
	libavutil/version.h
	libswscale/swscale.h
	libswscale/x86/swscale_mmx.c
	tests/fate/libavutil.mak
	tests/lavfi-regression.sh
	tools/graph2dot.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-04 21:03:28 +02:00
Diego Biurrun 2047e40e6e Clarify Doxygen comment for FF_API_* #defines. 2012-07-04 15:10:10 +02:00
Diego Biurrun 86ab7b0f2f Create version.h headers for libraries that lack them 2012-07-04 15:10:06 +02:00
Stefano Sabatini 8dd0e87d7b lavfi: remove old video sink API
It was deprecated since a long time and removed after the 2->3 major
bump.
2012-06-26 11:40:08 +02:00
Nicolas George 7681d0eaca lavd/lavfi: do not set the channel layout list.
The list was set to avfilter_all_channel_layouts,
which is really all common channel layouts.
Not setting it leaves an empty list,
which now means really all.
2012-06-21 19:40:49 +02:00
Michael Niedermayer 4da42ebe44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MS Screen 1 decoder
  aacdec: Fix popping channel layouts.
  av_gettime: support Win32 without gettimeofday()
  Use av_gettime() in various places
  Move av_gettime() to libavutil
  dct-test: use emms_c() from libavutil instead of duplicating it
  mov: fix operator precedence bug
  mathematics.h: remove a couple of math defines
  Remove unnecessary inclusions of [sys/]time.h
  lavf: remove unnecessary inclusions of unistd.h
  bfin: libswscale: add const where appropriate to fix warnings
  bfin: libswscale: remove unnecessary #includes
  udp: Properly check for invalid sockets
  tcp: Check the return value from getsockopt
  network: Use av_strerror for getting error messages
  udp: Properly print error from getnameinfo
  mmst: Use AVUNERROR() to convert error codes to the right range for strerror
  network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
  rtmp: Reduce the number of idle posts sent by sleeping 50ms

Conflicts:
	Changelog
	configure
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dct-test.c
	libavcodec/version.h
	libavformat/riff.c
	libavformat/udp.c
	libavutil/Makefile
	libswscale/bfin/yuv2rgb_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 20:47:46 +02:00
Mans Rullgard 6501dcfb5e Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:46 +01:00
Michael Niedermayer 15f8941108 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Avoid C99 variable declarations within for statements.
  rtmp: Read and handle incoming packets while writing data
  doc: document THREAD_TYPE fate variable
  rtpdec: Don't require frames to start with a Mode A packet
  avconv: don't try to free threads that were not initialized.

Conflicts:
	doc/fate.texi
	ffplay.c
	libavdevice/dv1394.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 00:14:21 +02:00
Diego Biurrun d246c18ea6 Avoid C99 variable declarations within for statements.
We generally do not declare variables within for statements and
there are compilers that choke on such constructs.
2012-06-14 23:36:04 +02:00
Michael Niedermayer c7b9eab2be Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
  rtmp: Set the client buffer time to 3s instead of 0.26s
  rtmp: Handle server bandwidth packets
  rtmp: Display a verbose message when an unknown packet type is received
  lavfi/audio: use av_samples_copy() instead of custom code.
  configure: add all filters hardcoded into avconv to avconv_deps
  avfiltergraph: remove a redundant call to avfilter_get_by_name().
  lavfi: allow building without swscale.
  build: Do not delete tests/vsynth2 directory, which is no longer created.
  lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
  lavfi: make AVFilterPad opaque after two major bumps.
  lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
  lavfi: make avfilter_get_video_buffer() private on next bump.
  jack: update to new latency range API as the old one has been deprecated
  rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
  ppc: Rename H.264 optimization template file for consistency.
  lavfi: add channelsplit audio filter.
  golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()
  sws: fix planar RGB input conversions for 9/10/16 bpp.

Conflicts:
	Changelog
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/golomb.h
	libavcodec/v210dec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/asrc_anullsrc.c
	libavfilter/audio.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/version.h
	libavfilter/vf_frei0r.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/video.h
	libavfilter/vsrc_color.c
	libavformat/rtmpproto.c
	libswscale/input.c
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-13 22:43:57 +02:00
Sean McGovern 8772997d10 jack: update to new latency range API as the old one has been deprecated
Fixes Bugzilla #279.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-06-13 10:59:22 +02:00
Nicolas George 4adf5dfadb sdl: fix aspect ratio computations.
The rounding was wrong due to incorrect ue of floats,
changed to rationals and av_rescale.

The results were not properly passed to SDL.
2012-06-10 09:57:50 +02:00
Nicolas George 3ff6b1a2b3 sdl: fix overlay size.
The size passed to SDL_CreateYUVOverlay is the size
of the video in pixels, it must not take the aspect ratio
into account.
2012-06-10 09:42:31 +02:00
Nicolas George 2f9907be3e sdl: add AVFMT_VARIABLE_FPS and AVFMT_NOTIMESTAMPS.
It allows vsync to be automatically set to passthrough.
2012-06-10 09:42:31 +02:00
Michael Niedermayer f2c5383620 avdevice: bump soname due to lavf soname bump
avdevice is just a part of lavf and uses lavf API/ABI/structures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-25 12:22:21 +02:00
Kyle 02cc66dd78 dshow: rename dshow.h to avoid conflict with system header of equal name
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-24 14:15:10 +02:00
Nicolas George 5732f40e3f x11grab: use AV_OPT_TYPE_IMAGE_SIZE. 2012-05-20 18:24:20 +02:00
Nicolas George 3e63071115 v4l2: use AV_OPT_TYPE_IMAGE_SIZE. 2012-05-20 18:24:20 +02:00
Nicolas George 0ef4924db4 sdl: use AV_OPT_TYPE_IMAGE_SIZE. 2012-05-20 18:24:20 +02:00
Nicolas George 9bcd70aa23 bktr: use AV_OPT_TYPE_IMAGE_SIZE. 2012-05-20 18:24:20 +02:00
Clément Bœsch cb9aed10f7 lavd/dshow: fix make checkheaders. 2012-05-18 23:34:11 +02:00