Commit Graph

425 Commits

Author SHA1 Message Date
Diego Biurrun 2f806622e1 bktr: Use memset(0) instead of zero initialization for struct sigaction
sigaction is not defined in standards as a struct starting with another
struct. Some *BSD variants do however, resulting in a warning from the
zero initialization, which this change eliminates.

This partially reverts a92be9b856.
2016-10-22 17:34:55 +02:00
Anton Khirnov 3a165c187d v4l2: convert to stdatomic 2016-10-02 19:34:57 +02:00
Josh de Kock bc7399934d libdc1394: Distinguish between enumeration errors and no cameras found
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-09-15 17:22:38 +02:00
Diego Biurrun 93fed46a92 timefilter: test: Drop some disabled debug cruft 2016-08-17 12:16:42 +02:00
Diego Biurrun 5ed4644d6d x11grab: Rename internal component to "xcbgrab" 2016-07-29 19:03:10 +02:00
Diego Biurrun 4fef648d10 Remove the legacy X11 screen grabber
The XCB screen grabber is a drop-in replacement and not under GPL.
2016-07-29 19:03:10 +02:00
Vittorio Giovara 5d0f85f1b2 libdc1394: Fill in packet data directly
Drop the packet embedded in the context.
2016-07-20 17:13:10 +02:00
Vittorio Giovara 0b1bd1b205 lavd: Drop unneeded av_init_packet()s
The input packet is already unref'd by the calling function.
2016-07-13 18:20:27 -04:00
Diego Biurrun a2ddfadc2d avdevice: Ignore timefilter test program 2016-06-14 11:14:06 +02:00
Diego Biurrun 535a742c26 build: Change structure of the linker version script templates
Split version files into one line per symbol/directive to allow compatibility
with the Solaris linker without preprocessing and eliminate $ from version file
templates to simplify the postprocessing shell command.
2016-05-29 16:43:11 +02:00
Diego Biurrun 11de006bab Combine deprecation guards where appropriate
Some code blocks use multiple bits of deprecated API.
2016-05-13 15:14:30 +02:00
Diego Biurrun a6a750c7ef tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00
Diego Biurrun b7e64fba7f Reduce the scope of some variables
This avoids unused variable warnings after the next version bump.
Also drop a trace level av_log() call that is in the way.
2016-05-11 12:21:25 +02:00
Diego Biurrun 5afb94c817 Mark read-only tables as static 2016-05-05 10:48:34 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Diego Biurrun d12b5b2f13 build: Split test programs off into separate files
This avoids spurious library rebuilds when only the test program
code is changed and simplifies the build system.
2016-04-07 16:14:42 +02:00
Diego Biurrun 01621202aa build: miscellaneous cosmetics
Restore alphabetical order in lists, break overly long lines, do some
prettyprinting, add some explanatory section comments, group parts
together that belong together logically.
2016-04-07 15:26:08 +02:00
Diego Biurrun 439929859a testprogs: Clean up #includes 2016-03-24 19:17:23 +01:00
Diego Biurrun 30e9ef21ce timefilter-test: Only compile timefilter-test if JACK is enabled 2016-03-23 09:35:41 +01:00
Anton Khirnov 9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Alexandre Lision 4f979418c7 avfoundation: Simple capture
Originally based on the capture written by
Thilo Borgmann <thilo.borgmann@mail.de>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-26 10:55:28 +01:00
Luca Barbato ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Vittorio Giovara f890677d05 Replace any remaining avpicture function with imgutils
avpicture_get_size() -> av_image_get_buffer_size()

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-21 11:59:59 +02:00
Vittorio Giovara e88103a7f9 Bump major versions of all libraries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-28 16:04:28 +02:00
Vittorio Giovara 01bcc2d5c2 lavc: Drop deprecated destruct_packet related functions
Deprecated in 10/2012.
2015-08-28 16:01:16 +02:00
Vittorio Giovara 059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara 40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Dan Flett 87f98a2b9d fbdev: Support the RGB565 colour space.
Tested on a Raspberry Pi.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-11 10:15:59 +03:00
Luca Barbato c8b8271379 xcbgrab: Explicitly include xcb/shape.h
Found-By: Cheristheus
2015-07-06 20:00:34 +02:00
Vittorio Giovara 0f87f9b4fc lavd: Add library identifier 2015-07-01 00:13:58 +01:00
Vittorio Giovara bc1eace1b3 jack: Check memory allocation
CC: libav-stable@libav.org
Bug-Id: CID 1292520
2015-06-08 13:03:27 +01:00
Nicolas George 01fdfa51ac xcbgrab: Accept geometries matching the screen size
Introduced in e8c4db0d4d.
2015-05-06 12:25:32 +02:00
Luca Barbato e8c4db0d4d xcbgrab: Validate the capture area
And notify why the capture is impossible.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-30 14:10:13 +02:00
Luca Barbato 82a10225f8 xcbgrab: Do not assume the non shm image data is always available
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-30 14:10:13 +02:00
Federico Tomassetti 386e2755aa jack: Check memory allocation
Bug-Id: CID 1265785
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 23:50:48 +01:00
Vittorio Giovara 1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Michael Kostylev 7a9b764c07 libdc1394: Unbreak build after c201069fa 2015-04-11 10:57:18 +02:00
Martin Storsjö 4f373a5111 vfwcap: Unbreak building after c201069fa
These headers can't be included in any arbitrary order.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-11 00:15:47 +03:00
Diego Biurrun 8d26c193fb avdevice: Apply a more consistent file naming scheme 2015-04-09 16:40:12 +02:00
Diego Biurrun c201069fac avdevice: Add missing header for NULL_IF_CONFIG_SMALL
Also reshuffle headers into canonical order where appropriate.
2015-04-09 16:40:12 +02:00
Vittorio Giovara edca1dd552 xcbgrab: Check av_strdup() allocation
Bug-Id: CID 1274038
2015-03-12 15:29:59 +00:00
Luca Barbato 5f5b78aca3 xcbgrab: Free the host string after checking the connection
Prevent an use after free in the error message.

Bug-Id: CID 1274040
CC: libav-stable@libav.org
2015-03-08 14:39:01 +01:00
Luca Barbato 9a26ba9713 v4l2: Add support for h264 2015-03-02 12:07:59 +01:00
Luca Barbato 619d5e7db8 v4l2: Use the codec descriptor facility
The encoder or decoder might be disabled but the format would be
supported for at least remuxing.
2015-03-02 11:27:57 +01:00
Christian Hujer 802987f8c7 x11grab: Unbreak building
The correct macro is DEC not D. Broken in
b31328d008

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-28 21:51:24 +01:00
Luca Barbato 85b3b1c4ba xcbgrab: Unbreak parsing filename options
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:31:20 +01:00
Luca Barbato b31328d008 xcbgrab: Provide better names for the y and x option
Incidentally `-y` also collides with avconv global options.

Update x11grab to match and document the option.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:31:20 +01:00
Himangi Saraogi 81ef46020f bktr: Use av_strerror and propagate error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-02-15 13:42:31 -08:00
Daniel Moran 51ca3cb604 xcbgrab: Use the correct geometry for the region highlight
The feature is implemented using a transparent window and drawing
inside it a rectangle filling the whole window to highlight it.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-15 18:20:54 +01:00
Luca Barbato d40815a982 xcbgrab: Correctly make shm optional
The segment field in the struct has to be conditionally build
as well.
2015-02-15 18:20:54 +01:00