summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_dec.cpp
Commit message (Collapse)AuthorAge
* avdevice/decklink_dec: fix codec_tag of RGBA formatsBIGLER Don (Framatome)2018-11-01
| | | | | | Fixes ticket #7505. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: add option to align capture start timeKarthick Jeyapal2018-09-30
| | | | | | | | | This option is useful for maintaining input synchronization across N different hardware devices deployed for 'N-way' redundancy. The system time of different hardware devices should be synchronized with protocols such as NTP or PTP, before using this option. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: capture timecode to metadata when requestedJon Morley2018-06-13
| | | | | | | | | | 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_dec: use std::atomic for decklink_input_callback refcountingMarton Balint2018-06-13
| | | | | | Also remove the callback from the context, and add proper error handling. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: use a custom memory allocatorMarton Balint2018-06-13
| | | | | | | 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>
* avdevice/decklink_dec: unref packets on avpacket_queue_put errorMarton Balint2018-04-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: do not copy video dataMarton Balint2018-04-30
| | | | | | | 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>
* avdevice/decklink_dec: use av_packet_make_refcounted to ensure packets are ↵James Almer2018-04-02
| | | | | | | | ref counted Partially reverts commit e91f0c4f8b, simplifying code. Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: Fix ;;Michael Niedermayer2018-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/decklink_dec: extract NTSC VANCRay Tiley2018-02-13
| | | | | | | | | | | | | | 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>
* avdevice: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: addition of absolute wallclock option for pts sourceVishwanath Dixit2018-01-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: addition of copyts optionVishwanath Dixit2018-01-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: autodetect the video input formatKarthick J2017-11-22
| | | | | | 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-21
| | | | | | This is done to enable input format autodetection in decklink_dec. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: make some function staticJames Almer2017-11-09
| | | | | Reviewed-by: Aaron Levinson <alevinsn_dev@levland.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: remove extra bracketJames Almer2017-10-30
| | | | | | | | Fixes compilation broken in 2245476e5c451552f8f32a4a881f6b4968898a47 Fixes ticket #6791 Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice: remove usage of deprecated setter and getter functionsJames Almer2017-10-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: 32 bit audio supportDave Rice2017-10-18
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* libavdevice/decklink: add support for -sources and -sinks argumentsDevin Heitmueller2017-10-10
| | | | | | | | | | | | | | | 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>
* lavd/decklink_dec: Do not claim to output transparency information.Carl Eugen Hoyos2017-10-08
|
* avdevice/decklink_dec: fix extracting lumaMarton Balint2017-10-06
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: fix multipacket op47 decodingMarton Balint2017-10-04
| | | | | | It was disabled by mistake. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: remove av_dup_packet() usageJames Almer2017-10-02
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: use av_packet_add_side_data()James Almer2017-10-02
| | | | | | | 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>
* avdevice/decklink_dec: Used av_parity instead of duplicated functionKarthick J2017-10-01
|
* avdevice/decklink_dec: Added Closed caption decode from VANCKarthick J2017-09-28
| | | | | Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: Extraction of luma from V210 VANC modularizedKarthick J2017-09-28
| | | | | | | In preparation to support multiple VANC data decode Signed-off-by: Karthick J <kjeyapal@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: Added VANC search for all resolutionsKarthick J2017-09-28
| | | | | | | 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>
* avdevice/decklink_dec: add support for more pixel formatsGildas Fargeas2017-09-28
| | | | | | | 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>
* avdevice/decklink_dec: fix signed and unsigned comparison warningMarton Balint2017-08-27
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* libavdevice/decklink: configurablity to set max queue sizeRavindra2017-08-22
| | | | | Signed-off-by: Ravindra Patagar <rpatagar@akamai.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: set field order via codecparMarton Balint2017-07-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: add support for receiving op47 teletextMarton Balint2017-07-18
| | | | | | | | | 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>
* avdevice/decklink_dec: add support for decoding teletext from 10bit ↵Marton Balint2017-07-18
| | | | | | | | | | | | | 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>
* avdevice/decklink: fix MSVC build issuesAaron Levinson2017-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avdevice/decklink: remove pthread dependencyAaron Levinson2017-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: deprecate @mode syntax in device name to specify modeMarton Balint2017-03-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: new option 'format_code' to set video format by fourCCMatthias Hunstock2017-03-22
| | | | | Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink_dec: properly initialize no_video variableMarton Balint2016-12-27
| | | | | | Fixes Coverity CID 1396859. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavd/decklink_dec: fix indentationMarton Balint2016-10-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavd/decklink_dec: add option to disable drawing bars on signal lossMarton Balint2016-10-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* decklink: fix: set fps on video stream v2Matthias Hunstock2016-08-05
| | | | | | | 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>
* decklink: Remove unneeded spaces in initializersPatrick Felt2016-08-02
|
* cosmetics: Correct comments in decklink_decPatrick Felt2016-08-02
| | | | Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* avdevice/decklink: add support for setting input packet timestamp sourceMarton Balint2016-06-26
| | | | | 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-26
| | | | | 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-26
| | | | | | | 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: always free decklink resources on errorMarton Balint2016-06-26
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/decklink: factorize device finder functionMarton Balint2016-06-26
| | | | | Reviewed-by: Deti Fliegl <deti@fliegl.de> Signed-off-by: Marton Balint <cus@passwd.hu>