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
Stefan Kost
ed42bca0dd
librfb: don't leak password on error
2011-05-20 00:16:00 +03:00
Thibault Saunier
17fd7ebcb4
android: make it ready for androgenizer
...
Remove the android/ top dir
Fixe the Makefile.am to be androgenized
To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 07:27:11 +02:00
Matthew Ife
51c63587a1
rfbsrc: fail more gracefully if source gets disconnected or geometry changes
...
Don't get caught in an infinite loop if the source gets disconnected and also
support gracefully failing upon detecting the frame geometry has increased
(rather than segfaulting).
https://bugzilla.gnome.org/show_bug.cgi?id=635397
2010-12-12 23:36:56 +00:00
Stefan Kost
0c22e1b954
various (gst): add missing G_PARAM_STATIC_STRINGS flags
...
Canonicalize property names as needed.
2010-10-19 15:47:17 +03:00
Benjamin Otte
240f494aa7
Add -Wold-style-definition
...
and fix the warnings
2010-03-22 16:56:03 +01:00
Benjamin Otte
b7655bbd2e
Add -Wredundant-decls flag
...
and fix warnings from it
2010-03-22 12:05:59 +01:00
Benjamin Otte
f96e4f1581
Add -Wmissing-declarations -Wmissing-prototypes to configure flags
...
And fix all warnings
2010-03-21 21:39:18 +01:00
Benjamin Otte
775c7584fd
gst_element_class_set_details => gst_element_class_set_details_simple
2010-03-18 22:46:41 +01:00
Руслан Ижбулатов
d61abce8e4
librfb: port rfbsrc to MinGW
...
Fixes #606677
2010-01-12 00:29:57 +00:00
Tim-Philipp Müller
904a4e0f48
rfbsrc: use existing macros to avoid alignment issues
2010-01-11 00:58:12 +00:00
Tim-Philipp Müller
0909982636
librfb: include our own _stdint.h not stdint.h
2009-11-22 19:04:43 +00:00
Thijs Vermeir
d8852e5788
gst/librfb/rfbdecoder.c: Fix uninitialized warnings
...
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
Fix uninitialized warnings
2008-11-12 10:32:24 +00:00