Archive: serveTV


20th September 2003 19:42 UTC

serveTV
i made a kinda stupid software, called serveTV v0.0.4 . the purpose of this freeware tool is to make screenshots in custom intervals and upload them to a server (ftp, not sure about http).

current features:
* capture fullscreen
* customizable jpeg compression
* upload to ftp in intervals

todo list:
* create html file
* more jpeg custumization
* advanced upload controls
* abort process button
* documentation

the software uses cURL for file transfer and cjpeg (modified by steven wittens) for compression.

most will find this tool pretty useless, since it's even slow in my 100mbit lan (pentium 4 2.4ghz/1gb ram runs serveTV, powermac g3 667mhz/512mb ram) displays images). i admit it's kinda absurd (like a read-only vnc), but i will put this in my portfolio for the university of applied arts. beside this, i use this to *stream* images of some visualizations to my httpd.

enjoy or ignore :)


21st September 2003 02:59 UTC

thats pretty nice.. i was doing somthng similar a week or two ago. Trying to catch my friend hunting pr0n on my computer.

but um.. yath.. "AVS"?


22nd September 2003 22:12 UTC

its not stupid,its kinda sweet :)


30th September 2003 13:01 UTC

i figured the mistake and sent a pm to rova in the very second after posting this.

unfortunately i could not let this capture the avs window only, since it's a sub-window of winamp. maybe in future, this software is like a joke anyway.


30th September 2003 22:49 UTC

Sorry I didn't really know where to repost it more relevant. *shrug* so left it here


1st October 2003 11:22 UTC

Originally posted by killahbite
unfortunately i could not let this capture the avs window only, since it's a sub-window of winamp.
This is no problem at all.

Do the following (for avs2.6):

Find the avs-window. (the winamp onwed one)
Use FindWindowEx to get the client avswnd.
Get avswnd's position.
Make a screenshot of this section.

I can give you some ready-made code for this (Hotlist-Source excerpt) if you want. ;)

1st October 2003 11:36 UTC

apfel + birne = ??


1st October 2003 11:48 UTC

apfel + birne = polymorphe Frucht :D

//edit

It wont be too hard to change te code from delphi to c++.
The shell commands are all the same and the rest wont take long.

Btw, when i found a solution to the screenshot problem in general, it was in vBasic (thanx to goeb again). I had to change a lot. Now the code is more advanced and only some lines long.

I'll post it here tomorrow. (i if remember to copy it when i'm home)


1st October 2003 12:03 UTC

Originally posted by Magic.X


It wont be too hard to change te code from delphi to c++
maybe, but i'm neither using delphi nor c++ :p

Originally posted by Magic.X
apfel + birne = polymorphe Frucht
interessant, dass alle mathelehrer eines übersehen haben. geld lässt uns dinge vergleichen, die nicht vergleichbar sind (ein apfel = halbe stunde auto waschen) ;)

1st October 2003 13:48 UTC

Rofl! :blah:

[Ironiemodus]
Ein hoch auf unsere kommerzialisierte Gesellschaft!
[/Ironiemodus]

What the heck do you use for programming?

At least it should support win32 commands, does it?


2nd October 2003 07:32 UTC

Now here my crappy Code ;)


procedure THotlistScreenshot.FormCreate(Sender: TObject);

Var //declaring all the vars we need
H,H2 :hwnd;
DeskHdC :Longint;
r :TRect;
z :string;
b :integer;
xp,new :boolean;

begin
new:=false;
//scan for the avswnd of avs 2.51
H:=findwindow('avswnd',nil);
//if avswnd is not found for 2.51, scan for higher versions, which are bound into a Winaamp Gen Window. set new=true if found
if H=0 then
begin
H2:=findwindow('Winamp Gen','AVS');
H:=findwindowex(H2,0,'avswnd',nil);
new:=true;
end;
//get avswnd's screen rectangle
GetWindowRect(H,r);
//move avswnd or WA Gen on top to ensure you get a full uncovered image
If new then SetWindowPos(H2,hwnd_top,0,0,0,0,swp_nomove+swp_nosize)
else SetWindowPos(H,hwnd_top,0,0,0,0,swp_nomove+swp_nosize);
//sleeping according to custom responsiveness, not needed in serveTV
Sleep(HotlistMain.resp);
//now we do repeat the following code until we don't get any exception. this is used because xp tends to retrieve errors instead of results when using GetDC
repeat
try
xp:=false;
DeskHdc:=GetDC(H);
except
xp:=true;
end;
until (xp=false);
//clean up the Image that may have been used before
Image1.Picture:=nil;
//lets make the screenshot. for versions 2.51 and before we need to substract the borders. higher versions don't have any borders due to the WAGen window
try
if new then
begin
Image1.height:=r.Bottom-r.Top;
Image1.width:=r.Right-r.Left;
BitBlt(Image1.Canvas.Handle,0,0,r.Right,r.Bottom,DeskHdc,0,0,SRCCOPY);
end
else
begin
Image1.height:=r.Bottom-20-r.Top;
Image1.width:=r.Right-13-r.Left;
BitBlt(Image1.Canvas.Handle,-7,-15,r.Right-6,r.Bottom+5,DeskHdc,0,0,SRCCOPY);
end;
except
end;
//repaint the image, this may be not nessecary
Image1.Repaint;
//move our window back on top
SetWindowPos(HotlistScreenshot.Handle,hwnd_top,0,0,0,0,swp_nomove+swp_nosize);
end;


This should work with a bit of changing in nearly ecvery language on a w32 system. The w32 commands will stay the same, its just messing with the syntax. :)