Commit Graph

54 Commits

Author SHA1 Message Date
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
Marton Balint 4bb0409820 avdevice: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +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 7c27bbd590 avdevice/decklink: addition of copyts option
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +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 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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Marton Balint cf0a05668b avdevice/decklink: add support for setting input packet timestamp source
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:18:06 +02:00
Marton Balint da89c6e37c avdevice/decklink: add support for audio and video input selection
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:18:02 +02:00
Marton Balint 8f9fa49bd8 avdevice/decklink: add support for setting duplex mode
This patch also makes BlackMagic drivers v10.6.1 a hard requirement.

Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:56 +02:00
Marton Balint e22760aafd avdevice/decklink: always free decklink resources on error
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:52 +02:00
Marton Balint 38d75fe906 avdevice/decklink: factorize device finder function
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:45 +02:00
Marton Balint 4ce0a77ec8 avdevice/decklink: remove unused itermode iterators
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:40 +02:00
Marton Balint 1fc85d8511 avdevice/decklink: factorize cleanup function to common code
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:37 +02:00
Marton Balint 340cea9f22 avdevice/decklink_dec: fix bitrate calculations
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-06-26 19:17:29 +02:00
Felt, Patrick fce7513122 avdevice/decklink_dec: Convert decklink input module to use codecpar
There are still a couple of deprecated calls that I’m not sure what to do with.
They are both related to some logic around AVCodecContext.coded_frame.
I couldn’t find anywhere that really documented what that was, or where it was intended to move to.
I left the warnings on.

Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-11 01:14:01 +02:00
Matthias Hunstock e9025573fa decklink: support all valid numbers of audio channels
As it is already written in the documentation, BMD DeckLink cards
are capable of capturing 2, 8 or 16 audio channels (for SDI Inputs).
Currently the value is hardcoded to 2. Introduces new option.

Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-03 00:34:26 +01:00
Marton Balint 995c7a6f5a lavd/decklink_dec: add support for teletext
It uses the libzvbi slicer, therefore teletext capture requires libzvbi.

Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-01-29 01:42:15 +01:00
Timothy Gu ce36cb08ed Revert "decklink: Header cleanup"
This reverts commit 61fb70c386.

Reported in #5183 to break the build. Further investigation needed.
2016-01-24 12:42:39 -08:00
Timothy Gu 61fb70c386 decklink: Header cleanup
This commit cleans up the decklink files' header usage so that they pass
checkheaders.
2016-01-24 07:31:16 -08:00