A few things I need

Everything else that doesn't fall into one of the other PB categories.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

A few things I need

Post by Dreglor »

i doing a remote computer program so i can get to my computer when im not there.
and i wondering how i would do some of the things like
right now i just know how to know the sever side (computer being controled)
how would you capture the mouse so it can be moved and click from the client
same for the keyboard
i thinking about sound (low priority)
video i remeber that there was a source some were were it would capture screens

and i need opinion on this, would it be faster (overall) to pack one loop with all the keyboard mouse video and sound data into pack memory then send it over the line or would it be faster to send it raw becasue the packer is kinda slow compressing even at lowend compression
~Dreglor
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Why not use VNC?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

because vnc is no fun? :-)

hey, i'm game for an application like this! willing to share the code?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Some thoughts about compression:

I think you should write some kind of Alpha-Compression, so that you don't have to send all data each loop, but only the data that has effectively changed. That would bring two advantages:
a) your refresh rate is lower and adapts to the changes on the screen automatically (i.e. if you watch a movie it will get laggy, but for office work it will just do fine)
b) your traffic is lower

You could reduce the number of colors used (i.e. use 16bit color depth)

Also you could catch all redraw events/messages windows is sending. Then only update the region indicated (that is especially good for the performance on the "server")

Combine all of the above, think something up.

If you succeed, I would be interested in the result as my experience is of theoretical nature only ;)
<°)))o><²³
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

blueznl wrote:because vnc is no fun? :-)

hey, i'm game for an application like this! willing to share the code?
most likly :)
right now i writing the base up for the server
but i'll stop when i get to the part were i need the capturing of i/o
~Dreglor
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

dreglor got my private message ?
SPAMINATOR NR.1
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

u think i've figured out some of the problems, my major challenge was twofold:

1. is there a way to read the screen directly from memory, instead of 'grabbing' it, this to speed up things

2. euh... what was the other thing... euh.... :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

no, here is what you do though...

Take the first picture of the screen in total, every screen there after you calculate the diferents between the previous screen taken and only send the diferents.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

VNC Rocks! i have it on a server here at home. I love the way you can admin the server remotly through a web browser. very small, fast and simple! :)
--Kale

Image
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

and free!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

yeah well go and discourage me...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

freedimension wrote:Some thoughts about compression:

I think you should write some kind of Alpha-Compression, so that you don't have to send all data each loop, but only the data that has effectively changed. That would bring two advantages:
a) your refresh rate is lower and adapts to the changes on the screen automatically (i.e. if you watch a movie it will get laggy, but for office work it will just do fine)
b) your traffic is lower

You could reduce the number of colors used (i.e. use 16bit color depth)

Also you could catch all redraw events/messages windows is sending. Then only update the region indicated (that is especially good for the performance on the "server")

Combine all of the above, think something up.

If you succeed, I would be interested in the result as my experience is of theoretical nature only ;)
Forgive me I'm a bit of a code monkey. Compression is best done with zlib. zlib is a good library can do gzip compression. The good thing about gzip is the balance of speed and the achieved compression ratio. Zip is a possibility too, however you wouldn't as good compression and I'm not sure how it compares speed wise.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

well the included PB packer is also good enough. But Alpha-Compression is where the server ONLY sends changed data, wich is definently very important. I will even say that you cant make this working good enough if you dont have the difference-sender...
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

yep, of course you can gzip the alpha-data in a second step.
<°)))o><²³
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

well i got the compression pretty much figured out (at least what i want to do with it)Edit3: nothing wrong with my code :oops:
~Dreglor
Post Reply