Commit Graph

22 Commits

Author SHA1 Message Date
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 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
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
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
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
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 c395d230b1 avdevice/decklink_enc: convert to std::atomic
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-03-28 22:00:15 +02: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
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
Patrick Felt e9659d1a0b decklink: Remove unneeded spaces in initializers 2016-08-02 22:46:28 -07: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
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
Deti Fliegl a5e040ee3c avdevice/decklink: move general code of decklink encoder to common file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-22 01:39:50 +02: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