Commit Graph

1386 Commits

Author SHA1 Message Date
Lou Logan 98e18910a3 avdevice/v4l2enc: add video4linux2 name alias
Makes the v4l2 outdev name consistent with the v4l2 indev name.

Signed-off-by: Lou Logan <lou@lrcd.com>
2018-06-18 16:26:23 -08:00
Jon Morley 0946c0ec17 avdevice/decklink_dec: capture timecode to metadata when requested
If the user provides a valid timecode_format look for timecode of that
format in the capture and if found store it on the video avstream's
metadata.

Slightly modified by Marton Balint to capture per-frame timecode as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-13 00:15:06 +02:00
Jon Morley fb480a1f1e avdevice/decklink_common: Move DECKLINK_* string functions into header
This allows other decklink source access to these cross-platform
convenience functions.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-13 00:09:48 +02:00
Marton Balint ba8a1d1618 avdevice/decklink_dec: use std::atomic for decklink_input_callback refcounting
Also remove the callback from the context, and add proper error handling.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-13 00:09:48 +02:00
Marton Balint 643123b29d avdevice/decklink_dec: use a custom memory allocator
The default memory allocator is limited in the max number of frames available,
and therefore caused frame drops if the frames were not freed fast enough.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-13 00:09:48 +02:00
Martin Vignali 411f7141a3 avdevice/sdl2 : add option to define if the window quit action is available 2018-05-19 14:55:15 +02:00
Martin Vignali 644130bcaa avdevice/sdl2output : fix setting window_size 2018-05-19 14:55:11 +02:00
Anton Leontiev 9481802539 lavd/v4l2: Add ARGB and XRGB packed pixel formats
Formats ARGB32, XRGB32, ABGR32, and XBGR32 were added to V4L2 instead
of ill-defined deprecated RGB32/BGR32 pixel formats.

When pixel format is not specified explicitly FFmpeg tries formats in
order in which they are stored in the table. Therefore formats are
sorted as follows: BGR is preferred over RGB and XBGR is preferred
over ARGB, because it could give better performance by ignoring alpha
component.
2018-05-10 22:40:57 +02:00
Marton Balint 649087fa83 avdevice/decklink_dec: unref packets on avpacket_queue_put error
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 22:44:58 +02:00
Marton Balint 75d1529c6e avdevice/decklink_dec: do not copy video data
Create a buffer from the data instead and use the buffer destructor to free the
DeckLink frame. This avoids a memcpy of the frame data.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 22:44:58 +02:00
Michael Niedermayer 13b77af2f0 avdevice/android_camera: Fix AVClass.version
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 23:44:33 +02:00
James Almer 5079e96bcc avdevice/iec61883: free the private context at the end
Fixes part of ticket #7146.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-18 22:45:09 -03:00
James Almer b8629654c6 avdevice/iec61883: return reference counted packets
Fixes part of ticket #7146, dealing with leaks of packet data since
commit 87c8812270.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-18 22:45:09 -03:00
Marton Balint 768c0774d8 avdevice/decklink_commmon: enhance error messages when iterator creation fails
Show a more useful error message which specifies the required driver version
for the build, and use the correct context in the error message for WIN32.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-18 22:20:17 +02:00
Carl Eugen Hoyos 9d6c168764 lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size().
Fixes the following warnings:
libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type
libavdevice/vfwcap.c:331:59: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type

Reported-by: Reino Wijnsma
2018-04-18 20:26:44 +02:00
Michael Niedermayer 3c1ecb057d Bump minor versions after release/4.0 branching
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer 7e3a070d9a Bump minor versions for branching release/4.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Josh de Kock 92fe0bf1e8 lavfi,lavd: add gitignore for generated static component lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-05 22:08:53 +01:00
James Almer 38fa61b947 avdevice/decklink_dec: use av_packet_make_refcounted to ensure packets are ref counted
Partially reverts commit e91f0c4f8b, simplifying code.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-02 00:36:24 -03:00
Josh de Kock 89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
Josh de Kock 42d26145e9 lavf: move avpriv function definition to internal.h
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 02:16:14 +01:00
Josh de Kock 65452bcd64 lavd: remove linked lists
Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:31 +01:00
Josh de Kock d8ae40611b Revert "lavd: add new API for iterating input and output devices"
This reverts commit 0fd475704e.

Revert "lavd: fix iterating of input and output devices"

This reverts commit ce1d77a5e7.

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:31 +01:00
Jun Zhao ac6e27d74f kmsgrab: add category for kmsgrab
Makes kmsgrab visible in "ffmpeg -devices".

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-26 22:39:12 +01:00
Marton Balint 87455b78cc avdevice/decklink: fix leak when listing devices and there is no memory
Fixes Coverity CID 1419523.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-03-24 20:55:46 +01:00
Felix Matouschek ce1d77a5e7 lavd: fix iterating of input and output devices
In the previous implementation the first input or output device
was skipped when device_next was called with prev = NULL

Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-03-18 17:45:20 +01:00
Felix Matouschek 5ac3a309fd avdevice: add android_camera indev
This commit adds an indev for Android devices on API level 24+ which
uses the Android NDK Camera2 API to capture video from builtin cameras

Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-22 00:29:27 +01:00
Michael Niedermayer 75027066d8 avdevice/decklink_dec: Fix ;;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-15 13:48:52 +01:00
Ray Tiley c837cd3d4d avdevice/decklink_dec: extract NTSC VANC
This changes how NTSC VANC is extracted from the buffer. In NTSC the vanc data
is interleaved between luma and chroma, and not just the luma as in high
definition resolutions.

In my testing this allows a decklink card encoding valid NTSC closed
captions to pass the caption data to the x264 encoder.

Updated with reviews from Devin Heitmueller and Marton Balint.

Signed-off-by: Ray Tiley <raytiley@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-02-13 00:13:21 +01:00
James Almer 36c85d6e77 api: add missing version bumps and APIChanges entries
avcodec bump missed in 7e8eba2d87
avformat bump missed in ff46124b0d and
0694d87024
avdevice bump missed in 0fd475704e

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-06 23:43:01 -03:00
Josh de Kock 0fd475704e lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in
libavformat
2018-02-06 18:57:42 +00:00
Marton Balint 4bb0409820 avdevice: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Devin Heitmueller b5b4868504 avdevice/decklink: Fix compilation of module on OSX
Clang applies the missing-prototypes warning on C++ files, whereas
gcc only applies it to C.  As a result, the decklink_common.cpp file
fails to build because of missing prototypes in DecklinkDispatch.cpp
(which is #included by decklink_common.cpp).

We don't want to change the actual Blackmagic SDK sources, so
suppress the warning just for that one #include.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Devin Heitmueller 5409f065f2 avdevice/decklink: Suppress warning about misuse of struct instead of class
When building with Clang, the following warning is shown:

warning: struct 'IDeckLinkVideoFrame' was previously declared as a
class [-Wmismatched-tags]

The function incorrectly casts IDeckLinkVideoFrame as a struct
instead of a class pointer.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Vishwanath Dixit fc93eca126 avdevice/decklink: addition of absolute wallclock option for pts source
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:27 +01:00
Vishwanath Dixit dfa2523bdd avdevice/decklink: addition of PTS_SRC_NB in enum DecklinkPtsSource
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Vishwanath Dixit 7c27bbd590 avdevice/decklink: addition of copyts option
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Harald Gaechter 43e510d668 avdevice/gdigrab: Fix screen size and mouse position calculations on hi-DPI screens
Signed-off-by: Harald Gaechter <harald.gaechter@wolfvision.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-12 12:31:55 +01:00
Carl Eugen Hoyos b7324950c0 lavd/alsa: Double maximum alsa buffer size.
Fixes recording from ATI Wonder 600 USB adapter, regression since e35c674d.

Reported and analyzed by: Marco Paolieri, paolieri at gmail
2017-11-27 14:05:28 +01:00
Karthick J e8e9306b4f avdevice/decklink_dec: autodetect the video input format
When -format_code is not specified autodetection will happen.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-22 00:08:35 +01:00
Karthick J aa7b0329ff avdevice/decklink: refactor ff_decklink_set_format function
This is done to enable input format autodetection in decklink_dec.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-21 22:55:49 +01:00
James Almer fdd03d2d79 Merge commit 'b586903ae1b89e2d8b99c79f33cabe9b3ca03784'
* commit 'b586903ae1b89e2d8b99c79f33cabe9b3ca03784':
  build: Drop redundant check for soundcard.h

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 16:19:50 -03:00
James Almer bf7ae32a08 avdevice/decklink_dec: make some function static
Reviewed-by: Aaron Levinson <alevinsn_dev@levland.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-09 15:27:26 -03:00
James Almer da71351dd3 avdevice/libndi_newtek_dec: remove extra bracket
Fixes compilation broken in 2245476e5c

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-30 11:48:14 -03:00
James Almer 5c819f433e avdevice/decklink_dec: remove extra bracket
Fixes compilation broken in 2245476e5c

Fixes ticket #6791

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-30 11:47:51 -03:00
James Almer 2245476e5c avdevice: remove usage of deprecated setter and getter functions
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 14:42:48 -03:00
James Almer 99ba85a0e2 Merge commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436'
* commit 'f5950b8fd61ec85e0ad8790bea56b37ceea19436':
  lavfi: Drop unused and empty header file

Merged-by: James Almer <jamrial@gmail.com>
2017-10-26 16:46:11 -03:00
James Almer 6821b693ec Merge commit '5a969f64b9cf40bad923c73b66c3031b0018e848'
* commit '5a969f64b9cf40bad923c73b66c3031b0018e848':
  jack: Drop support for old (2012) JACK versions

Merged-by: James Almer <jamrial@gmail.com>
2017-10-24 19:17:02 -03:00
Carl Eugen Hoyos 535117d1f6 lavd/lavfi: Constify two variables.
Fixes the following warnings:
libavdevice/lavfi.c:136:16: warning: assignment discards 'const' qualifier from pointer target type
libavdevice/lavfi.c:137:17: warning: assignment discards 'const' qualifier from pointer target type
2017-10-21 20:22:52 +02:00
James Almer 69b5ce64d2 Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5'
* commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5':
  Bump major versions of all libraries

A few API deprecated ~2 years ago or more are also postponed here for
varying reasons.

FF_API_LOWRES:
Since this functionality depends on AVStream->codec, i figure the two can
be removed at the same time in the next bump or so.

FF_API_AVCTX_TIMEBASE:
Couldn't get this one to work. Not just libavcodec but apparently also
libavformat and ffmpeg.c expect AVCodecContext->time_base to be set for
decoding. Upon removal some tests report a different generic stream time
base (like 1/25), and others lose packet duration values. I guess it's
somehow tied to the AVStream->codec clusterfuck.
It can be dealt with alongside FF_API_LAVF_AVCTX in the next bump.

FF_API_OLD_FILTER_OPTS_ERROR:
This one is meant to remain after FF_API_OLD_FILTER_OPTS is removed.
Its purpose is displaying the corrected command line using the new syntax
as a suggestion as part of the error message.

Merged-by: James Almer <jamrial@gmail.com>
2017-10-21 14:57:53 -03:00