See #2611
When transitioning to PLAYING we call IDeckLinkInput::StartStreams() (via GstDecklinkInput::start_streams). This can
fail for various reasons, including if the hardware device is already in use.
Previously, we logged StartStreams() failure as an element error but otherwise continued to successfully transition to
PLAYING. Now, if StartStreams() returns an error we fail the state change.
If StartStreams() fails then a subsequent call to StopStreams(), when transitioning PAUSED to READY, will also fail.
Previously, if StopStreams() failed then the state change also failed. Unfortunately this prevented the element from
later being disposed, which in turn meant the associated hardware resources was never freed. Consequently, if a
decklinkvideosrc failed to transition PAUSED to READY, then the associated hardware device could not subsequently be
used by any other decklinkvideosrc.
Now, we log an element error if StopStreams() fails but otherwise consider the state change to have succeeded. This
means that the element can be disposed and the associated hardware resource released.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9578>
In a previous version of the clock time conversion code, scheduled playback used
to be started (from 0) when transitioning to PLAYING and stopped when
transitioning PLAYING->PAUSED. This worked fine when converting running times
using the internal clock. However, now the decklink clock will produce values
that are monotonically increasing and do not reset to 0 at the same moments as
running time anymore. This means that the clock adjustments could attempt to
convert a small running time based on a large clock time e.g. after pausing
for many hours. As the adjustment code is a simple linear interpolation based on
the current clock times (large) using the provided value (small), the small
differences in the rate could result in very large differences in the
output time.
Fix by instead using both internal and external clock times based on the values
that gst_clock_get_calibration() will return. By doing so, small changes in the
rate calculations between the internal and external clock times will not result
in potentially large differences in the output internal time from
gst_clock_unadjust_with_calibration().
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4197
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9267>
When iterating through output devices, video_input_caps was being
updated instead of video_output_caps.
As a result, video output devices were being created with an empty caps object
and `gst-device-monitor-1.0 Video/Sink` would produce no decklink devices.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8298>
Some file format standards don't require mastering-display-info
and content-light-level values to be provided.
Decklink however requires the static HDR metdata for the PQ transfer
function which we may not have.
CTA-861-G mentions that in this case, 0 may provided as an 'unknown'
value which is what we use here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7742>
Should fix auto-generated follow-up sections like "Hierarchy" or
"Factory details" to be listed under the element name in the
table-of-contents of the document, instead of a stand-alone
"Duplex-Mode" section.
Also cleanup some spurious colon suffix after section names.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5625>
The order of the devices iterator from the SDK is undefined and can
randomly change.
Keep the device-number property for backwards compatibility and
simplicity but prefer the persistent-id property and also use it for the
device provider implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3078>