Commit graph

371 commits

Author SHA1 Message Date
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
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
Matthew Waters
17f0271aa0 decklinkvideosink: fix build
../sys/decklink/gstdecklinkvideosink.cpp:1006:11: error: ‘GstDecklinkVideoSink {aka struct _GstDecklinkVideoSink}’ has no member named ‘scheduled_stop_time’
     self->scheduled_stop_time = start_time;
           ^
2018-09-12 22:38:56 +10:00
Matthew Waters
946cbbccc1 decklink: wait for stop with a timeout
Decklink sometimes does not notify us through the callback that it has
stopped scheduled playback either because it was uncleanly shutdown
without an explicit stop or for unknown other reasons.

Wait on the cond for a short amount of time before checking if scheduled
playback has stopped without notification.

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:17:13 +10:00
Matthew Waters
bf849e9a69 decklink: start scheduled playback in paused
This is part of a much larger goal to always keep the frames we schedule to
decklink be always increasing.  This also allows us to avoid using both the
sync and async frame display functions which aren't recomended to be used
together.

If the output timestatmsp is not always increasing decklink seems to hold
onto the latest frame and may cause a flash in the output if the played
sequence has a framerate less than the video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).

https://bugzilla.gnome.org/show_bug.cgi?id=797130
2018-09-12 21:16:27 +10:00
Matthew Waters
87077d20de decklinkaudiosink: fix debug string copy-paste error
Stopping != Starting
2018-09-12 20:37:47 +10: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
Nirbheek Chauhan
5177f7c7ee meson: host_system is 'ios' when building for iOS
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 04:07:24 +05:30
Nirbheek Chauhan
b55dfb5313 Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30
Matthew Waters
a9b40eebc0 decklink: keep the internal time we send to decklink always increasing
Otherwise decklink seems to hold onto the latest frame and may cause a
flash in the output if the played sequence has a framerate less than the
video output.

Scenario is play for N seconds, pause, flushing seek to some other position,
play again.  Each of the play sequences would normally start at 0 with
the decklink time.  As a result, the latest frame from the previous sequence
is kept alive waiting for it's timestamp to pass before either dropping
(if a subsequent frame in the new sequence overrides it) or displayed
causing the out of place frame to be displayed.

This is also supported by the debug logs from the decklink video sink
element where a ScheduledFrameCompleted() callback would not occur for
the frame until the above had happened.

It was timing related as to whether the frame was displayed based
on the decklink refresh cycle (which seems to be 16ms here),
when the frame was scheduled by the sink and the difference between
the 'time since vblank' of the two play requests (and thus start times
of scheduled playback).
2018-07-10 21:22:04 +10:00
Nirbheek Chauhan
dd3e7325b0 decklink: Fix warning about HRESULT not being unsigned int 2018-06-20 11:38:17 +05:30
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
Xavier Claessens
83d0623293 Meson: Generate pc file for all plugins in bad
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:08:09 +01: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
Nirbheek Chauhan
29c785ef28 decklink: Fix MinGW warnings due to MSVC-specific pragmas
https://bugzilla.gnome.org/show_bug.cgi?id=794652#c7
2018-03-31 11:16:38 +05:30
Nirbheek Chauhan
90f6e6c097 decklink: Use g_thread_new instead of g_thread_create
It's deprecated, and causes a build failure in Cerbero because we pass
-DG_DISABLE_DEPRECATED.
2018-03-27 12:51:19 +05:30
Takeshi Sato
beab2ee4dc decklink: fix initialization fails in windows binary
There is no log of gst_decklink_com_thread () which initializes COM.
The initialization part is not valid with #ifdef MSC_VER.
Windows binaries are built with gcc.
As with other codes, it was avoidable by setting it to G_OS_WIN32
instead of MSC_VER.

https://bugzilla.gnome.org/show_bug.cgi?id=794652
2018-03-27 12:04:05 +05:30
Edward Hervey
b3ca3e977c decklink: Fix array of devices usage
We need to allocate actual Device structures since we are going
to be setting callbacks with address to that structure

https://bugzilla.gnome.org/show_bug.cgi?id=777239
2018-02-14 16:00:34 +01:00
Tim-Philipp Müller
2a40ab6ad6 decklink: don't crash if there are no decklink devices
Fixes generic/states check.
2018-01-23 14:49:51 +00:00
Tim-Philipp Müller
9bb905620c decklink: don't limit number of devices to 16
There is no fixed limitation for the number of devices on the
decklink API side according to BlackMagic. Many PC motherboards
are able support 6 decklink cards each with up to 8 inputs so
a limit of 16 might well be too low.

https://bugzilla.gnome.org/show_bug.cgi?id=777239
2018-01-23 14:14:35 +00:00
Vivia Nikolaidou
b5ff71fc3c decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing
Sometimes we might get an audio packet without a corresponding video
frame. In these cases, the stream and hardware reference timestamps
would be missing, because they're called on the video frame. Instead of
potentially breaking stuff downstream that might depend on these, we now
extrapolate them.

https://bugzilla.gnome.org/show_bug.cgi?id=792042
2018-01-04 15:51:16 +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
8ee1534b80 Revert "decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing"
This reverts commit 6af863916a.
2018-01-04 15:41:44 +02:00
Vivia Nikolaidou
6af863916a decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing
Sometimes we might get an audio packet without a corresponding video
frame. In these cases, the stream and hardware reference timestamps
would be missing, because they're called on the video frame. Instead of
potentially breaking stuff downstream that might depend on these, we now
extrapolate them.

https://bugzilla.gnome.org/show_bug.cgi?id=792042
2018-01-04 13:54:37 +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
Sebastian Dröge
2b8f82f929 decklinkaudiosink: Start audio pre-rolling if the output is not started yet in render()
This seems to allow to schedule audio samples correctly at their right
times already.

https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
011649790d decklinkvideosink: Only start if both sinks are set to PLAYING already
Not only if the video sink is set to PLAYING so far. Also give more
useful debug output about why we don't start, and don't start if already
started.

Also refactor the function to early-return instead of having a huge
if-else block over the whole function.

https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
a38cf7d8a9 decklinkaudiosink: Include final flow return in debug output
https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
3e70f00209 decklinkaudiosink: Check also against the clock if we run ahead of the clock too much
The buffer level as reported by the Decklink driver is completely
unreliable, and we could otherwise easily run ahead >1s if we're
unlucky.

https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
118b2967e7 decklinkaudiosink: Implement resampling/buffer reversing for trick-modes
https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
86888d9918 decklinkaudiosink: Re-implement around GstBaseSink instead of GstAudioBaseSink
The Decklink and GstAudioBaseSink APIs don't fit very well together,
which causes various problems due to inaccuracies in the clock
calculations and the actual ringbuffer and GStreamer's copy getting of
sync.

Problems are audio drop-outs and A/V sync getting wrong after
pausing/seeking.

https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-14 10:37:20 +02:00
Sebastian Dröge
02e4d92cbf decklinkvideosink: Wait until scheduled playback is actually stopped before continuing
Otherwise we might "start" again, just to get finally stopped and then
getting errors all over the place.

https://bugzilla.gnome.org/show_bug.cgi?id=790114
2017-12-06 19:38:55 +02:00
Sebastian Dröge
e2c8afa261 decklinkvideosink: Print "Starting" instead of "Stopping" when starting 2017-11-22 17:22:03 +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
bae9427dc1 decklink: Don't crash when getting hw serial number doesn't return OK
If the return value isn't OK, it means we might be getting data that
points to an invalid memory address. That shouldn't make us crash.
2017-11-09 00:19:42 +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
Sebastian Dröge
980ddfdfb7 decklink: Free the correct memory in our own buffer pool
The buffer itself is 128 bytes into the allocated memory area, to be
able to store the size and other metadata before it. Freeing the buffer
directly will make malloc moderately unhappy.
2017-09-21 14:40:06 +03:00
Dave Johnstone
0cd1bf13e8 decklinkvideosink: Add support for Decklink hardware keying
Add two properties (keyer-mode and keyer-level) to control the built-in hardware keyer of Decklink cards.

https://bugzilla.gnome.org/show_bug.cgi?id=773660
2017-08-15 11:09:37 +03:00
Sebastian Dröge
571c8bc1ff decklink: Fix indentation 2017-08-02 19:07:35 +03:00
Georg Lippitsch
a205338082 decklinksrc: Raise limit of devices to 16
https://bugzilla.gnome.org/show_bug.cgi?id=785694
2017-08-01 10:22:58 -04:00
Nirbheek Chauhan
a163dff91d decklink: Fix building with MSYS2's MinGW
Reported and tested by Philippe Renon.

https://bugzilla.gnome.org/show_bug.cgi?id=784943
2017-07-20 19:18:28 +05:30
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
3fd4249a1d decklink: Fix CI failure due to missing WINAPI definition
WINAPI is for the windows calling convention to use, and should expand
to nothing on Linux.

https://build.gnome.org/continuous/buildmaster/builds/2017/07/18/76/build/log-gst-plugins-bad.txt
2017-07-19 04:14:13 +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
Nirbheek Chauhan
0084bfccc9 decklink: Fix build on mingw32 by adding missing WINAPI
gstdecklinkaudiosink.cpp:155:19: error: conflicting type attributes specified for 'virtual HRESULT GStreamerAudioOutputCallback::QueryInterface(const IID&, void**)'
In file included from /var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include/objbase.h:153:0,
                 from /var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include/ole2.h:16,
                 from /var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include/windows.h:94,
                 from /var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include/rpc.h:16,
                 from win/DeckLinkAPI.h:27,
                 from gstdecklink.h:35,
                 from gstdecklinkaudiosink.h:27,
                 from gstdecklinkaudiosink.cpp:25:
/var/lib/jenkins/workspace/cerbero-cross-mingw32/workdir/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include/unknwn.h:67:25: error:   overriding 'virtual HRESULT IUnknown::QueryInterface(const IID&, void**)'

(and many more)

https://ci.gstreamer.net/job/cerbero-cross-mingw32/6407/console
2017-07-19 02:27:29 +05:30
Nirbheek Chauhan
528ae2c15d decklink: Add autotools support on Windows
Also add a missing windows file to EXTRA_DIST

https://bugzilla.gnome.org/show_bug.cgi?id=784943
2017-07-14 17:21:13 +05:30
Georg Lippitsch
f0c7fbb371 decklinkvideosrc: Add custom memory allocator
The default memory allocator of the decklink library allocates
a fixed pool of buffers, and the number of buffers is unknown.
This makes it impossible do useful queuing downstream. The new
memory allocator can create an unlimited number of buffers,
giving all queuing features one would expect from a live source.

https://bugzilla.gnome.org/show_bug.cgi?id=782556
2017-07-11 14:26:31 +03:00
Sebastian Dröge
f0b1b97b25 decklink: Make timestamp reference specifier driver specific 2017-06-07 17:50:09 +03:00
Sebastian Dröge
c40b8a894d decklink: Sink the clock reference in the constructor
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +03:00
Nicolas Dufresne
4261692187 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Sebastian Dröge
7d64bb7513 decklinkvideosink: Copy min(gstreamer_stride, decklink_stride) per line
Instead of just bpp * width, which might be more than we can copy.
2017-05-15 16:38:51 +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
Sebastian Dröge
4df6be45f0 decklinkaudiosrc: Consistently pass stream_time and stream_duration to audio/video src
It's the same value now, pass it consistently.
2017-05-12 11:36:27 +02:00
Sebastian Dröge
28a16b5e94 decklink: Always use the video stream time for audio too
The audio packet times can be completely unrelated to the video stream
time, depending on the card. While this looks like a bug in the driver,
just always using the video stream time (which is correct) works as a
workaround for now.
2017-05-10 17:02:28 +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
8865b440d9 decklink: Fix linking on MinGW
MinGW does not provide comsupp.lib, so there's no implementation of
_com_util::ConvertBSTRToString. Use a fallback implementation that
uses wcstombs() instead.

On MinGW we also truncate the name to 100 chars which should be fine.
2017-05-05 17:49:22 +05:30
Nirbheek Chauhan
3d4c428e41 decklink: Fix building on Windows
BSTR is already a pointer to a string
2017-05-05 17:49:22 +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
Nirbheek Chauhan
e8e639081a meson: Fix decklink building on Windows
Needs comsuppw, and does not need libdl or pthread.
2017-05-05 17:49:21 +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
Tim-Philipp Müller
0ded4c1356 meson: decklink: fix meson configure error on macOS
"meson encountered an error in file
sys/decklink/meson.build, line 33, column 2:
Invalid use of addition: must be str, not list"

Also remove nonsensical linker flags on windows.

https://bugzilla.gnome.org/show_bug.cgi?id=781156
2017-04-11 09:43:53 +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
ce4df5311b decklinkvideosink: Don't error out if displaying the preroll frame fails
This seems to happen sometimes on some hardware, and is not really
critical as long as the scheduling of the normal frames works fine.

Only post a warning message for this case.
2017-03-01 12:08:58 +02:00
Sebastian Dröge
2ab19144be decklinkvideosink: Show video frames synchronously in PAUSED
Otherwise we will only show the preroll frame once PLAYING is reached,
which is rather suboptimal for e.g. seeking in PAUSED.
2017-02-01 17:11:37 +02:00
Sebastian Dröge
8d723c5fe1 decklinkvideosink: Do nothing if set_caps() is called with basically the same caps again
and error out here already otherwise. We currently don't support
reconfiguration here and it can't happen really either unless the auto
mode is selected.
2017-02-01 16:45:53 +02:00
Vivia Nikolaidou
21a9a89851 decklinkaudiosrc: Fix get_caps returning EMPTY
If get_caps is called before negotiation, channels_found will be 0 and
therefore won't intersect with the template caps.

https://bugzilla.gnome.org/show_bug.cgi?id=778028
2017-02-01 15:17:33 +02:00
Sebastian Dröge
dd4f14fd68 decklink: Add to the meson Windows build 2017-01-31 14:56:34 +02:00
Sebastian Dröge
4cdd234add decklink: Fix indentation 2017-01-31 14:56:34 +02:00
Sebastian Dröge
861cb49895 decklink: Fix compilation on Windows by properly using COM strings there 2017-01-31 14:56:34 +02:00
Axel Menzel
f784fda162 decklink: Fix compilation with MSVC 2017-01-31 14:56:34 +02:00
Sebastian Dröge
97be9446f5 decklink: Include stdint.h for int32_t, etc as needed by the Decklink headers 2017-01-31 14:56:34 +02:00
Sebastian Dröge
858e7b28d3 decklink: Add "extern C" forward declaration for CreateDeckLinkIteratorInstance() 2017-01-31 14:56:34 +02:00
Axel Menzel
dcacb99aaf decklink: Update Windows SDK to a newer version 2017-01-31 14:56:34 +02:00