Commit Graph

846 Commits

Author SHA1 Message Date
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