Commit graph

83 commits

Author SHA1 Message Date
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
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
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
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
Joshua M. Doe
1a360a1c65 decklinkvideosrc: respect pixel format property even if mode is set to auto
Before this patch, if mode=auto and video-format!=auto, video-format would
always be ignored, and get set to 8bit-yuv, or if detected to be RGB444, then
it would be set to 8bit-argb. This change respects video-format if it is set
to 10bit-yuv (v210) or 8bit-bgra, even when mode=auto.

Closes #772
2018-11-05 08:52:11 -05:00
Sebastian Dröge
3d8a0b8996 decklinkvideosrc: Add support for extracing CEA608 according to S334-1 Annex A
https://bugzilla.gnome.org/show_bug.cgi?id=797363
2018-11-01 19:21:47 +02:00
Vivia Nikolaidou
4ca76e0c12 decklink: Only use drop-frame flag for 29.97 and 59.94 FPS
Otherwise it can cause errors in gstvideotimecode.c because drop-frame
is not defined for any other frame rate (e.g. 24000/101)

https://blog.frame.io/2017/07/17/timecode-and-frame-rates/

https://bugzilla.gnome.org/show_bug.cgi?id=797037
2018-08-28 15:23:48 +03:00
Vivia Nikolaidou
31aafdbea5 decklink: Fix crash with closed-captions signal and 10-bit input
Only free the parser if there is one. If the format hadn't changed but
had always been 10-bit, there might genuinely be no parser.

https://bugzilla.gnome.org/show_bug.cgi?id=796030
2018-05-11 17:39:35 +03:00
Vivia Nikolaidou
752d2bb6e3 decklinkvideosrc: Don't check for closed captions when there's no signal
Otherwise the gst_decklink_video_format_from_type() call spams the logs
with one "Unknown pixel format 0x0" line per frame.
2018-05-11 16:42:08 +03:00
Edward Hervey
44390d9d1d decklinkvideosrc: Add support for extracting Closed Caption
If the "output-cc" property is set to TRUE and there is CC present
in the VBI Ancillary Data, they will be extracted and set on the
outgoing buffer as GstVideoCaptionMeta.

Only CDP packets are supported.

https://bugzilla.gnome.org/show_bug.cgi?id=773863
2018-04-23 16:16:06 +02:00
Vivia Nikolaidou
a3a7d2e0ff decklink: Detect gaps on incoming stream times, issue warnings
When we receive a video or audio buffer, we calculate the next stream
time based on the current stream time + buffer duration. If the next
buffer's stream time is after that, we issue a warning.

This happens because the stream time incoming from Decklink should be
really constant and without gaps. If there is a gap, it means that
something went wrong, e.g. the internal buffer pool is empty (too many
buffers queued up downstream).

https://bugzilla.gnome.org/show_bug.cgi?id=781776
2018-01-04 15:43:17 +02:00
Vivia Nikolaidou
42a03a8124 Revert "WIP: Revert "Revert "decklink: Detect gaps on incoming stream times, issue warnings"""
This reverts commit 8dceeb5ccd.
2018-01-04 15:41:51 +02:00
Vivia Nikolaidou
8dceeb5ccd WIP: Revert "Revert "decklink: Detect gaps on incoming stream times, issue warnings""
This reverts commit 07819afda4.
2018-01-04 13:54:37 +02:00
Vivia Nikolaidou
71bfbce84d decklink: Remove unused "bflags" variable
We are ignoring all its flags anyway, so let's remove it altogether.
2017-11-09 12:08:35 +02:00
Vivia Nikolaidou
5ab660c4e2 decklink: Ignore some driver-set timecode flags
The "fields" flag is ignored because currently GStreamer doesn't support
having only top or only bottom fields inside a frame. The "drop frame"
flag is ignored because some occurrences have been spotted where it
wasn't set while it should have been. In practice, when we have 29.97 or
59.94 FPS, it's always drop-frame.

https://bugzilla.gnome.org/show_bug.cgi?id=790112
2017-11-09 11:55:13 +02:00
Vivia Nikolaidou
07819afda4 Revert "decklink: Detect gaps on incoming stream times, issue warnings"
This reverts commit c1294e10f9.

Was not ready to be pushed yet.
2017-11-07 21:12:42 +02:00
Vivia Nikolaidou
c1294e10f9 decklink: Detect gaps on incoming stream times, issue warnings
When we receive a video or audio buffer, we calculate the next stream
time based on the current stream time + buffer duration. If the next
buffer's stream time is after that, we issue a warning.

This happens because the stream time incoming from Decklink should be
really constant and without gaps. If there is a gap, it means that
something went wrong, e.g. the internal buffer pool is empty (too many
buffers queued up downstream).

https://bugzilla.gnome.org/show_bug.cgi?id=781776
2017-11-07 16:45:52 +02:00
Sebastian Dröge
a563cbbc1c decklink: Add read-only property to read the device serial number
https://bugzilla.gnome.org/show_bug.cgi?id=788510
2017-10-18 12:33:28 +02:00
Vivia Nikolaidou
0355bb7c34 decklink: Print one "dropped N old frames" message, not one per frame
If we drop many frames at once, printing one message per video frame and
one per audio packet would cause a lot of disk IO. Just print a total at
the end.

https://bugzilla.gnome.org/show_bug.cgi?id=788780
2017-10-11 19:29:26 +03:00
Sebastian Dröge
350c56dab4 decklinkaudio/videosrc: Put hardware reference timestamp in a reference timestamp meta
This can be useful to know on multi-channel cards which frames from
different channels were captured at the same time.
2017-09-28 13:55:18 +03:00
Nirbheek Chauhan
ca8c63080f decklink: Fix format specifier warnings in logging v2
HRESULT is unsigned long on Windows, but the Decklink headers define
it to 'int' on Linux. Confusingly, the defines that talk about the
possible return values for it use long constants. The easy fix would
be to change the linux/LinuxCOM.h header, but that's copied from the
decklink SDK.

Change the logging to always upcast to unsigned long while printing
HRESULT for consistency across platforms.
2017-07-19 04:19:34 +05:30
Nirbheek Chauhan
2fac6fa6a6 decklink: Fix format specifier warnings in logging
gstdecklinkvideosrc.cpp:425:7: warning: format '%x' expects argument of type 'unsigned int', but argument 8 has type 'HRESULT {aka long int}' [-Wformat]

[and so on]
2017-07-19 02:27:48 +05:30
Sebastian Dröge
f0b1b97b25 decklink: Make timestamp reference specifier driver specific 2017-06-07 17:50:09 +03:00
Sebastian Dröge
5dc1039937 decklinkvideo/audiosrc: Add GstReferenceTimestampMeta with the stream time to each buffer
This is basically a frame counter provided by the driver and it's
advancing at the speed of the HDMI/SDI input. Having this available on
each buffer allows to know what constant-framerate-based timestamp each
frame is corresponding to and can be used e.g. to write out files
accordingly without having the local pipeline clock timestamps used.

https://bugzilla.gnome.org/show_bug.cgi?id=779213
2017-05-12 11:42:00 +02:00
Nirbheek Chauhan
b63fb59a11 Revert "decklink: Fix debug logging warnings on Windows"
This reverts commit 845832263b.

The commit broke cross-mingw CI:
https://ci.gstreamer.net/job/GStreamer-master/8659/console

It seems that cross-mingw on Autotools and native-mingw on Meson
disagree about the size of HRESULT. Revert for now till I can
investigate the Meson side of things some more.
2017-05-05 18:52:24 +05:30
Nirbheek Chauhan
845832263b decklink: Fix debug logging warnings on Windows
HRESULT is unsigned long int, not unsigned int
2017-05-05 17:49:22 +05:30
Sebastian Dröge
0a4717ea20 Revert "decklinkvideo/audiosrc: Add GstReferenceTimestampMeta with the stream time to each buffer"
This reverts commit d5684d5b14.

This shouldn't have been merged before 1.12.
2017-04-19 19:08:41 +01:00
Sebastian Dröge
d5684d5b14 decklinkvideo/audiosrc: Add GstReferenceTimestampMeta with the stream time to each buffer
This is basically a frame counter provided by the driver and it's
advancing at the speed of the HDMI/SDI input. Having this available on
each buffer allows to know what constant-framerate-based timestamp each
frame is corresponding to and can be used e.g. to write out files
accordingly without having the local pipeline clock timestamps used.

https://bugzilla.gnome.org/show_bug.cgi?id=779213
2017-04-19 19:06:37 +01:00
Sebastian Dröge
d53da45886 decklink: Use GstQueueArray instead of GQueue
Let's save two allocations and frees per frame.
2017-03-24 14:26:39 +02:00
Georg Lippitsch
7ee593e493 decklinkvideosrc: Add read-only "signal" property
https://bugzilla.gnome.org/show_bug.cgi?id=780367
2017-03-22 15:17:30 +02:00
Sebastian Dröge
4cdd234add decklink: Fix indentation 2017-01-31 14:56:34 +02:00
Vivia Nikolaidou
3cb43f35b8 decklinkvideosrc: Do not append a zero timecode if none is found on the source
If the source doesn't give us timecode information, do not append a zero
timecode to the frames.

https://bugzilla.gnome.org/show_bug.cgi?id=776900
2017-01-09 18:37:50 +02:00
Sebastian Dröge
e31714691a decklink: Fix indentation 2017-01-03 17:31:03 +02:00
Sebastian Dröge
fdf1a57953 decklink: Correctly set top-field-first/bottom-field-first
First of all, all the HD and UHD modes should be top-field-first, as
also returned by the Decklink mode iterator API.

Then we should include the caps field "field-order" in the caps of the
source (not the sink due to negotiation problems with optional fields).

And finally we should set the TFF flag on interlaced buffers that are
top-field-first.
2016-11-28 17:19:26 +02:00
Sebastian Dröge
aec46143bb decklinksrc: Add property to drop frames that are marked as having no input signal
https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
331b2af050 decklinksrc: Add property to skip the first N seconds of capture
On some hardware the first few frames are bogus and not very useful.
Their timestamps are off, they have no timecodes, or there are spurious
black frames / no-signal frames. After a few frames this stabilizes
though.

https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
cf224a9990 decklinksrc: Set GAP flag on buffers that are captured without signal
https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
09dd64bb4f decklinksrc: Keep track of a window of capture/stream time mappings and calculate relationship
Based on this we calculate the actual capture time, which should get us
rid of any capturing jitter by averaging it out.

Also add a output-stream-time property which forces the elements to
output the stream time directly instead of doing any conversion to the
pipeline clock. Use with care.

https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
881a08671e decklinksrc: Stop using the "hardware" timestamps and directly use the pipeline clock
The hardware timestamps have no relation to when frames were produced,
only when frames arrived somewhere in the hardware. Especially there is
no guarantee that audio and video will have the same hardware timestamps
although they belong together, and even more important: the rate with
which the hardware timestamps increase is completely unrelated to the
rate with which the frames are captured!

As such we can as well use the pipeline clock directly and stop doing
complicated calculations. Also as a side effect this allows now running
without any pipeline clock, by directly making use of the stream times
as reported by the driver.

https://bugzilla.gnome.org/show_bug.cgi?id=774850
2016-11-28 14:27:51 +02:00
Sebastian Dröge
2a66653bdc decklinkvideosrc: Free timecodes when done with a frame 2016-11-24 14:48:52 +02:00
Vivia Nikolaidou
85ef4166a2 decklinkvideosrc: Issue "no signal" warnings
When a frame is found to not have an associated input source (cable
unplugged, wrong mode selected), an element warning will be issued. When
the next frame in the stream is found to have an input source selected
(e.g. cable replugged), an element info will be issued.

https://bugzilla.gnome.org/show_bug.cgi?id=774629
2016-11-17 18:40:42 +02:00
Sebastian Dröge
ac37bdb9ac decklink: Use gst_clock_adjust_with_calibration() and unadjust_with_calibration()
Instead of hand-crafted versions of the same calculation. These
calculations are still too complicated though.
2016-11-02 15:00:36 +02:00
Sebastian Dröge
f9a8b843df decklink: Print the Decklink API error return values in debug output in all places 2016-09-21 09:31:41 -04:00
Sebastian Dröge
fcea134ec4 decklink: Fix-up last commit that was not meant to be pushed yet 2016-09-01 14:25:58 +03:00
Sebastian Dröge
d8327b397d decklink: Require a clock when going from PAUSED_TO_PLAYING and don't crash if there is none
Also when going from PLAYING_TO_PAUSED, the clock might've been unset in the
meantime, e.g. because the element was removed from its surrounding bin.
2016-09-01 14:17:48 +03:00
Vivia Nikolaidou
8faa36e105 decklinkvideosrc: Add support for GstVideoTimeCode
The timecode will be fetched from the decklink source and attached to the
video buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 19:08:27 +03:00