Commit Graph

958 Commits

Author SHA1 Message Date
Lukasz Marek 8ff72924cf lavd/opengl_enc: fix pixel data alignment
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-30 22:03:32 +02:00
Lukasz Marek 5bef4878d3 lavd/pulse_audio_enc: respect minreq while checking buffer fullness
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:36:14 +02:00
Lukasz Marek f817d55049 lavd/pulse_audio_enc: signal that buffer is still writable after write
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:36:06 +02:00
Lukasz Marek a1e5be5c1a lavd/pulse_audio_enc: add pointer checks
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Lukasz Marek 954a8f4483 lavd/pulse_audio_enc: add more buffer attributes
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Lukasz Marek e2ebaa0933 lavd/fbdev_dec: implement fbdev_get_device_list callback
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Lukasz Marek 279ff8d2f6 lavd/fbdev_enc: move list device code to fbdev_common
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Lukasz Marek 3050e53f2b lavd/fbdev_enc: remove redundant assignments
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Michael Niedermayer 68c3e6025f Fix convertion typos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 00:09:08 +02:00
Lukasz Marek 4930e529bf lavd/fbdev_enc: fix not closed handles
Fixes CID 1206651

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27 16:36:29 +02:00
Michael Niedermayer 31f2357fd0 avdevice/qtkit: fix include
Fixes: Ticket 3588

Found-by: jeremyhu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-24 05:12:07 +02:00
Michael Niedermayer 0bfb1e9238 avdevice/jack_audio: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-23 21:13:31 +02:00
Reimar Döffinger 8cbf0827e1 Various small spelling fixes.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-04-22 20:44:31 +02:00
Lukasz Marek de705e52d4 lavd/xv: implement repaint message
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-19 02:18:45 +02:00
Lukasz Marek 9fcdfac894 lavd/xv: add window id param
Device is able to use existing window, that can be a
part of existing GUI - instead of newly created one.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-19 02:18:45 +02:00
Lukasz Marek 5053897b6a lavd/xv: keep aspect ratio
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-19 02:18:45 +02:00
Michael Niedermayer a614f892a6 Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master:
  lavd/pulse_audio_enc: implement pause messages
  lavd/pulse_audio_enc: implement volume messages
  lavd/avdevice: add volume messages
  lavd/pulse_audio_enc: add buffer fullness messages
  lavd/pulse_audio_enc: add nonblocking mode
  lavd/pulse_audio_enc: replace simple API with async API
  lavd/pulse_audio_enc: cosmetics
  lavd/pulse_audio_common: add context helper functions
  lavd/pulse_audio_common: rename variables and enums

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-18 04:57:23 +02:00
Lukasz Marek 35bf7a491e lavd/pulse_audio_enc: implement pause messages
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 02:15:56 +02:00
Lukasz Marek eb9136a7d6 lavd/pulse_audio_enc: implement volume messages
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 02:15:56 +02:00
Lukasz Marek 4c0f36412a lavd/avdevice: add volume messages
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 02:15:56 +02:00
Lukasz Marek cef1180329 lavd/pulse_audio_enc: add buffer fullness messages
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 02:15:50 +02:00
Lukasz Marek bc31a57902 lavd/pulse_audio_enc: add nonblocking mode
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 01:42:18 +02:00
Lukasz Marek eb9dee2d0d lavd/pulse_audio_enc: replace simple API with async API
Async API allows to use full capabilites of PulseAudio.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 01:42:18 +02:00
Lukasz Marek 10627e7e10 lavd/pulse_audio_enc: cosmetics 2014-04-18 01:42:17 +02:00
Lukasz Marek 176046d2b5 lavd/pulse_audio_common: add context helper functions
Functions allow to connect and disconnect from server.
Helpfull to implement utility functions with nested loops.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 01:42:17 +02:00
Lukasz Marek 24e5f5cd3e lavd/pulse_audio_common: rename variables and enums
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-18 01:42:17 +02:00
Matt Oliver 27f184ef40 Fix OpenGL device compilation with msvc gl.h
Reveiwed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-16 18:05:40 +02:00
Lukasz Marek 88c4e5a049 lavd/avdevice: fix buildbreak when included to C++ code
class is reserved keyword in C++ and compilator complains about that variable.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 04:59:35 +02:00
Lukasz Marek defb87eef4 lavd/qtkit: add device category
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-12 19:50:09 +02:00
Lukasz Marek afc898e7ce lavd/fbdev_enc: implement get_device_list
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-12 19:47:58 +02:00
Lukasz Marek c1c3c3611e lavd: no default device unless explicitly set
AVDeviceInfoList was allocated with first device set as default
even though there is no device after allocation.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-12 19:14:57 +02:00
Thilo Borgmann d2417061ef Add AVFoundation input device.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-11 17:51:33 +02:00
Lukasz Marek c02e3dca2d lavd: add control message enums
Adds messages that allows to control (audio) buffer and play/pause state.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-11 15:37:56 +02:00
Lukasz Marek 6db42a2b6b lavd: add device capabilities API
Provides API to query device capabilities.
Each device must implement callbacks to benefit from this API.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-04-11 15:37:43 +02:00
Reimar Döffinger 57d10a28f4 pulseaudio: move NULL check up before dereference.
Fixes CID 1197068.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-04-06 19:38:51 +02:00
Calvin Walton 08909fb56b Add Win32 GDI-based screen grabbing
Based on original code by Christophe Gisquet in 2010, updated to work
with current ffmpeg APIs.

Supports grabbing a single window or an area of the screen, including
support for multiple monitors (Windows does funky stuff with negative
coordinates here).

I've moved most of the configuration to AVOptions; the input file name
is now only the string "desktop", or "title=<windowname>" to select a
single window. The AVOptions are the same as x11grab where possible.

Code has been added to support a "show_region" mode, like x11grab, which
will draw a rectangle on the screen around the area being captured.

Instead of duplicating code for paletted image handling, I make use of
the GDI API's ability to output DIB (BMP) images, which can be run
through ffmpeg's existing BMP decoder.

Signed-off-by: Calvin Walton <calvin.walton@kepstin.ca>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 00:41:45 +02:00
Thilo Borgmann 4654774aaf lavd/qtkit: Support choosing the input device by index or by name.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-02 22:40:32 +02:00
rogerdpack 0cc8a62a78 dshow: fixup some COM objects, based on patches from Don Moir
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-31 23:11:35 +02:00
Thilo Borgmann d5c0036d4a lavd/qtkit: Fix non-constant initializer element for some clang compilers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-31 22:21:07 +02:00
Vadim Kalinsky 234f0bcb0c lavd: Add QTKit input device.
Signed-off-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-30 20:45:07 +02:00
Lukasz Marek 3937b40e87 lavd/pulse_audio_enc: implement get_device_list callback
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-29 09:54:16 +01:00
Lukasz Marek 255cf03af8 lavd/pulse_audio_dec: implement get_device_list callback
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-29 09:54:09 +01:00
Lukasz Marek 85ed32d2ed lavd/pulse_audio_common: add device detecting code
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-29 09:48:56 +01:00
Lukasz Marek 27256e69ab lavd/pulse_audio_enc: implement write_uncoded_frame callback
Provided implementation doesn't support planar formats yet.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-29 09:26:10 +01:00
rogerdpack 773eb74bab dshow: show device name when outputting buffer overflow log message
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-28 00:22:55 +01:00
rogerdpack 10056bc964 dshow: log error and continue if unable to set audio buffer
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25 17:32:39 +01:00
rogerdpack 6abc56e892 dshow: use distinct buffers per stream.
Basically sometimes if you start dropping video packets, you also drop audio packets. Now they each have separate buffers to avoid this unexpected behavior.

Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 03:46:10 +01:00
Michael Niedermayer b28c371567 Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
  lavf/concatdec: reindent after last commit.
  lavf/concatdec: more reliable test for absolute URLs.
  lavf: add subfile protocol.
  lavfi/af_atempo: clear references before returning error.
  lavd/xv: take aspect ratio into account.
  lavc/pthread: copy packet side data.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-08 15:00:36 +01:00
Don Moir 24e2a82f75 Make 32bit RGB dshow input opaque. 2014-03-08 13:46:05 +01:00
Carl Eugen Hoyos 6208bb965d Set codec_tag in dshow device, needed to distinguish between YUV and YVU.
Fixes ticket #3447.
2014-03-08 13:42:47 +01:00
Nicolas George c37bbe54f4 lavd/xv: take aspect ratio into account. 2014-03-08 12:29:32 +01:00
James Almer 99b4da73c8 lavd/Makefile: Add fbdev_common.h to SKIPHEADERS
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 15:42:15 +01:00
Lukasz Marek 2475fdbd04 lavd/avdevice: always free detected devices on error
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-06 00:34:50 +01:00
Andrey Myznikov 9deecdf85f Fix pthread-related compile errors in iec61883.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-05 22:19:33 +01:00
Lukasz Marek 06fed44051 lavd/avdevice: add device iterators
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:39:07 +01:00
Lukasz Marek f607767d93 lavd: add categories to device implementations
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:34:46 +01:00
Carl Eugen Hoyos 5642dd41cc Add more Bayer colour spaces to the video4linux2 device wrapper. 2014-02-23 13:42:41 +01:00
Peter Ross dd5abb0bac avdevice/v4l2: add V4L2_PIX_FMT_SRGGB8 2014-02-23 13:42:41 +01:00
Carl Eugen Hoyos a88dee8eea Add decklink_enc.h to SKIPHEADERS.
Fixes make checkheaders without decklink headers.
2014-02-19 19:55:14 +01:00
Lukasz Marek 81c3f81d6f lavd: add list devices API
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-16 20:07:08 +01:00
Lukasz Marek d3cf9b24cf lavd/opengl_enc_shaders: fix gray* shader
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-16 19:56:53 +01:00
Lukasz Marek 1e5cb426c6 lavd/avdevice: add param to create window buffer message
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-14 05:13:33 +01:00
Lukasz Marek db4a704482 lavd/opengl_enc: implement uncoded frame callback
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-13 23:33:05 +01:00
Lukasz Marek db403023c0 lavd/opengl_enc: add gray8/16 formats
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-13 23:33:05 +01:00
Nicolas George edc7e67669 lavf/lavd: version bump and APIchanges for uncoded frames. 2014-02-11 10:34:32 +01:00
Nicolas George d201a0f0f8 lavd/xv: preliminary support of uncoded frame. 2014-02-11 10:29:02 +01:00
Nicolas George 62106fcc23 lavd/alsa: preliminary support of uncoded frame. 2014-02-11 10:29:02 +01:00
Ramiro Polla 5965adeb20 lavd: add decklink output device
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09 17:15:19 +01:00
Lukasz Marek 20fe316e47 lavd/sdl: reset context variables after destroy
SDL device reports double free or hangs when quiting.
Reseting variables solves the issue.

The issue is caused by double call of write_trailer callback.
It is called for the first time in write_packet when quit flag is set.
Second call comes from ffmpeg.c or may come from other client application.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Lukasz Marek 18c3313e65 lavd/sdl: make waiting spurious wakeup aware
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 12:27:00 +01:00
Lukasz Marek c81a9d13f4 lavd/opengl_enc: fix parentheses in if condition
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 22:14:34 +01:00
Lukasz Marek 5059d8dfe3 lavd/opengl_enc: remove inlines
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:26:02 +01:00
Lukasz Marek 69b19f2642 lavd/opengl_enc: fix window caption
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:23:25 +01:00
Lukasz Marek 1fb1ddf647 lavd/opengl_enc: simplify opengl_load_procedures usage
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:23:25 +01:00
Lukasz Marek c8275331ba lavd/opengl_enc: factorize deinit_context function
This commit also fixes opengl deinitialization.
Program and shaders where not deleted.
Could impact MacOS implementation based on SDL window.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:23:25 +01:00
Lukasz Marek 4afe1c1178 lavd/opengl_enc: factorize create/release window functions
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:23:25 +01:00
Lukasz Marek c9074b992e lavd/opengl_enc: rename GL_RED_COMPONENT define
Rename GL_RED_COMPONENT into FF_GL_RED_COMPONENT
to explicity mark it is internal define, not OpenGL API.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 02:23:08 +01:00
Lukasz Marek c72f916c15 lavd/opengl_enc: create format description table
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 01:03:45 +01:00
Lukasz Marek ffe46e5d13 lavd/opengl_enc_shaders: make shaders code static and const
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-02 00:50:44 +01:00
Michael Niedermayer 0997c2504b avdevice/v4l2: only use average frame rate if set
It might be unset on some platforms with some drivers and some input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 00:15:11 +01:00
Michael Niedermayer 4aa4533ee8 avdevice/v4l2: only use frame period from v4l2 if valid
There is evidence that some drivers do not set a valid value

See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 00:13:01 +01:00
Lukasz Marek ded6b3af41 lavd: add opengl device
It can render to OpenGL context provided by application or into SDL window

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-01-27 15:18:18 +01:00
Lukasz Marek 102bd64168 lavd: add avdevice_dev_to_app_control_message API
New API allows to send messages from devices to application.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-01-27 15:18:17 +01:00
Lukasz Marek 7151411b9c lavd: add avdevice_app_to_dev_control_message API
New API allows to send messages from application to devices.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-01-27 15:18:17 +01:00
Federico Simoncelli b53d6ce3fd pulse: get latency only when needed
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 18:44:18 +01:00
Federico Simoncelli b13d6c837f pulse: set time_base as multiple of sample_rate
The stream time_base has been changed to be a multiple of the
device sample_rate. Now the frame_duration computation is simpler
and a message will warn about problematic frame_size values.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 18:44:06 +01:00
Federico Simoncelli b1ad931233 v4l2: setting device parameters early
Setting the v4l2 device parameters may influence video properties
such as width, height and pixel format.
This patch moves v4l2_set_parameters to be executed before fetching
the video properties, avoiding errors such as (pal vs ntsc):

 The v4l2 frame is 829440 bytes, but 691200 bytes are expected

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 14:02:06 +01:00
Nicolas George fde219cfa8 lavd/xv: report if no adaptor present. 2013-12-29 19:51:42 +01:00
Michael Niedermayer 25b243759c Merge commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0'
* commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0':
  avutil: Move library version related macros to version.h

Conflicts:
	libavcodec/version.h
	libavresample/version.h
	libavutil/avutil.h
	libavutil/utils.c

See: 183117fed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 12:01:23 +01:00
Diego Biurrun b83d1ee3b4 avutil: Move library version related macros to version.h
This is a more sensible place for these macros.
2013-12-26 19:05:22 +01:00
Stefano Sabatini 3b8c7da7a3 lavu,lavfi,lavd: do not hardcode AV_PIX_FMT_NB value when setting pixel format max value
The constant may change in libavutil but the library may be compiled
against an older version, thus rejecting a value which is otherwise
supported by the new libavutil.

INT_MAX is used here to denote the max allowed value for a pixel format.

The opt-test code is changed to provide a valid reference example.
2013-12-26 11:35:27 +01:00
Michael Niedermayer 8e702bd3a8 Merge commit 'd64341e498fa46c6cf4c23d408177d7489559654'
* commit 'd64341e498fa46c6cf4c23d408177d7489559654':
  configure: Prefix libc-related variables with "libc_"

Conflicts:
	libavdevice/Makefile
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 20:52:14 +01:00
Diego Biurrun d64341e498 configure: Prefix libc-related variables with "libc_"
Simplifies host/target libc detection splitting.
2013-12-09 11:47:43 +01:00
Lukasz Marek fa3bfeb1c1 lavd/fbdev_enc: add default device
Use device specified by environment variable FRAMEBUFFER or /dev/fb0 as default.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-12-06 19:15:47 +01:00
James Almer 56572787ae Add Windows resource file support for shared libraries
Originally written by James Almer <jamrial@gmail.com>

With the following contributions by Timothy Gu <timothygu99@gmail.com>

* Use descriptions of libraries from the pkg-config file generation function
* Use "FFmpeg Project" as CompanyName (suggested by Alexander Strasser)
* Use "FFmpeg" for ProductName as MSDN says "name of the product with which the
  file is distributed" [1].
* Use FFmpeg's version (N-xxxxx-gxxxxxxx) for ProductVersion per MSDN [1].
* Only build the .rc files when --enable-small is not enabled.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-05 23:42:07 +01:00
Anton Khirnov 089fac77a6 alsa-audio-dec: explicitly cast the delay to a signed int64
Otherwise the expression will be evaluated as unsigned, which will break
when the result should be negative.
CC:libav-stable@libav.org
2013-12-03 12:04:26 +01:00
Lukasz Marek 3aaa50a997 lavd/pulse_audio_enc: add buffer size control options
Add options to control the size of the PulseAudio buffer.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-11-27 10:12:54 +01:00
Stefano Sabatini 7043311969 lavd/sdl: add delay when no events are found in the event queue
Avoid busy loops and decrease CPU usage.

Suggested-By: Roger Pack
2013-11-26 18:38:48 +01:00
Stefano Sabatini 35349bbb97 lavd/sdl: apply misc cosmetics to options 2013-11-26 18:15:58 +01:00
Stefano Sabatini b23dea27fd lavd/sdl: allow to change window size 2013-11-26 18:15:24 +01:00
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