Commit Graph

1466 Commits

Author SHA1 Message Date
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
Dave Rice 89cc48551b avdevice/decklink_dec: 32 bit audio support
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-18 21:45:24 +02:00
Michael Niedermayer 80154b1b3a Bump version for master after 3.4 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 02:45:37 +02:00
Michael Niedermayer e1de9eab3a Bump minor versions for branching 3.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 01:23:47 +02:00
Diego Biurrun b586903ae1 build: Drop redundant check for soundcard.h
It should be sys/soundcard.h nowadays.
2017-10-10 23:20:17 +02:00
Devin Heitmueller 77f7d710e0 libavdevice/decklink: add support for 10-bit output for Decklink SDI
Can be tested via the following command:

./ffmpeg -i foo.ts -f decklink -vcodec v210 'DeckLink Duo (1)'

Note that the 8-bit support works as it did before, and setting
the pix_fmt isn't required for 10-bit mode.  The code defaults to
operating in 8-bit mode when no vcodec is specified, for backward
compatibility.

Updated to reflect feedback from Marton Balint <cus@passwd.hu>

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-10 20:07:27 +02:00
Devin Heitmueller 278588cd0b libavdevice/decklink: add support for -sources and -sinks arguments
Add support for enumerating the sources/sinks via the ffmpeg
command line options, as opposed to having to create a real pipeline
and use the "-list_devices" option which does exit() after dumping
out the options.

Note that this patch preserves the existing "-list_devices" option,
but now shares common code for the actual enumeration.

Updated to reflect feedback from Marton Balint <cus@passwd.hu>.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-10 20:07:25 +02:00
Carl Eugen Hoyos f49c129dd4 lavd/decklink_dec: Do not claim to output transparency information. 2017-10-08 22:58:33 +02:00
Marton Balint 7d141e2cac avdevice/decklink_dec: fix extracting luma
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-06 20:17:00 +02:00
Devin Heitmueller b6782a192e avdevice/decklink: Fix segfault when running -list_devices on OSX
The string is allocated with CFStringGetCString but was being
deallocated with free(), which would intermittently result in
a segmentation fault.  Use the correct function for freeing the
allocated CFString.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-04 22:48:23 +02:00
Marton Balint 3dc01223ef avdevice/decklink_dec: fix multipacket op47 decoding
It was disabled by mistake.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-10-04 22:44:42 +02:00
James Almer e91f0c4f8b avdevice/decklink_dec: remove av_dup_packet() usage
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-02 15:12:01 -03:00
James Almer 0c1ffd0aa5 avdevice/decklink_dec: use av_packet_add_side_data()
It uses the existing buffer instead of allocating a new one.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-02 15:04:40 -03:00
Karthick J 9e271e3fa3 avdevice/decklink_dec: Used av_parity instead of duplicated function 2017-10-01 18:27:21 +02:00
Karthick J b6cf66ae1c avdevice/decklink_dec: Added Closed caption decode from VANC
Signed-off-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-28 21:06:12 +02:00
Karthick J a8755785d7 avdevice/decklink_dec: Extraction of luma from V210 VANC modularized
In preparation to support multiple VANC data decode

Signed-off-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-28 21:06:03 +02:00
Karthick J e6cdf30fb4 avdevice/decklink_dec: Added VANC search for all resolutions
In preparation to make VANC decode modular, to support multiple other VANC data.

Signed-off-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-28 21:06:03 +02:00
Gildas Fargeas cb8b729180 avdevice/decklink_dec: add support for more pixel formats
The decklink input pixel format can now be specified with the 'raw_format'
option. The -bm_v210 option is now deprecated.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-09-28 21:06:03 +02:00
Carl Eugen Hoyos dc522cfa07 lavf/version: Bump minor after dv1394 removal. 2017-09-27 19:48:26 +02:00
Josh de Kock 56d2154b72
lavd: remove deprecated dv1394 device
Support for this device has been removed in kernel since v2.6.37. dv1394 has been superseded by libiec61883 which is functionally equivalent.

Signed-off-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-09-27 17:04:56 +01:00
Jaroslav Beran 00a1e1337f libavdevice/v4l2: fix invalid access to struct v4l2_buffer
In case we are short of queued buffers, at first v4l2_buffer was enqueued to kernel so it's not owned by
user-space anymore. After that it's timestamp field was read, but it might be overwritten by driver at
that moment. It resulted in invalid timestamp sometimes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 02:33:48 +02:00
Carl Eugen Hoyos 724cf83f10 Remove some unneeded casts of bit_rate. 2017-09-22 01:33:22 +02:00
Carl Eugen Hoyos 5cb70381d9 lavd/kmsgrab: Remove the mapping for AV_PIX_FMT_RGB8.
The definitions are different: 3:3:2 vs 2:3:3.
2017-09-20 00:56:29 +02:00
Carl Eugen Hoyos f952edaa73 kmsgrab: Add more DRM plane formats 2017-09-19 22:47:06 +01:00
Mark Thompson 9f9625ea80 kmsgrab: Remove multiple-plane formats
The planes are unlikely to be contiguous, assuming they are results in
very broken output.  (Tested with NV12/NV16 on Rockchip.)
2017-09-19 22:47:03 +01:00
Mark Thompson 22afa87a8e kmsgrab: Fix DRM format definitions
All DRM formats are defined in terms of little-endian words, so RGB formats
like XRGB actually have the elements in the opposite order order in memory
to the order they are in the name.

This does not affect YUYV and similar YUV 4:2:2 formats, which are in the
expected order.
2017-09-19 22:47:01 +01:00
Jun Zhao 462568185b kmsgrab: Fix build failure with old libdrm
DRM_FORMAT_R8 was added in libdrm 2.4.68.
DRM_FORMAT_R16 was added in libdrm 2.4.82.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-09-14 22:40:09 +01:00
Mark Thompson 16b44d9ab9 lavd/kmsgrab: Fix packet flag setting
Found-by: James Almer <jamrial@gmail.com>
2017-09-14 09:14:36 +01:00
Mark Thompson 52194f0bcb lavd: Add KMS screen grabber 2017-09-13 22:31:05 +01:00
Clément Bœsch ca7dc3ee90 lavd: drop QTKit indev
QTKit has been deprecated in favor of AVFoundation for years, and we
have an avfoundation input device.

See https://developer.apple.com/documentation/qtkit
2017-09-04 17:19:58 +02:00
Clément Bœsch b4b1285fa1 lavd: drop disabled v4l code
This code is disabled since 2012. V4L1 was dropped from the kernel more
than 10 years ago.
2017-09-03 09:55:30 +02:00
Clément Bœsch e090e750ba build: make sndio part of the autodetected libraries
sndio is already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-sndio is
specified.
2017-09-02 16:14:15 +02:00
Clément Bœsch b447629093 build: make alsa part of the autodetected libraries
alsa libs are already autodetected, this commit makes sure
--disable-autodetect actually disable it unless --enable-alsa is
specified.
2017-09-02 16:14:15 +02:00
Clément Bœsch 353c2e384c build: replace use of HAVE_SDL2 with existing CONFIG_SDL2
There is no need for duplication.
2017-09-02 16:14:15 +02:00
Maksym Veremeyenko 2634927fe3 lavd: implement NewTek NDI input/output device support
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-27 18:07:50 +02:00
pkviet 84ee6512ed avdevice/decklink_enc: enable 16 output channel
Decklink devices can output 2, 8 or 16 audio channels along video.
The code was limited to 2 or 8 channels. The commit enables 16 audio
channels (relevant for SDI outputs).

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-27 17:55:43 +02:00
Marton Balint 76a8b5e7ad avdevice/decklink_dec: fix signed and unsigned comparison warning
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-27 17:55:43 +02:00
Ravindra f3913dcc06 libavdevice/decklink: configurablity to set max queue size
Signed-off-by: Ravindra Patagar <rpatagar@akamai.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-22 22:32:29 +02:00
Carl Eugen Hoyos 285c015f10 lavd/libdc1394: Do not crash if dc1394_camera_new() fails.
Fixes Ubuntu bug 1710849
2017-08-18 19:20:15 +02:00
Marton Balint e433497160 avdevice/decklink_dec: set field order via codecpar
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-30 14:00:26 +02:00
James Almer 3cd616a0c9 avdevice: make ff_reverse available on shared builds
Should fix compilation failures introduced by 9b93795890.
2017-07-20 00:33:29 -03:00
Marton Balint 9b93795890 avdevice/decklink_dec: add support for receiving op47 teletext
v2:
- use uint16_t instead of int to store 10-bit ancillary data
- fix ancillary line numbers for 1080p
- some comments and clarifications as requested by Aaron Levinson

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-18 18:28:57 +02:00
Marton Balint cc0916bfc2 avdevice/decklink_dec: add support for decoding teletext from 10bit ancillary data
This also add supports for 4K DeckLink cards because they always output the
ancillary data in 10-bit.

v2:
- only try teletext decoding for 576i PAL mode
- some comments as requested by Aaron Levinson

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-18 18:28:57 +02:00
Hendrik Leppkes 9fb293cfd8 Use AVOnce as a static variable consistently
Using AVOnce as a stack variable makes no sense as the state is lost
when the function exits.

This fixes repeated calls to av(filter/device)_register_all
2017-05-22 12:36:32 +02:00
Aaron Levinson 7f7ee86d5a avdevice/decklink: fix MSVC build issues
Purpose: Made minor changes to get the decklink avdevice code to build
using Visual C++.

Notes: Made changes to configure per Hendrik Leppkes's review of first
and second versions of patch.  Also made slight alterations per Marton
Balint's reviews.

Comments:

-- configure: Added if enabled decklink section and setting
   decklink_indev_extralibs and decklink_outdev_extralibs here for
   both mingw and Windows.  Also eliminated the setting of these
   variables in the mingw section earlier in the file.

-- libavdevice/decklink_common.cpp: Switched the order of the include
   of libavformat/internal.h to workaround build issues with Visual
   C++.  See comment in file for more details.

-- libavdevice/decklink_dec.cpp:
a) Rearranged the include of libavformat/internal.h (for reasons as
   described above).
b) Made slight alteration to an argument for call to av_rescale_q() to
   workaround a compiler error with Visual C++.  This appears to only
   be an issue when building C++ files with Visual C++.  See comment
   in code for more details.

-- libavdevice/decklink_enc.cpp: Rearranged the include of
   libavformat/internal.h (for reasons as described above).

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-05-08 22:43:35 +02:00
Takayuki 'January June' Suwa ea93b74074 avdevice/alsa: wait until playback buffers are drained before closing
This fixes early abort on ALSA playback

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-06 23:54:26 +02:00
James Almer 6fdd35a312 Merge commit '92db5083077a8b0f8e1050507671b456fd155125'
* commit '92db5083077a8b0f8e1050507671b456fd155125':
  build: Generate pkg-config files from Make and not from configure
  build: Store library version numbers in .version files

Includes cherry-picked commits 8a34f36593 and
ee164727dd to fix issues.

Changes were also made to retain support for raise_major and build_suffix.

Reviewed-by: ubitux
Merged-by: James Almer <jamrial@gmail.com>
2017-05-04 19:59:30 -03:00
Clément Bœsch 3f17751eeb Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'
* commit '11a9320de54759340531177c9f2b1e31e6112cc2':
  build: Move build-system-related helper files to a separate subdirectory

"ffbuild" directory name is used instead of "avbuild".

Merged-by: Clément Bœsch <u@pkh.me>
2017-05-03 16:49:12 +02:00
Vittorio Giovara 85c2bf9d2c avfoundation: update to use AVCodecParameters 2017-04-26 11:47:31 -04:00
Clément Bœsch a0ffd66caa Merge commit '0fea8555ae25124c21f4c4f55a5fa76e9169aa03'
* commit '0fea8555ae25124c21f4c4f55a5fa76e9169aa03':
  v4l2: use codec descriptors for mapping a codec name to id

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-26 17:17:50 +02:00
Muhammad Faiz 8103c59522 avdevice: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-23 14:35:08 +07:00
Clément Bœsch 9ae1ffe641 Merge commit '1818a640cfdccd52e97edf13564f45bc3d0d93eb'
* commit '1818a640cfdccd52e97edf13564f45bc3d0d93eb':
  build: Fix dependencies for alsa/jack/sndio support

Added explicit enable (which will be automatically added later on in
ee480790c) to actually fix this commit. Without the explicit enables,
alsa, jack and sndio gets disabled.

Also added jack, alsa and sndio to the have list so the HAVE_* are
populated to make (this fixes the SKIPHEADERS chunks).

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-17 09:28:34 +02:00
Aaron Levinson 9e86a61870 avdevice/decklink: remove pthread dependency
Purpose: avdevice/decklink: Removed pthread dependency by replacing
semaphore used in code appropriately.  Doing so makes it easier to
build ffmpeg using Visual C++ on Windows.  This is a contination of
Kyle Schwarz's "avdevice/decklink: Remove pthread dependency" patch
that is available at https://patchwork.ffmpeg.org/patch/2654/ .  This
patch wasn't accepted, and as far as I can tell, there was no
follow-up after it was rejected.

Notes: Used Visual Studio 2015 (with update 3) for this.

Comments:

-- configure: Eliminated pthreads dependency for decklink_indev_deps
   and decklink_outdev_deps and replaced with threads dependency

-- libavdevice/decklink_common.cpp / .h:
a) Eliminated semaphore and replaced with a combination of a mutex,
   condition variable, and a counter (frames_buffer_available_spots).
b) Removed include of pthread.h and semaphore.h and now using
   libavutil/thread.h instead.

-- libavdevice/decklink_dec.cpp: Eliminated include of pthread.h and
   semaphore.h.

-- libavdevice/decklink_enc.cpp:
a) Eliminated include of pthread.h and semaphore.h.
b) Replaced use of semaphore with the equivalent using a combination
   of a mutex, condition variable, and a counter
   (frames_buffer_available_spots).  In theory, libavutil/thread.h and
   the associated code could have been modified instead to add
   cross-platform implementations of the sem_ functions, but an
   inspection of the ffmpeg source base indicates that there are only
   two cases in which semaphores are used (including this one that was
   replaced), so it was deemed to not be worth the effort.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-04-15 12:26:21 +02:00
Clément Bœsch a329b822e1 Merge commit '4a1ef543983b7480e2822f6ac281ba361d1f893d'
* commit '4a1ef543983b7480e2822f6ac281ba361d1f893d':
  build: Drop support for old versions of libdc1394

Merged-by: Clément Bœsch <u@pkh.me>
2017-04-09 14:22:43 +02:00
Michael Niedermayer 22b0daa1b3 Bump versions for master after 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:54:12 +02:00
Michael Niedermayer e1cc7f83df Bump minor for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:49:45 +02:00
Michael Niedermayer 58b867a7cf Bump minor versions for master after release/3.3 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
Michael Niedermayer fc332f3e29 Bump minor versions for staring release/3.3 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
Clément Bœsch e3287077ec Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'
* commit '67deba8a416d818f3d95aef0aa916589090396e2':
  Use avpriv_report_missing_feature() where appropriate

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-31 10:40:34 +02:00
Marton Balint 77d2cb8874 avdevice/decklink: deprecate @mode syntax in device name to specify mode
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-28 22:00:16 +02:00
Marton Balint c395d230b1 avdevice/decklink_enc: convert to std::atomic
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-28 22:00:15 +02:00
Diego Biurrun 5a969f64b9 jack: Drop support for old (2012) JACK versions 2017-03-28 09:11:00 +02:00
Clément Bœsch 761bbb06ff Merge commit '2f806622e1270d3ed1d41a53049a19673dafbe70'
* commit '2f806622e1270d3ed1d41a53049a19673dafbe70':
  bktr: Use memset(0) instead of zero initialization for struct sigaction

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-24 12:41:31 +01:00
Vittorio Giovara 07a2b15594 Bump major versions of all libraries
This disables everything that was deprecated at least 18 months ago.

Readjust the minimum API version as needed, postponing any
API-incompatible changes until the next bump.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-23 09:56:20 +01:00
Clément Bœsch b7336faa39 Merge commit '3a165c187da7d74f46f6c1778294e8c5a3a7151f'
* commit '3a165c187da7d74f46f6c1778294e8c5a3a7151f':
  v4l2: convert to stdatomic

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-22 17:55:18 +01:00
Matthias Hunstock b3a2adaac6 avdevice/decklink: new option 'format_code' to set video format by fourCC
Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-22 02:07:50 +01:00
Matthias Hunstock 607bffbed2 avdevice/decklink: add format_code of display mode to list_format output
Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-22 02:07:47 +01:00
Clément Bœsch b2c5f5054b Merge commit '93fed46a92bab8be176d3e67be4354189a8dbe7f'
* commit '93fed46a92bab8be176d3e67be4354189a8dbe7f':
  timefilter: test: Drop some disabled debug cruft

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-19 16:08:27 +01:00
Clément Bœsch f6d61eb6f9 Merge commit '5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688'
* commit '5ed4644d6de7f6112431dc2d9a5cfe9a0a75a688':
  x11grab: Rename internal component to "xcbgrab"

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 22:19:56 +01:00
Clément Bœsch 4a9c5f6bc5 Merge commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c'
* commit '4fef648d10bf3bcfd4b8fa5755c1128966a2427c':
  Remove the legacy X11 screen grabber

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 22:07:47 +01:00
Muhammad Faiz 776f289c0f avdevice/alldevices: make avdevice_register_all thread safe
use ff_thread_once

Suggested-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-07 20:34:44 +07:00
Marton Balint 80b644c6ee avdevice/decklink_dec: remove AVFMT_RAWPICTURE
It has no effect for input devices.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-26 22:47:33 +01:00
Marton Balint 418ce91507 avdevice/decklink_enc: convert AVFMT_RAWPICTURE to AV_CODEC_ID_WRAPPED_AVFRAME
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-26 22:47:33 +01:00
Marton Balint 48f8ad3290 avdevice/decklink_enc: add support to specify field order
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-26 22:47:33 +01:00
Marton Balint e0eb0bdab9 avdevice/decklink_enc: convert to codecpar
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-26 22:47:33 +01:00
Carl Eugen Hoyos 6a22d2459d lavd/opengl_enc: Fix a typo. 2017-02-23 00:11:43 +01:00
Carl Eugen Hoyos 2ac381088d lavd/opengl_enc: Support BGR48. 2017-02-22 00:10:25 +01:00
Marton Balint 4556dad2b7 avdevice/iec61883: free packet on buffer allocation error
Fixes Coverity CID 1396416.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-19 16:41:43 +01:00
Clément Bœsch b9292a9698 Merge commit '5d0f85f1b2469b60d0838330aabe5353fdd9ef1d'
* commit '5d0f85f1b2469b60d0838330aabe5353fdd9ef1d':
  libdc1394: Fill in packet data directly

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-01-31 17:27:46 +01:00
Carl Eugen Hoyos 0b607228bf Cosmetics: Reindent after last commit. 2017-01-25 00:55:36 +01:00
Carl Eugen Hoyos 9d5141d1fb lavd/v4l2: Avoid setting frame_size to a negative value. 2017-01-25 00:54:10 +01:00
Nicolas George 063b1a42c6 lavd/lavfi: use buffersink accessors. 2017-01-12 14:06:16 +01:00
Marton Balint a7946c8964 avdevice/decklink_enc: do not reference this after freeing it
Fixes Coverity CID 1396863.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-12-27 01:11:59 +01:00
Marton Balint 89a1471a72 avdevice/decklink_dec: properly initialize no_video variable
Fixes Coverity CID 1396859.

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-12-27 01:11:59 +01:00
Diego Biurrun 92db508307 build: Generate pkg-config files from Make and not from configure
This moves work from the configure to the Make stage where it can
be parallelized and ensures that pkgconfig files are updated when
library versions change.

Bug-Id: 449
2016-12-22 12:30:54 +01:00
Anton Khirnov 0fea8555ae v4l2: use codec descriptors for mapping a codec name to id
This mapping has nothing to do with decoder implementations, so using
decoder names is wrong.
2016-12-19 08:07:15 +01:00
Diego Biurrun 1818a640cf build: Fix dependencies for alsa/jack/sndio support
These components should depend on the availability of the respective
libraries, not just on the availability of the respective headers.
2016-12-09 08:42:34 +01:00
Diego Biurrun 4a1ef54398 build: Drop support for old versions of libdc1394
The libdc1394 API transition was finished close to a decade ago.
2016-12-03 09:15:01 +01:00
Hendrik Leppkes d7d6f9c782 Merge commit '0b1bd1b2057d41fd0ccba7317911c484a50f9207'
* commit '0b1bd1b2057d41fd0ccba7317911c484a50f9207':
  lavd: Drop unneeded av_init_packet()s

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:20:14 +01:00
Diego Biurrun 67deba8a41 Use avpriv_report_missing_feature() where appropriate 2016-11-08 17:54:34 +01:00
Nicolas George 0bd1be65e8 lavd/xcbgrab: do not try to create refcounted packets.
The framework will allocate a buffer and copy the data to it,
that takes time. But it avoids constently creating and
destroyng the shared memory segment, and that saves more time.

On my setup,
from ~200 to ~300 FPS at full screen (1920×1200),
from ~1400 to ~3300 at smaller size (640×480),
similar to legacy x11grab and confirmed by others.

Plus, shared memory segments are a scarce resource,
allocating potentially many is a bad idea.

Note: if the application were to drop all references to the
buffer before the next call to av_read_frame(), then passing
the shared memory segment as a refcounted buffer would be
even more efficient, but it is hard to guarantee, and it does
not happen with the ffmpeg command-line tool. Using a small
number of preallocated buffers and resorting to a copy when
the pool is exhausted would be a solution to get the better
of both worlds.
2016-11-03 21:23:55 +01:00
Michael Niedermayer 1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer 3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
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
Marton Balint dfc561a38e lavd/decklink_dec: fix indentation
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-21 20:24:12 +02:00
Marton Balint 2f3015c25a lavd/decklink_dec: add option to disable drawing bars on signal loss
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-21 20:24:12 +02:00
Marton Balint fbf8ac7d2a lavd/openal: don't return zero sized packet if no samples are available
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-10-03 21:15:48 +02:00
Anton Khirnov 3a165c187d v4l2: convert to stdatomic 2016-10-02 19:34:57 +02:00
Josh de Kock 21344991c0 lavd/sdl2: add sdl alias
This commit also adds an sdl alias for the configure script.
2016-09-25 18:08:06 +01:00
Josh de Kock fbb1fcd4d0 lavd/sdl2: remove unused code 2016-09-25 18:08:06 +01:00
Carl Eugen Hoyos 159aa1275e lavd/sdl2: Fix 32bit rgb formats on little-endian hardware. 2016-09-24 18:56:40 +02:00
Carl Eugen Hoyos 1d92256d60 lavd/sdl2: Move unsupported formats SDL_PIXELFORMAT_xxx888 updwards.
There is a paragraph for unsupported SDL formats.
2016-09-24 18:35:15 +02:00
Josh de Kock 47ea6f5c9d lavd: drop SDL1 device and SDL1 support
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-09-24 16:52:40 +01:00
Lukasz Marek 645353829f lavd/opengl: use SDL2
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-09-24 16:50:40 +01:00
Josh de Kock 3877e3d8a8 lavd: Add SDL2 output device
Acked-by: Michael Niedermayer
Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-09-24 16:50:40 +01: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
Roger Pack 18ce63a60e avdevice/dshow: satisfy alloc contract better
prevent non-rgb24 crashes on windows 10 anniversary ed

Signed-off-by: Roger Pack <rogerpack2005@gmail.com>
2016-08-20 12:06:50 +02:00
Diego Biurrun 93fed46a92 timefilter: test: Drop some disabled debug cruft 2016-08-17 12:16:42 +02:00
Matthias Hunstock d8ee02a071 decklink: enhancement: format selection with AVRational v2
When finding a video mode based on frame size and frame rate,
use AVRational methods instead of simple comparison. Add debug information.

Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-05 21:33:43 +02:00
Matthias Hunstock 8431a6e654 decklink: fix: set fps on video stream v2
Provide the stream with the correct fps information when capturing.

Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-05 20:43:36 +02:00
Patrick Felt e9659d1a0b decklink: Remove unneeded spaces in initializers 2016-08-02 22:46:28 -07:00
Timothy Gu 58c7bf789f doxygen: Standardize root-level modules 2016-08-02 22:15:25 -07:00
Patrick Felt 5469293758 cosmetics: Correct comments in decklink_dec
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-08-02 13:01:12 -07: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
Josh de Kock c2fcf4fa0b avdev/jack: remove duplicated dispatch macros
The macros were moved to compat/dispatch_semaphore/semaphore.h after a libav merge, and were never removed from jack.c
2016-07-26 23:10:47 +01:00
Josh de Kock 384251daff lavd/libdc1394: distinguish between enumeration errors and no cameras found
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-25 19:39:13 +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
James Almer d688f39dc4 cosmetics: fix some misspelled words
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-17 13:10:27 -03: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
Michael Niedermayer c0cb53cd1f avdevice/decklink_common: Replace rare spelling of Succesfully by 500 times more common one
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-28 03:07:54 +02:00