summaryrefslogtreecommitdiffstats
path: root/gst/librfb/gstrfbsrc.c
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2007-09-19 20:55:43 +0000
committerThijs Vermeir <thijsvermeir@gmail.com>2007-09-19 20:55:43 +0000
commitd785a925c1339a4783fdedccff42b2de5f4694d3 (patch)
tree01ab2ae1d5c5834f3ead88c707c724c3acd9fe1c /gst/librfb/gstrfbsrc.c
parent50ed6cc7b2e593080f4a6407e3c1d05e4476b192 (diff)
downloadgst-plugins-bad-d785a925c1339a4783fdedccff42b2de5f4694d3.tar.gz
gst-plugins-bad-d785a925c1339a4783fdedccff42b2de5f4694d3.tar.bz2
gst-plugins-bad-d785a925c1339a4783fdedccff42b2de5f4694d3.zip
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
Diffstat (limited to 'gst/librfb/gstrfbsrc.c')
-rw-r--r--gst/librfb/gstrfbsrc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c
index 38560b8b..d0398dc9 100644
--- a/gst/librfb/gstrfbsrc.c
+++ b/gst/librfb/gstrfbsrc.c
@@ -410,20 +410,20 @@ gst_rfb_src_paint_rect (RfbDecoder * decoder, gint x, gint y, gint w, gint h,
gint width;
gint offset;
- // GST_DEBUG ("painting %d,%d (%dx%d)\n", x, y, w, h);
+ GST_DEBUG ("painting %d,%d (%dx%d)\n", x, y, w, h);
src = GST_RFB_SRC (decoder->decoder_private);
frame = src->frame;
width = decoder->width;
for (j = 0; j < h; j++) {
for (i = 0; i < w; i++) {
- color = data[j * w + i];
+ color = data[(j * w + i) * decoder->bpp / 8];
- offset = ((j + x) * width + (i + x)) * 4;
- frame[offset + 0] = RGB332_B (color);
- frame[offset + 1] = RGB332_G (color);
- frame[offset + 2] = RGB332_R (color);
- frame[offset + 3] = 0;
+ offset = ((j + y) * width + (i + x)) * decoder->bpp / 8;
+ frame[offset] = data[((j * w + i) * decoder->bpp / 8)];
+ frame[offset + 1] = data[((j * w + i) * decoder->bpp / 8) + 1];
+ frame[offset + 2] = data[((j * w + i) * decoder->bpp / 8) + 2];
+ frame[offset + 3] = data[((j * w + i) * decoder->bpp / 8) + 3];
}
}