Commit graph

51 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Tim-Philipp Müller
0777b678f5 gst: some more unused-but-set-variable warning fixes 2011-06-04 20:35:03 +01: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
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +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
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
Thijs Vermeir
798aca639b gst/librfb/: Add Hextile encoding
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Add Hextile encoding
2008-11-05 22:25:25 +00:00
Ilja Pavkovic
7399002e2b gst/librfb/rfbdecoder.c: Implement ServerCutText message
Original commit message from CVS:
patch by: Ilja Pavkovic <illsen@gumblfarz.de>
* gst/librfb/rfbdecoder.c:
Implement ServerCutText message
2008-07-08 15:24:44 +00:00
Ilja Pavkovic
2bd1de60ce gst/librfb/: Add property for shared desktop
Original commit message from CVS:
patch by: Ilja Pavkovic <illsen@gumblfarz.de>
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
Add property for shared desktop
2008-07-08 14:28:08 +00:00
Jens Granseuer
266e4741cd Some C89 fixes, moving variable declarations to the beginning of a block. Fixes bug #517937.
Original commit message from CVS:
Patch by: Jens Granseuer <jensgr at gmx dot net>
* gst/librfb/gstrfbsrc.c: (gst_rfb_property_set_version):
* gst/librfb/rfbdecoder.c: (rfb_decoder_message_set_encodings),
(rfb_decoder_state_set_encodings):
* gst/mpegtsparse/mpegtspacketizer.c:
(mpegts_packetizer_parse_nit), (mpegts_packetizer_parse_sdt),
(mpegts_packetizer_parse_eit):
* sys/fbdev/gstfbdevsink.c: (gst_fbdevsink_getcaps),
(gst_fbdevsink_setcaps), (gst_fbdevsink_render):
Some C89 fixes, moving variable declarations to the beginning
of a block. Fixes bug #517937.
2008-02-22 05:33:59 +00:00
Stefan Kost
aa6d9fc528 gst/librfb/rfbdecoder.*: Don't use gtk-doc comment style for non gtk-doc comments.
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Don't use gtk-doc comment style for non gtk-doc comments.
Make one static function static.
2008-01-21 12:42:09 +00:00
David Schleef
7181404703 ext/musicbrainz/gsttrm.c: Don't emit signiture when going to READY, because it might not be ready.
Original commit message from CVS:
* ext/musicbrainz/gsttrm.c:
Don't emit signiture when going to READY, because it might
not be ready.
* ext/nas/nassink.c:
Remove useless call that sleeps for 5 seconds.  Yup, it calls
sleep(1) 5 times.  Go NAS.
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
Initialize our debug categories properly.
* gst/rawparse/gstrawparse.c:
Don't register element details for a non-element.  Be much more
rude when subclass doesn't set a pad template (assert!).  Don't
unref the pad template; we don't own it.
* gst/videosignal/gstvideoanalyse.c:
Initialize debug category.
* tests/check/Makefile.am:
Ignore nassink element in tests because it has unavoidable
long timeouts.
2008-01-01 01:18:19 +00:00
Thijs Vermeir
79b7ae29aa gst/librfb/rfbdecoder.c: Should fix the 64-bit build
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
Should fix the 64-bit build
2007-12-03 13:08:26 +00:00
Thijs Vermeir
ddd4af604a gst/librfb/rfbdecoder.*: Add CoRRE encoding
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Add CoRRE encoding
2007-11-30 14:08:15 +00:00
Thijs Vermeir
aedf92f474 gst/librfb/rfbdecoder.c: Use glib macro for swapping
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
Use glib macro for swapping
2007-11-30 10:46:23 +00:00
Thijs Vermeir
f17a78668e gst/librfb/: Disable CopyRect encoding by default
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Disable CopyRect encoding by default
Add RRE encoding
2007-11-29 13:32:11 +00:00
Thijs Vermeir
621a4e4792 gst/librfb/gstrfbsrc.c: don't forget to handle the offset's
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
don't forget to handle the offset's
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
precalculate some many used values
2007-11-15 15:32:47 +00:00
Thijs Vermeir
7412141912 gst/librfb/rfbdecoder.c: Some refactoring in RAW encoding
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
Some refactoring in RAW encoding
2007-10-31 14:44:55 +00:00
Thijs Vermeir
aac84ad1c7 gst/librfb/: Added copyrect encoding
Original commit message from CVS:
* gst/librfb/d3des.h:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/gstrfbsrc.h:
* gst/librfb/rfbbuffer.h:
* gst/librfb/rfbcontext.h:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
* gst/librfb/rfbutil.h:
* gst/librfb/vncauth.h:
Added copyrect encoding
2007-10-31 14:09:25 +00:00
Thijs Vermeir
dec4ec1f5c gst/librfb/rfbdecoder.c: Add the set encodings client message
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
Add the set encodings client message
2007-10-16 19:24:31 +00:00
Thijs Vermeir
48b7ba004d gst/librfb/: remove the rfbbytestream dead code
Original commit message from CVS:
* gst/librfb/Makefile.am:
* gst/librfb/rfb.h:
* gst/librfb/rfbbytestream.c:
* gst/librfb/rfbbytestream.h:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
remove the rfbbytestream dead code
2007-10-16 18:33:44 +00:00
Jan Schmidt
1fe4050c0a gst/: Fix compiler warnings shown by Forte.
Original commit message from CVS:
* gst/librfb/rfbbuffer.c: (rfb_buffer_new_and_alloc):
* gst/librfb/rfbbuffer.h:
* gst/librfb/rfbdecoder.c: (rfb_socket_get_buffer):
* gst/mpegvideoparse/mpegvideoparse.c: (gst_mpegvideoparse_chain):
* gst/nsf/nes6502.c: (nes6502_execute):
* gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps):
* gst/real/gstrealvideodec.c: (open_library):
* gst/real/gstrealvideodec.h:
* gst/rtpmanager/gstrtpsession.c: (create_recv_rtp_sink),
(create_recv_rtcp_sink), (create_send_rtp_sink):
Fix compiler warnings shown by Forte.
2007-10-08 17:46:45 +00:00
Thijs Vermeir
ada7510fd7 gst/librfb/: Added offset-x, offset-y, width and height property for selecting a region from the screen
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Added offset-x, offset-y, width and height property
for selecting a region from the screen
2007-09-21 14:55:19 +00:00
Thijs Vermeir
ab4038ce2e gst/librfb/gstrfbsrc.c: Minimum raw encoding is working now
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
Minimum raw encoding is working now
* gst/librfb/rfbdecoder.c:
fix address while reading from stream
2007-09-21 10:27:02 +00:00
Thijs Vermeir
d785a925c1 gst/librfb/: It is now possible to connect to a vncserver. there are still some issues with the ouput of the screen. ...
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
It is now possible to connect to a vncserver.
there are still some issues with the ouput of
the screen. Looks like some lines are confused
2007-09-19 20:55:43 +00:00
Thijs Vermeir
a458032e6e gst/librfb/gstrfbsrc.c: Add password property (write only)
Original commit message from CVS:
* gst/librfb/gstrfbsrc.c:
Add password property (write only)
* gst/librfb/rfbdecoder.c:
Read the reason on failure
Use the password property for authentication
* gst/librfb/rfbdecoder.h:
Add defines for version checking
2007-09-19 13:06:17 +00:00
Thijs Vermeir
8b83a2812f gst/librfb/: VNC Authentication should be working now temperaly with fake password 'testtest'
Original commit message from CVS:
* gst/librfb/Makefile.am:
* gst/librfb/d3des.c:
* gst/librfb/d3des.h:
* gst/librfb/rfbdecoder.c:
* gst/librfb/vncauth.c:
* gst/librfb/vncauth.h:
VNC Authentication should be working now
temperaly with fake password 'testtest'
2007-09-19 08:35:13 +00:00
Thijs Vermeir
f9d615c250 gst/librfb/rfbdecoder.*: Added some documentation about security handling start implementing security handling for rf...
Original commit message from CVS:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
Added some documentation about security handling
start implementing security handling for rfb 3.3
2007-09-18 16:32:19 +00:00
Stefan Kost
4bc97d6319 ChangeLog: Add missing newline.
Original commit message from CVS:
* ChangeLog:
Add missing newline.
* gst/librfb/rfbdecoder.c:
Fix the build (missing stdlib.h).
* gst/spectrum/gstspectrum.c:
* gst/spectrum/gstspectrum.h:
Use basetransform segment so that it is correctly managed on flushes
and start/stop. Report message timestamp as stream time, which is what
an application can understand. (Yes these are adapted from wim recent
level element changes)
2007-09-18 11:45:06 +00:00
Thijs Vermeir
b980126909 Added a new property for the rfb version
Original commit message from CVS:
Added a new property for the rfb version
2007-09-17 21:12:17 +00:00
David Schleef
a99c79744b gst/librfb/rfbdecoder.c: Fixes for 64-bit architectures.
Original commit message from CVS:
* gst/librfb/rfbdecoder.c: Fixes for 64-bit architectures.
2006-11-17 03:51:04 +00:00
Andre Moreira Magalhaes
fd89575485 Port librfb to 0.10 (#376106).
Original commit message from CVS:
Patch by: Andre Moreira Magalhaes <andrunko@gmail.com>
* configure.ac:
* gst/librfb/Makefile.am:
* gst/librfb/gstrfbsrc.c:
* gst/librfb/rfb.c:
* gst/librfb/rfb.h:
* gst/librfb/rfbbuffer.c:
* gst/librfb/rfbbuffer.h:
* gst/librfb/rfbbytestream.c:
* gst/librfb/rfbbytestream.h:
* gst/librfb/rfbcontext.h:
* gst/librfb/rfbdecoder.c:
* gst/librfb/rfbdecoder.h:
* gst/librfb/rfbutil.h:
Port librfb to 0.10 (#376106).
2006-11-17 03:15:40 +00:00