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
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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
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>
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>