Jump to content



Photo

Screen captures via HTTP requests


  • Please log in to reply
9 replies to this topic

#1 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,498 posts

Posted 24 March 2012 - 12:36 PM

I saw many people look for a way to transfer screen camputres from a computer to another. Here I want to present a simple way to do that via HTTP requests (thanks to Manadar HTTP server example). It's very customizable, there are options to capture all screen or just some specific areas, to capture mouse cursor and set image quality.

EDIT:
- fixed memory leak in client
- add option to get desktop width & height from remoted computer
- fixed mouse cursor show/hide

I hope this will help some of you. :oops:

Attached Files


Edited by Andreik, 24 March 2012 - 09:13 PM.

  • JScript likes this
When the words fail... music speaks





#2 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 24 March 2012 - 01:48 PM

Very nice, I'll do some tests and I return with results!

Thank you for sharing!

Regards,

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#3 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,498 posts

Posted 24 March 2012 - 01:53 PM

Thank you! Check out the source now. There was a memory leak in client but now is fixed.
When the words fail... music speaks

#4 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 24 March 2012 - 01:59 PM

OK, I'll copy and update the code!

Regards,

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#5 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 26 March 2012 - 05:38 AM

Hello @Andreik

I checked the operation of the code and made ​​some changes to accelerate the capture and use less CPU.
I was not able to close the window of the Client module, so I made ​​some changes too.

I confess I had never used the InetRead() function, I noticed that she makes the following call:
Posted Image
I captured this image from the program: Process Explorer (sysinternals)!

I think the should be called by DLLCall() function, it would be much better!

Download:
Attached File  Screen_captures_via_HTTP_requests.zip   4.65K   128 downloads

Regards,

João Carlos.

Edited by JScript, 26 March 2012 - 05:41 AM.

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#6 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,498 posts

Posted 26 March 2012 - 09:52 AM

Yup, InetGet() uses functions from wininet.dll but I'm not sure how much performance I gain if I call directly functions from wininet.dll. Anyway I found some good resources on MSDN. I'll make a test and come back with the results.

Some good links for start:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385096%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384363%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384233%28v=vs.85%29.aspx

Edited by Andreik, 26 March 2012 - 09:52 AM.

When the words fail... music speaks

#7 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 26 March 2012 - 11:35 AM

Surely the performance will be better, because if you open Process Explorer you will see the Rundll32.exe file opening and closing all the time!
In a frantic pace, very crazy!!!

Do You tested the changes I have made?

Regards,

João Carlos.
http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       


#8 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,498 posts

Posted 26 March 2012 - 02:09 PM

Yes, I tested. It's much better. Today I was busy with creating AVI file of session. As you know it's easy as uncompressed AVI but finally I got it work fine with XVID and without getting SaveOption window. Next step now it's to replace InetRead() if you say isn't so performant. Thank you!
When the words fail... music speaks

#9 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,498 posts

Posted 26 March 2012 - 11:18 PM

I found on forum WinINet UDF (a little modified because of conflicts between variables from different UDFs) and I wrote an example using it but I don't see any performance even if are used dll calls. With my initial example server use max 10% CPU and client max 15% CPU (I run both on same PC). About memory server use ~15Mb memory and client same. And this example using WinINet: server use 15% CPU and max 25Mb memory and client use 25% CPU and 25-50 Mb memory (very variable). Let me know how it works for you.

Attached Files


  • JScript likes this
When the words fail... music speaks

#10 JScript

JScript

    Goodbye everybody, I got tired of this system adopted here!

  • Active Members
  • PipPipPipPipPipPip
  • 1,062 posts

Posted 27 March 2012 - 02:07 AM

Excellent!
Now I no longer see what was happening in this picture:
Posted Image
"Rundll32.exe" opening and closing like crazy, in a frenetic rhythm!
It may not make a difference in the CPU load, but in reading the HDD will be enough!

Updates that I'm doing in my program (DVI-Remote (Remote Desktop entirely in AutoIt) - OpenSource!), will have to be redone... :oops:

Best regards,

João Carlos.

Edited by JScript, 27 March 2012 - 02:15 AM.

http://notebook.forumais.com (Forum Maintenance Notebooks and Desktop)http://autoitbrasil.com/ (AutoIt v3 Brazil!!!)
Spoiler

Posted Image Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!       





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users