Commit graph

110 commits

Author SHA1 Message Date
Stéphane Cerveau 891be51105 gst-plugins: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2110>
2021-04-11 16:16:55 +00:00
Stéphane Cerveau add7878e14 bad: use of g_value_dup_string
Use helper method to get string from GValue.
2019-12-30 14:13:03 +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
Thibault Saunier 47a49f3381 docs: Build documentation with hotdoc 2019-05-13 17:00:00 -04:00
Wim Taymans e098ad4918 rfbdecoder: don't free decoder data
The decoder data is freed when we read more data.
2018-08-16 11:44:27 +02:00
Nicolas Dufresne ede8b1c8ce rfbsrc: Fix decide_allocation to support NULL pool
We were assuming that NULL pool meant that downstream didn't reply.
Update the pool index 0 instead of adding at the end. Otherwise we ended
up letting basesrc decide, which would pick the blocksize as a size
(4096) instead of the image size.

https://bugzilla.gnome.org/show_bug.cgi?id=795327
2018-04-25 15:07:23 -04:00
Nicolas Dufresne 5d1efe7f55 rfbsrc: Fix support for applevncserver
This server uses an unknown 003.889 protocol version. This patch fixes
the version validation in order to simply fallback to 3.3 as suggested
by the spec.
2018-04-25 13:37:12 -04: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
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
Nirbheek Chauhan 42af2d66d8 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Matej Knopp <matej.knopp@gmail.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:35:54 +01:00
Nirbheek Chauhan 7e2b68fe2f plugins: Use stdint.h instead of _stdint.h
_stdint.h is generated by Autotools and we don't really need it. All
supported platforms now ship with stdint.h. The only stickler was MSVC,
and since Visual Studio 2015 it also ships stdint.h now.
2016-08-19 14:42:52 +01:00
Nicolas Dufresne 81960ea853 rfbsrc: Fix fallback to GstVideoBufferPool
The replacement pool need to be added to the query, otherwise the
baseclass won't see it. We also need to properly remove the rejected
pools.

https://bugzilla.gnome.org/show_bug.cgi?id=763441
2016-04-05 21:40:58 -04:00
Nicolas Dufresne 7e293f15dd rfbsrc: Implement decide_allocation virtual
This way we can use the base class for buffer allocation, hence use
fill() instead of create() virtual. This also adds a strict check on the
select pool buffer size as we don't support strides and padding.

This is based on initial patch proposed by Sebastien Dröge, from which I
also fixed a buffer pool leak.

https://bugzilla.gnome.org/show_bug.cgi?id=763441
2016-04-05 21:21:29 -04:00
Nicolas Dufresne d3d34b5a8c rfbsrc: Fix caps negotiation
As we currently only use the server reported "natural" format, caps
negotiation should simply be limited to telling the base class which
format to use. Fix the negotiation by moving the associated code
into negotiate() virtual function. Also, use gst_base_src_set_caps()
rather then setting it on the pad directly. Also protect against this
method being called multiple time (we can't renegotiate for now).

This change also moves some network code that was being run during the
application state change call, to be run on the streaming thread.

https://bugzilla.gnome.org/show_bug.cgi?id=739598
2016-04-05 15:36:31 -04:00
Nicolas Dufresne 52b50d0952 rfbsrc: Implement unlock() method
This prevent stalls when we try to stop the source while waiting
for the server to send more updates.
2016-04-05 13:35:38 -04:00
Nicolas Dufresne 89f3f162a5 rfbsrc: Check for connection being closed
Although it's not very well documented, g_input_stream_read_all() will
set the number of bytes read to 0 if the connection is closed rather
then returning an error.
2016-04-05 13:35:25 -04:00
Nicolas Dufresne 0eb5722af6 rfbsrc: Check for read/write error
Check for read/write error. This prevent undefined behaviour that rely
on unitialized buffer.
2016-04-05 13:35:18 -04:00
Nicolas Dufresne ba93b86011 rfbsrc: Add a internal method to disconnect
This also removes the disconnected boolean hack.
2016-04-05 13:35:11 -04:00
Nicolas Dufresne ff5dc55c8a rfbsrc: Don't ignore errors
This prevents recursion on error. This used to happen as we
don't change the state when something fails. We end up running
and failing in the same state forever.
2016-04-05 13:34:57 -04:00
Nicolas Dufresne 459bdaae3f rfbsrc: Serialize write operations
Currently we send key events from seperate threads. IOStream does not
allow concurrent write operations, so protect this operation using a
mutex.
2016-04-05 13:34:38 -04:00
Nicolas Dufresne c8d2e234c4 rfbsrc: Add 3.7/3.8 security type negotiation 2016-04-05 13:34:34 -04:00
Nicolas Dufresne 21b322c8f3 rfbsrc: Port to GSocketClient
Using GSocketClient we can simplify a lot the read/write operation.
This also provide an GSocketConnection (a GIOStream) which can then
be used with the GTlsClientConnection for secure connections. Note
that we use _write_all() to ensure all bytes have been read. This is
to follow the fact the none of the _send() calls check the return
value.
2016-04-05 13:34:07 -04:00
Nicolas Dufresne 4e0a5c101f rfbsrc: Remove useless library wrapping
We use a sinlge .c file, simplify everything by removing that
static library.
2016-04-05 13:34:01 -04:00
Nicolas Dufresne 29f1ca8602 rfbsrc: Cleanup dead code
Remove all the unused stuff, the include header, definition and C code
that don't contribute anything to this element.
2016-04-05 13:33:50 -04:00
Nicolas Dufresne 7b4b8a95b4 rfbsrc: Properly fallback to 3.3
If the major version is not 3, then the minor version provided
should be ignored, as it is meaningless for our fallback.
2016-04-05 13:33:38 -04:00
Nicolas Dufresne b83a6967c9 rfbsrc: Cleanly handle security negotiation failure
When the security cannot be negotiated, the server returns
security type of 0 (failure). In that case, the next step is
to read the error reason string.
2016-04-05 13:33:24 -04:00
Vineeth TM 8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Reynaldo H. Verdejo Pinochet 86ec812429 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Luis de Bethencourt 925b65b02e Rename property enums from ARG_ to PROP_
Property enum items should be named PROP_ for consistency and readability.
2015-04-27 10:55:18 +01:00
Tim-Philipp Müller 699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Sebastian Dröge 80e02cbdf9 Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
Blake Tregre 105b52e88a rfbsrc: Clamp out of bounds resolutions to prevent segfaults
https://bugzilla.gnome.org/show_bug.cgi?id=726801
2014-08-28 09:53:17 +03:00
Blake Tregre a73a42b10f rfbsrc: Send stream-start event in the beginning
https://bugzilla.gnome.org/show_bug.cgi?id=726802
2014-05-02 14:20:58 +02:00
Sebastian Dröge c383dd6420 rfb: Link with libgstbase for GstPushSrc 2013-06-07 15:18:15 +02:00
Tim-Philipp Müller 146e78ffdb rfbsrc: post error messages on errors 2013-05-11 19:42:31 +01:00
Tim-Philipp Müller 4cfa3f5af3 rfbsrc: fix rfbdecoder new/free asymetry and wrong free in error case
If rfb_decoder_new() allocates the decoder sructure, rfb_decoder_free()
should free the structure. We should not free the decoder when an
error occurs during connection - it holds lots of configuration/state
and will be freed later in finalize.
2013-05-11 00:36:06 +01:00
Tim-Philipp Müller 14d20271c1 rfbsrc: make authentication handshake safe for multiple instances
Move DES key into context struct.
2013-05-11 00:29:40 +01:00
Tim-Philipp Müller 0fc4af8498 rfbsrc: remove GPL-licensed source file
and replace the 1% of it that we need with new code, so we
don't have to change the runtime license of rfbsrc to GPL.
2013-05-10 23:11:05 +01:00
Aleix Conchillo Flaque 90e006513a rfbsrc: use glib gio sockets for network access
https://bugzilla.gnome.org/show_bug.cgi?id=700038
2013-05-10 20:52:29 +01:00
Aleix Conchillo Flaque 42783e676e rfbsrc: port to 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=700038
2013-05-10 20:43:16 +01:00
Sebastian Dröge e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Tim-Philipp Müller 9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller 32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Mark Nauwelaerts 578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Raimo Järvi e0241278f6 rfbsrc: Fix compiling in Windows
https://bugzilla.gnome.org/show_bug.cgi?id=677724
2012-06-14 16:38:22 +01:00
Tim-Philipp Müller 9503daa56a rfbsrc: call WSAStartup/Cleanup on win32
If we link against libwinsock2, we should probably call
Startup/Cleanup as well.

https://bugzilla.gnome.org/show_bug.cgi?id=675415
2012-05-07 23:59:58 +01:00
Marc-André Lureau 2f20ec7312 rfbsrc: fix librfb linking on win32
libtool: link:  i686-w64-mingw32-gcc -shared .libs/libgstrfbsrc.dll.def
.libs/libgstrfbsrc_la-gstrfbsrc.o  -Wl,--whole-archive ./.libs/librfb.a
-Wl,--no-whole-archive  -L/usr/i686-w64-mingw32/sys-root/mingw/lib
-lgstbase-0.10 -lgstreamer-0.10 -lxml2 -lgobject-2.0 -lgthread-2.0
-lgmodule-2.0 -lglib-2.0 -lintl  -mms-bitfields -mms-bitfields -O2   -o
.libs/libgstrfbsrc.dll -Wl,--enable-auto-image-base -Xlinker
--out-implib -Xlinker .libs/libgstrfbsrc.dll.a
Creating library file: .libs/libgstrfbsrc.dll.a
./.libs/librfb.a(librfb_la-rfbdecoder.o): In function
`rfb_decoder_read':
/home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:164:
undefined reference to `_imp__recv@16'
./.libs/librfb.a(librfb_la-rfbdecoder.o): In function
`rfb_decoder_connect_tcp':
/home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:112:
undefined reference to `_imp__socket@12'
/home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:119:
undefined reference to `_imp__htons@4'
/home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:123:
undefined reference to `_imp__inet_addr@4'
/home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:125:
undefined reference to `_imp__connect@12'

It needs -lws2_32 which is already in $(WINSOCK2_LIBS)

https://bugzilla.gnome.org/show_bug.cgi?id=675415
2012-05-07 23:59:48 +01:00
Sebastian Dröge cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Tim-Philipp Müller 0777b678f5 gst: some more unused-but-set-variable warning fixes 2011-06-04 20:35:03 +01:00