summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_common.h
Commit message (Collapse)AuthorAgeFilesLines
* avfilter/ccfifo: remove unnecessary context allocationsJames Almer2023-05-121-1/+1
| | | | | | | This is not public API, no it has no need for an alloc() and free() functions. The struct can reside on stack. Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink: move AVPacketQueue into decklink_common and rename it to ↵Devin Heitmueller2023-05-111-3/+10
| | | | | | | | | | | | | | | | | | | | DecklinkPacketQueue Move the AVPacketQueue functionality that is currently only used for the decklink decode module into decklink_common, so it can be shared by the decklink encoder (i.e. for VANC insertion when we receive data packets separate from video). The threadsafe queue used within the decklink module was named "AVPacketQueue" which implies that it is part of the public API, which it is not. Rename the functions and the name of the queue struct to make clear it is used exclusively by decklink, per Marton Balint's suggestion. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_enc: add support for playout of 608 captions in MOV filesDevin Heitmueller2023-05-111-0/+3
| | | | | | | | | | | | | | | | | Unlike other cases where the closed captions are embedded in the video stream as MPEG-2 userdata or H.264 SEI data, with MOV files the captions are often found on a separate "e608" subtitle track. Add support for playout of such files, leveraging the new ccfifo mechanism to ensure that they are embedded into VANC at the correct rate (since e608 packets often contain batches of multiple 608 pairs). Note this patch includes a new file named libavdevice/ccfifo.c, which allows the ccfifo functionality in libavfilter to be reused even if doing shared builds. This is the same approach used for log2_tab.c. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink_enc: don't take for granted that first frame to decklink ↵Devin Heitmueller2023-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | output will be PTS 0 The existing code assumed that the first frame received by the decklink output would always be PTS zero. However if running in other timing modes than the default of CBR, items such as frame dropping at the beginning may result in starting at a non-zero PTS. For example, in our setup because we discard probing data and run with "-vsync 2" the first video frame scheduled to the decklink output will have a PTS around 170. Scheduling frames too far into the future will either fail or cause a backlog of frames scheduled far enough into the future that the entire pipeline will stall. Issue can be reproduced with the following command-line: ./ffmpeg -copyts -i foo.ts -f decklink -vcodec v210 -ac 2 'DeckLink Duo (4)' Keep track of the PTS of the first frame received, so that when we enable start playback we can provide that value to the decklink driver. Thanks to Marton Balint for review and suggestion to use AV_NOPTS_VALUE rather than zero for the initial value. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/packet_internal: Add proper PacketList structAndreas Rheinhardt2022-01-041-1/+4
| | | | | | | | | | | | | | | Up until now, we had a PacketList structure which is actually a PacketListEntry; a proper PacketList did not exist and all the related functions just passed pointers to pointers to the head and tail elements around. All these pointers were actually consecutive elements of their containing structs, i.e. the users already treated them as if they were a struct. So add a proper PacketList struct and rename the current PacketList to PacketListEntry; also make the functions use this structure instead of the pair of pointers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/decklink: support for more duplex mode for Decklink 8K ProLimin Wang2021-08-161-0/+11
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink: add link configuration optionLimin Wang2021-08-161-0/+8
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/packet_internal: make avpriv_packet_list_* functions use an internal ↵James Almer2021-03-171-1/+1
| | | | | | | | | struct The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front. Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_enc: simplify usage of buffercount typeMarton Balint2020-12-031-7/+0
| | | | | | Also remove some leftover declaration of CreateDeckLinkIteratorInstance(). Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: map the raw_format instead of hardcodeLimin Wang2020-11-211-0/+9
| | | | | | | | The patch will change the numerical values for the string constants so bump micro version. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avdevice/decklink_dec: add support for querying RP188 High Frame Rate timecodeMarton Balint2020-09-131-0/+5
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_common.h: remove unsupported decklink version ifdefMarton Balint2020-09-131-4/+0
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: add support for extracting and outputing klv from vancMilos Zivkovic2020-07-031-0/+2
| | | | | Signed-off-by: Milos Zivkovic <zivkovic@teralogics.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: fix stopping streams in read_closeMarton Balint2020-02-261-1/+0
| | | | | | | The capture_started variable was never set, it is simpler to call the stop functions unconditionally if the interface is available. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: remove the @mode syntaxMarton Balint2020-01-031-2/+2
| | | | | | Deprecated since March 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add option to drop frames till timecode is seenGyan Doshi2019-11-181-0/+1
| | | | Option wait_for_tc only takes effect if tc_format is set
* avdevice/decklink_common: add support for DeckLink SDK 11Marton Balint2019-04-151-1/+5
| | | | | | Fixes ticket #7789. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add support for selecting devices based on their unique IDMarton Balint2018-09-231-1/+0
| | | | | | | | Also bump the API version requirement to 10.9.5, because on olders versions there were some reports of crashes using the undocumented, yet available BMDDeckLinkDeviceHandle. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: Add support for EIA-708 output over SDIDevin Heitmueller2018-09-091-0/+10
| | | | | | | | | | | | | | | | Hook in libklvanc and use it for output of EIA-708 captions over SDI. The bulk of this patch is just general support for ancillary data for the Decklink SDI module - the real work for construction of the EIA-708 CDP and VANC line construction is done by libklvanc. Libklvanc can be found at: https://github.com/stoth68000/libklvanc Updated to reflect feedback from Marton Balint <cus@passwd.hu>, Carl Eugen Hoyos <ceffmpeg@gmail.com>, Aaron Levinson <alevinsn_dev@levland.net>, and Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: capture timecode to metadata when requestedJon Morley2018-06-131-0/+12
| | | | | | | | | | 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>
* avdevice/decklink_common: Move DECKLINK_* string functions into headerJon Morley2018-06-131-0/+30
| | | | | | | This allows other decklink source access to these cross-platform convenience functions. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: use std::atomic for decklink_input_callback refcountingMarton Balint2018-06-131-1/+0
| | | | | | Also remove the callback from the context, and add proper error handling. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: autodetect the video input formatKarthick J2017-11-221-0/+7
| | | | | | When -format_code is not specified autodetection will happen. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: refactor ff_decklink_set_format functionKarthick J2017-11-211-0/+1
| | | | | | This is done to enable input format autodetection in decklink_dec. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: 32 bit audio supportDave Rice2017-10-181-0/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* libavdevice/decklink: add support for -sources and -sinks argumentsDevin Heitmueller2017-10-101-1/+2
| | | | | | | | | | | | | | | 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>
* libavdevice/decklink: configurablity to set max queue sizeRavindra2017-08-221-0/+2
| | | | | Signed-off-by: Ravindra Patagar <rpatagar@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: remove pthread dependencyAaron Levinson2017-04-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avdevice/decklink_enc: add support to specify field orderMarton Balint2017-02-261-1/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavd/decklink_dec: add option to disable drawing bars on signal lossMarton Balint2016-10-211-0/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: fix mingw portabilityMarton Balint2016-06-271-2/+2
| | | | | | Fixes ticket #5669. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add support for setting input packet timestamp sourceMarton Balint2016-06-261-0/+2
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add support for audio and video input selectionMarton Balint2016-06-261-0/+21
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: add support for setting duplex modeMarton Balint2016-06-261-0/+3
| | | | | | | 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>
* avdevice/decklink: factorize device finder functionMarton Balint2016-06-261-0/+1
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: factorize cleanup function to common codeMarton Balint2016-06-261-0/+1
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* libavdevice/decklink_common.h: fix broken build due to missing `/`Michael Ira Krufky2016-01-291-1/+1
| | | | Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org>
* all: Add missing header guardsTimothy Gu2016-01-281-0/+4
|
* lavd/decklink_dec: add support for teletextMarton Balint2016-01-291-0/+2
| | | | | | | 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>
* Revert "decklink: Header cleanup"Timothy Gu2016-01-241-7/+1
| | | | | | This reverts commit 61fb70c3866b19dccf473ad4e5ede79d117e8e1c. Reported in #5183 to break the build. Further investigation needed.
* decklink: Header cleanupTimothy Gu2016-01-241-1/+7
| | | | | This commit cleans up the decklink files' header usage so that they pass checkheaders.
* avdevice/decklink: Fix build error caused by a change in the SDK.Chris Spencer2015-07-281-0/+6
| | | | | | | In version 10.4 of the DeckLink SDK, GetBufferedAudioSampleFrameCount() was changed to take an unsigned int instead of an unsigned long. Signed-off-by: Chris Spencer <spencercw@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/decklink_common: Fix "Cross-compiling FFmpeg on Debian for Windows ↵Carl Eugen Hoyos2014-11-251-1/+0
| | | | | | | | | with MinGW-w64" Fixes Ticket4130 Requested and Tested by: Zeranoe Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avdevice/decklink: move general code of decklink encoder to common fileDeti Fliegl2014-09-221-0/+98
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>