Commit graph

353 commits

Author SHA1 Message Date
Seungha Yang 94a9a8f836 decklink: Update OSX headers with SDK 11.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1665>
2020-10-08 20:05:03 +00:00
Tim c6151f635f decklink: Updated DeckLink SDK to 11.2 to support DeckLink 8K Pro
Updated Decklink SDK to version 11.2 in order to support newer cards like the Decklink 8K Pro.
This required to replace the duplex property by a profile property.

Profile values can be the following:
-  bmdProfileOneSubDeviceFullDuplex
-  bmdProfileOneSubDeviceHalfDuplex
-  bmdProfileTwoSubDevicesFullDuplex
-  bmdProfileTwoSubDevicesHalfDuplex
-  bmdProfileFourSubDevicesHalfDuplex

Fixes #987

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1665>
2020-10-08 20:05:03 +00:00
Sebastian Dröge 97e648a738 decklink: Correctly order the different dependent mode tables
One was forgotten in 309f6187fe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1617>
2020-10-01 06:29:19 +00:00
Sebastian Dröge 309f6187fe decklink: Re-order modes enum for backwards compatibility with 1.16
The PAL/NTSC widescreen modes were added after 1.16 but inserted before
the HD modes, which changed the integer values of the enums.

Move them to the very end instead to keep backwards compatibility.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1048

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1492>
2020-08-06 12:22:04 +03:00
Matthew Waters c94675f1d4 decklinkvideosink: write the cdp timecode data correctly
We were mixing up the tens part with the unit parts all over the place.

e.g. 12 seconds would be encoded as 0x21 instead of the correct 0x12

Aligns the code with the same change applied to ccconverter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1400>
2020-07-03 06:54:46 +00:00
Mathieu Duponchelle a048ce81d4 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:40:42 +02:00
Sebastian Dröge 74f2f733be plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 13:33:16 -04:00
Philippe Normand 273e32d5aa decklink: Remove spurious gtk-doc marker 2020-03-15 10:46:54 +00:00
Heinrich Kruger 03cf2d42a5 decklink: Add support for 2K DCI video modes
Extend the video modes supported by the decklink plugin to include 2K
DCI video modes.
2020-03-03 08:05:56 +00:00
Heinrich Kruger 796fffa441 decklink: Update Decklink SDK to 10.11.4
This change is needed to support 2K DCI video modes.

Version 10.8 of the Decklink SDK supported DCI video modes for output
only. This updated version drops that restriction.

The current latest version of the Decklink SDK is 11.5, however
the gstreamer decklink plugin is not compatible with API changes
introduced in version 11 of the SDK. Therefore I have opted to upgrade
to the latest 10.x version instead.
2020-03-03 08:05:56 +00:00
Nicolas Dufresne 6d6e897762 decklink: Silence no driver / no SO messages
This g_once() is called everywhere, even in provider. This cause
spurious error when device monitor is used. Just silence or remove
the spurious logs.
2020-01-10 08:00:05 +00:00
Sebastian Dröge e4389146d9 decklinkvideosink: Always configure 10 bit YUV for VANC frames
If 8 bit are required by the device/mode then it will be converted internally
by the SDK, but the SDK won't automatically convert from 8 to 10 bit. As
such, always use 10 bit VANC.

Some devices require configuring also a 10 bit video format when using
10 bit VANC is required but those would fail regardless and the
application would have to configure the correct video format.

With newer versions of the SDK this information can be retrieved via the
BMDDeckLinkVANCRequires10BitYUVVideoFrames flag but we don't use a new
enough SDK version yet to extract this information.
2020-01-09 12:54:04 +02:00
Philippe Normand 9f1fbd3649 decklink: Fix crash when probing without driver
If there is no decklink hardware/driver, the devices list is empty (NULL), so
this needs to be checked before iterating over the list.
2020-01-05 16:20:18 +00:00
Sebastian Dröge f776e2df96 decklink: Return new references to the devices from get_devices()
Otherwise the caller will free the devices we store internally.
2019-12-05 21:22:18 +02:00
Sebastian Dröge 8ba4d1a480 decklink: Add simple device provider for Decklink devices 2019-12-03 09:16:22 +00:00
Aaron Boxer 6d3429af34 documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
Tim-Philipp Müller f218ec2794 Remove autotools build system 2019-10-14 13:54:27 +01:00
Matthew Waters 4d528776b6 decklink: fix timestamp tracking when pausing
play->pause->sleep()->play would result in late frames being scheduled
2019-10-14 19:22:36 +11:00
Matthew Waters 82e23a27f7 decklinkaudiosink: Drop late buffers
Asking decklink to render audio data seems to be based entirely on
the sample counts which completely disregards the timestamps
we pass to decklink.  As a result, we need to explicitly check
for late buffers and drop them ourselves.
2019-09-02 11:09:02 +00:00
Matthew Waters 02814a43da decklink: fix macos werror build
../sys/decklink/gstdecklink.cpp:1703:7: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Werror,-Wformat]
      persistent_id);
      ^~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1070:87: note: expanded from macro 'GST_DEBUG'
#define GST_DEBUG(...)                  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   NULL, __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~
2019-08-30 14:16:54 +10:00
Sebastian Dröge 99af098a7b decklinkvideosrc: Retrieve mode of the ancillary data from the frame
Instead of using the information we stored ourselves for the video frame
itself. Which was also the wrong one: it was the mode from the property,
not the autodetected one.

This fixes vanc extraction with mode=auto
2019-08-07 10:27:42 +00:00
Sebastian Dröge 2b3a14ff4e decklinkvideosrc: Also set the INTERLACED buffer flag on non-TFF buffers 2019-08-07 10:27:42 +00:00
Sebastian Dröge ab8bd0aa44 decklinkaudiosrc/decklinkvideosrc: Do nothing in BaseSrc::negotiate() and always set caps in ::create()
We don't support negotiation with downstream but simply set caps based
on the buffers we receive. This prevents renegotiation to other formats,
and negotiation to NTSC in mode=auto in the beginning until the first
buffer is received.

As side-effect of this, also remove various other caps handling code
that was working around the behaviour of the default
BaseSrc::negotiate().
2019-08-06 19:05:38 +00:00
Sebastian Dröge e326260173 decklink: Make sure to return a value from all code paths
False warning from MSVC, or it does not understand that
g_assert_not_reached() does not return.

...\gst-plugins-bad-1.0-1.17.0.1\sys\decklink\gstdecklink.cpp(1647) : warning C4715: 'gst_decklink_configure_duplex_mode': not all control paths return a value
2019-07-25 12:29:22 +03:00
Sebastian Dröge b4b911da4d decklinksrc: Reset timestamp observations on format change
We will usually get timestamps starting from 0 again and due to the
format change the clock of the input might also be different.
2019-07-25 12:29:22 +03:00
Sebastian Dröge bf9ecd65cf decklinkvideosrc: Don't report that we have signal until we know for sure
Previously we would've reported that there is signal unless we know for
sure that we don't have signal. For example signal would've been
reported before the device is even opened.

Now keep track whether the signal state is unknown or not and report no
signal if we don't know yet. As before, only send an INFO message about
signal recovery if we actually had a signal loss before.
2019-07-15 12:06:25 +03:00
Ray Tiley b00f6c4f81 decklinkvideosrc: remove g_print
Causes a lot of output :)
2019-07-09 08:38:18 +00:00
Sebastian Dröge 907dc6df68 decklink: Correctly ensure >=16 byte alignment for the buffers we allocate
We'll ensure at least 64 byte alignment for AVX2 but 16 byte alignment
is what is required by the decklink SDK.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/986
2019-06-24 05:17:46 +00:00
Sebastian Dröge 5e4d10e296 decklinkvideosrc: Notify about signal loss even when dropping no-signal frames
Otherwise the application has no way of knowing that signal loss
happened other than noticing a gap between actual frames.
2019-06-20 10:11:08 +03:00
Thibault Saunier 47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Sebastian Dröge 6354769d89 decklink: Add support for parsing/outputting AFD/Bar 2019-05-03 21:20:49 +00:00
Sebastian Dröge ba21c2106b decklink: Allow VANC to be used for all modes 2019-05-03 21:20:49 +00:00
Sebastian Dröge 88f9724114 decklink: Add support for widescreen NTSC/PAL
Same as non-widescreen but with a different pixel-aspect-ratio.
2019-05-03 21:20:49 +00:00
Peter Körner 58b5d5e10d decklinkvideosrc: add missing break in set_property-code 2019-04-09 12:19:58 +02:00
Peter Körner 18d3d31dc8 decklink: document duplex and keyer behaviour 2019-03-04 09:34:44 +00:00
Peter Körner 58dadd1ad0 decklink: implement duplex-mode property 2019-03-04 09:34:44 +00:00
Tim-Philipp Müller bdd64e1e3f decklink: add Hardware tag to element metadata 2019-02-19 23:45:35 +00:00
Sebastian Dröge 8171560053 decklinkvideosink: Use S334_EIA_608 instead of S334_EIA_708 for CEA608 output 2019-02-12 14:38:40 +02:00
Sebastian Dröge 173f11e73f decklinkvideosink: S334 1A CEA608 closed captions have the first bit set for the first field
And not for the second field. The logic was inverted here.
2019-02-12 14:38:40 +02:00
Nirbheek Chauhan fffb2aa12f misc: Fix warnings on Cerbero MinGW
gstladspa.c:360:5: error: zero-length ms_printf format string [-Werror=format-zero-length]

vad_private.c:108:3: error: this decimal constant is unsigned only in ISO C90 [-Werror]

gstdecklinkvideosink.cpp:478:32: error: comparison between 'BMDTimecodeFormat {aka enum _BMDTimecodeFormat}' and 'enum GstDecklinkTimecodeFormat' [-Werror=enum-compare]

win/DeckLinkAPI_i.c:72:8: error: extra tokens at end of #endif directive [-Werror]

win/DeckLinkAPIDispatch.cpp:35:10: error: unused variable 'res' [-Werror=unused-variable]

gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'DWORD' [-Werror=format]
gstwasapiutil.c:733:3: error: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'guint64' [-Werror=format]

kshelpers.c:446:3: error: missing braces around initializer [-Werror=missing-braces]
kshelpers.c:446:3: error: (near initialization for 'known_property_sets[0].guid.Data4') [-Werror=missing-braces]
2019-02-06 00:10:28 +05:30
Sebastian Dröge 822abde8a4 decklinkvideosink: Don't forget to unref clock after usage
And don't unref a clock that is potentially NULL.
2019-01-02 17:39:19 +02:00
Sebastian Dröge c47fac42cd decklinkvideosink: Fix support for raw CEA608 input and add support for raw CEA708 input
The former was only considering the first byte pair, for the latter we
have to convert raw CEA708 cc_data into CDP.
2018-12-19 00:20:26 +02:00
Sebastian Dröge 48f48cc4ba closedcaption: Replace GST_VIDEO_CAPTION_TYPE_CEA608_IN_CEA708_RAW with CEA608_S334_1A
As a side-effect we can now actually store the line offset in the
line21dec element, and have to perform fewer transformations in the
decklink elements (which were also buggy as they assumed a single byte
triplet per meta).
2018-12-15 21:31:28 +00:00
Matthew Waters 59c5ae2817 decklink: calculate the decklink output time from the internal clock
Fixes the time calculations when dealing with a slaved clock (as
will occur with more than one decklink video sink), when performing
flushing seeks causing stalls in the output timeline, pausing.

Tighten up the calculations by relying solely on the internal time
(from the internal clock) for determining when to schedule display
frames instead attempting to track pause lengths from the external
clock and converting to internal time.  This results in a much easier
offset calculation for choosing the output time and ensures that the
clock is always advancing when we need it to.

This is fixup to the 'monotonically increasing output timestamps' goal
in: bf849e9a69
2018-12-12 13:29:32 +11:00
Jordan Petridis 1f562870ee Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 14:18:26 +00:00
Matthew Waters d67d866eb9 decklink: fixup internal time tracking over buffering pauses
Instead of relying on buffers after a state change to PLAYING to always start
from 0, track the amount of time we have spent outside playing but not changed
state to PAUSED.
2018-11-26 17:57:45 +11:00
Sebastian Dröge 1d0d395b5c decklinkvideosink: Cast result of bitwise-or of multiple enum values to the enum again
In C++ the bitwise-or results in an int, and ints are not implicitely
cast to enums.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/25#note_78122
2018-11-13 10:02:57 +02:00
Sebastian Dröge 96490b83a4 decklinkvideosink: Add support for outputting closed captions 2018-11-12 14:10:03 +00:00
Sebastian Dröge 2d0243fc68 decklinkvideosrc: Search from line 1 again if we didn't find closed captions at the same line as before 2018-11-07 16:07:25 +00:00
admin 8af8fd62dd decklinkvideosink: fix segfault when audiosink is closed before videosink 2018-11-06 17:19:16 +00:00