Commit graph

2758 commits

Author SHA1 Message Date
Sebastian Dröge
571c8bc1ff decklink: Fix indentation 2017-08-02 19:07:35 +03:00
George Kiagiadakis
58e2b2ef1c ipcpipeline: don't use g_steal_pointer; it's not in the current required version of GLib
We depend on GLib 2.40, g_steal_pointer was introduced in 2.44.

https://bugzilla.gnome.org/show_bug.cgi?id=785698
2017-08-02 10:46:46 +03:00
George Kiagiadakis
30f5abc32c ipcpipeline: move to sys/ and make it dependent on platform support for unix sockets 2017-08-02 10:40:24 +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
Haihua Hu
db07f4507d kmssink: support videooverlay interface
Implement videooverlay interface in kmssink, divided into two cases:
when driver supports scale, then we do refresh in show_frame(); if
not, send a reconfigure event to upstream and re-negotiate, using the
new size.

https://bugzilla.gnome.org/show_bug.cgi?id=784599
2017-07-31 20:04:15 +02:00
Guillaume Desmottes
2d67189073 kmsallocator: add driver pitch support for planar formats
We used to to handle the driver pitch only for single plan video format.
Add support for multi planes format by re-using the extrapolate function
from the v4l2 element.
Also use this pitch to calculate the proper offsets.

Prevent DRM drivers to pick a slow path if the pitches/offsets don't
match the ones it reported.

https://bugzilla.gnome.org/show_bug.cgi?id=785029
2017-07-25 09:21:16 -04:00
Guillaume Desmottes
f9379b51b6 kmsallocator: inline gst_kms_allocator_alloc_empty()
No semantic change, just renamed the 'tmp' variable to a more meaningful
name and to use the same structure as in gst_kms_allocator_bo_alloc().

Needed as I'm going to move the gst_memory_init() call after the
allocation of the DUMB buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=785029
2017-07-25 09:21:16 -04:00
Nicolas Dufresne
3e0db49f5b d3dsinkwrapper: Make the DLL name match the plugin name
Otherwise, since 1.12, the plugin gets blacklisted.

https://bugzilla.gnome.org/show_bug.cgi?id=785168
2017-07-20 10:45:32 -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
Alessandro Decina
6e3f493a96 meson: fix potentially undefined shm_deps variable 2017-07-20 18:52:19 +10: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
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
Reynaldo H. Verdejo Pinochet
43335d31c6 dvb: src: consolidate tuning stats gathering
Additionally: drop unneeded fe_fd variable.
2017-07-14 14:16:46 -07:00
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
Philippe Renon
db36718ee4 directsoundsrc: Properly pass pLockedBuffer by reference when calling IDirectSoundCaptureBuffer_Lock
https://bugzilla.gnome.org/show_bug.cgi?id=784755
2017-07-11 09:12:48 +03:00
Víctor Manuel Jáquez Leal
c538942b0d kmssink: initialize variable
Otherwise clang complains:

gstkmssink.c:1192:7: warning: variable 'buf' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
2017-07-10 13:32:49 +02:00
Nicolas Dufresne
0a0bc8ab94 kmssink: Track cached kmsmem and clear them on drain
In this patch we keep track of the cached kmsmem in a way
that we can clear the cache during the drain process. This
release the framebuffer before waiting for the next vblank,
hence add support for DRM driver (like Intel one) that release
the associated DMABuf reference asynchronously.

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Nicolas Dufresne
98b91d09c2 kmssink: Move kmsmem cache code higher
This will be needed as this API will be used elsewhere to clear
the cache.

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Nicolas Dufresne
b8c5a4c9ed kmssink: drop last rendered buffer on ALLOCATION and DRAIN queries
kmssink keeps a reference on the last rendered buffer. If this buffer
refers to an upstream buffer, it should be should be released on DRAIN
and ALLOCATION queries so all upstream buffers can be returned to the
pool if needed. As the buffer may be used for scanout, we copy this
buffer into a dumb buffer prior to let it go.

Based on patch from Guillaume Desmottes <guillaume.desmottes@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Nicolas Dufresne
cfadd5a936 kmssink: Don't leak GEM primed from DMABuf
This otherwise breaks DMABuf reclaiming. This is not visible from
userspace, but inside the kernel, the DRM driver will hold a ref to the
DMABuf object. With a V4L2 driver allocating those DMABuf, it then
prevent changing the resolution and re-allocation new buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Nicolas Dufresne
6e3fe4eaab kmssink: Factor out copying to dump buffer
This will be used to copy any upstream memory in order to return it on
resolution change, allocation query or drain query.

https://bugzilla.gnome.org/show_bug.cgi?id=782774
2017-07-07 14:36:38 -04:00
Tim-Philipp Müller
c29843dc94 meson: msdk: use python3 from python3 module 2017-07-07 12:28:14 +01:00
Reynaldo H. Verdejo Pinochet
2d511343cb dvb: src: use correct unit in tuning-timeout prop description
Milliseconds was wrong and made use of this timeout quite
confusing. The code uses the value as microsenconds so
any meaningful number was off by orders of magnitude.
2017-06-28 16:40:50 -07:00
Per-Erik Brodin
3223d605bf nvdec: Use qdata on memory instead of buffer meta
Using a meta can be problematic since the memory contained in the buffer
can be transferred to a new buffer in which case the meta would be lost.

https://bugzilla.gnome.org/show_bug.cgi?id=784235
2017-06-28 10:15:52 +03:00
Per-Erik Brodin
ab9d87f168 nvdec: New plugin for NVIDIA hardware video decode
https://bugzilla.gnome.org/show_bug.cgi?id=781537
2017-06-27 08:59:59 +03:00
Nicolas Dufresne
eab6cd8d6d meson: Enable shm unit test 2017-06-21 15:15:37 -04:00
Nicolas Dufresne
af338de2b8 meson: Enable building shm plugin 2017-06-21 13:45:04 -04:00
Nicolas Dufresne
809d313493 shmpipe: Should not use glib type without ifdef
The shmpipe should build without GLIB.
2017-06-21 13:42:31 -04:00
Reynaldo H. Verdejo Pinochet
b09b17365d dvb: src: fix use of wrong array index for tune signal
Erroneous value made "TUNE" overwrite "TUNNING_FAIL" ....
2017-06-16 13:57:49 -07:00
Reynaldo H. Verdejo Pinochet
5ad88a0352 dvb: src: issue warning on failed delsys-vs-parameter issues
Aids in understanding misses with the delsys auto-detection logic
2017-06-16 13:56:40 -07:00
Scott D Phillips
dcd9032d95 msdk: enc: set pts and dts, fix inverted sync_point flag
Set the pts and dts on the frame that we receive from the msdk.
Also fix the inverted logic in setting sync points, previously we
were marking all frames as sync points except IDRs.

https://bugzilla.gnome.org/show_bug.cgi?id=782801
2017-06-07 19:23:28 +03:00
Sebastian Dröge
f0b1b97b25 decklink: Make timestamp reference specifier driver specific 2017-06-07 17:50:09 +03:00
Guillaume Desmottes
d373c4478b kmssink: Add xilinx_drm to the list of drivers
This prevent having to set the driver-name explicitly when running on
Zynq UltraScale+ boards.

https://bugzilla.gnome.org/show_bug.cgi?id=783188
2017-06-05 12:56:03 +02:00
Jan Schmidt
47abc9a09c uvch264src: Apply timestamps to outgoing aux buffers
When extracting an aux buffer from an MJPG carrier, at
*least* put the original timestamp on it, even if we
fail to apply any other timestamp (which we always do
at the moment, because the timestamp calculating code
was never finished). Apply a DTS using the camera
supplied delay value as well, assuming that there's
no re-ordering going on (there isn't in the C920,
which is really the only extant camera doing this
stuff) and a warning if that turns out not to be true.
2017-05-18 17:49:46 +02:00
Sebastian Dröge
732012a78e amcvideodec: Unref downstream caps after usage
https://bugzilla.gnome.org/show_bug.cgi?id=782771
2017-05-18 14:34:46 +03:00
Tim-Philipp Müller
80d66dfec8 Fix up package name and origin in some plugins 2017-05-18 10:58:20 +01:00
Sebastian Dröge
634cd87c76 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:23 +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
Nirbheek Chauhan
8494f1e709 directsoundsrc: Use a GstClockID to wait instead of Sleep()
The main advantage is that our sleeps can be interrupted in case of
an src_reset(). Earlier, we would need to wait for a read to complete
before we could do a reset, which could take a long time.

https://bugzilla.gnome.org/show_bug.cgi?id=781249
2017-05-12 14:51:10 +05:30
Scott D Phillips
b2663e12e4 msdk: Declare libmfx.a as a C++ static library
This lets meson know that the overall plugin needs built with C++
linking.

https://bugzilla.gnome.org/show_bug.cgi?id=781561
2017-05-11 07:17:09 +01: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
1a8610f8f8 directsoundsrc: Use latency-time and buffer-time settings
Earlier, the plugin was ignoring those settings and blindly setting
buffer-time to 2 seconds and latency-time to 200ms, which forced all
pipelines to have a minimum latency of 200ms + sink latency.

The values of segsize and segtotal were also not derived correctly.
Now we obey these values, and you can get close to the previous
behaviour by setting buffer-time and latency-time manually. Note that
they are set in microseconds.

As a consequence, when we haven't received enough data from the
device, we now sleep for a time proportional to the data remaining.
However, Directsound is a deprecated API so it maintains its own
software ringbuffer which updates at arbitrary intervals. Hence we
might have to wait a full segsize to get the last 10% of data. To
avoid tight loops, we clamp our sleep floor at 10ms.

In my testing, this keeps the wakeups not-too-high (proportional to
the latency-time set on the source). Further improvements should be
made by fixing the WASAPI audio source plugin instead of this.
Directsound is deprecated and as the comments explain, it is
impossible to get low latency, decent quality, or good performance
from it.

Based on a patch by Sebastian Dröge <sebastian@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=781249
2017-05-08 16:13:20 +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