#187335 - 31/10/2003 14:01
Re: Empegface
[Re: tfabris]
|
enthusiast
Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
|
if by 'work' you mean does it still use all the cpu, then yes. Also using 1.3.1.
_________________________
Andy
MK2a 60GB Amber 040103916 32mb/Light Kit
MK2a 50GB Amber 030102560 32mb
|
Top
|
|
|
|
#187336 - 31/10/2003 14:09
Re: Empegface
[Re: skibum]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
I'm not talking about the "known problem" of the app appearing at the top of the task list and seeming to consume a lot of CPU. There's nothing I can do about that.
I'm talking about the original bug reported at the very top of this thread. The bug where it doesn't show the screen updates until after you open and close the configuration dialog box.
Does configuring the app so that the refresh is zero solve that particular problem?
|
Top
|
|
|
|
#187337 - 31/10/2003 14:22
Re: Empegface
[Re: tfabris]
|
Master Boot Logo(er)
Registered: 26/08/2003
Posts: 525
Loc: California
|
Sorry.......Yep, as in the app works and NO, it does not change the refresh issue.
1.3.1 also is NOT affected by changing to "0"
_________________________
aka: [color:"blue"]Boot Logo Master[/color] PayPal Contributions for Custom Boot Logos are gladly accepted. <img src="/ubbthreads/images/graemlins/smile.gif" alt="" /> itirado[@]adobe[.]com
|
Top
|
|
|
|
#187338 - 31/10/2003 14:24
Re: Empegface
[Re: tfabris]
|
enthusiast
Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
|
In reply to:
I'm not talking about the "known problem" of the app appearing at the top of the task list and seeming to consume a lot of CPU. There's nothing I can do about that.
It's not 'appearing' to use cpu. It's actually using it. Although the 'system idle process' uses all free cpu, it at least doesn't cause laptop fans to start spinning and also when you look at the performance graph in taskmanager, the cpu is nailed at 100%.
A friend of mine had a similiar problem with one of his VB programs. It seems that VB doesn't really like looping around calls to releasing the cpu. As all that does, is use the cpu. I think but can't check until next week, that he had to use small sleeps instead.
As for the original problem, I'm not suffering from that, but then again running empegface takes cpus cycles away from looking for little green men so I've stopped running it.
Edited by skibum (31/10/2003 14:25)
_________________________
Andy
MK2a 60GB Amber 040103916 32mb/Light Kit
MK2a 50GB Amber 030102560 32mb
|
Top
|
|
|
|
#187339 - 31/10/2003 14:46
Re: Empegface
[Re: skibum]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
I'm going to say this one last time, and then there will be no further discussion on the topic because it's going in the readme file:
If you don't like it using all the CPU, then instead of complaining, please do the following: Locate a piece of Visual Basic code which will download a file from a web site, directly into memory, without using the hard disk, and without using blocking calls. Oh, and without requring me to license and distribute a third party DLL.
The hard disk and blocking call thing comes because I'm using the IE "URLDownloadToFile" API to retreive the screen shot. As soon as I don't have to use that, then I don't have to sit in a loop waiting for the file to finish downloading, and the whole issue will go away.
I can't find code examples to do what I need, the only code examples I've seen use URLDownloadToFile.
|
Top
|
|
|
|
#187340 - 31/10/2003 15:04
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
I don't use VB but how complicated is network code in VB? If it's not too bad then you only need to do a few steps after setting up the connection.
1. Connect to port 80
2. Send "GET /proc/empeg_screen.png HTTP/1.0\r\n\r\n"
3. What you get back is the HTTP headers with the PNG file following it.
Edited by tman (31/10/2003 15:07)
|
Top
|
|
|
|
#187341 - 31/10/2003 15:08
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
but how complicated is network code in VB? There is no network code in VB itself. Unless I call the IE DLL, there's no functions for talking on the network. And I don't see a way to do what you're describing using the IE DLL. They don't expose it to me a that low a level. The lowest function I've got AFAIK is URLDownloadToFile.
If anyone has ACTUAL EXAMPLE CODE which shows how to do otherwise (as opposed to "how hard could it be" armchair theories), I'm all ears.
|
Top
|
|
|
|
#187342 - 31/10/2003 15:13
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Isn't there a WinSock control? I know that the IE DLL only gives you a very basic interface.
|
Top
|
|
|
|
#187343 - 31/10/2003 15:17
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Isn't there some EXAMPLE CODE showing exactly how to use it in VB?
|
Top
|
|
|
|
#187344 - 31/10/2003 15:30
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
here and download mailex.zip It's a POP3/SMTP client but it shows how to use winsock.
|
Top
|
|
|
|
#187345 - 31/10/2003 15:30
Re: Empegface
[Re: tfabris]
|
enthusiast
Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
|
Thanks for the explaination. Now I'm on a mission.
_________________________
Andy
MK2a 60GB Amber 040103916 32mb/Light Kit
MK2a 50GB Amber 030102560 32mb
|
Top
|
|
|
|
#187346 - 31/10/2003 16:07
Re: Empegface
[Re: skibum]
|
Master Boot Logo(er)
Registered: 26/08/2003
Posts: 525
Loc: California
|
Wow!
it doesnt take much to spark a fire with you guys
Just for your efforts, I promise to put out (4) new skins for the beloved Empegface on Monday!!!
_________________________
aka: [color:"blue"]Boot Logo Master[/color] PayPal Contributions for Custom Boot Logos are gladly accepted. <img src="/ubbthreads/images/graemlins/smile.gif" alt="" /> itirado[@]adobe[.]com
|
Top
|
|
|
|
#187347 - 31/10/2003 16:18
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Looking at it now. Looks really straightforward. Changing the method for getting the image might just kill a few birds with one stone and solve both problems in the process. Thank you for the link!
|
Top
|
|
|
|
#187348 - 04/12/2003 15:27
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
2. Send "GET /proc/empeg_screen.png HTTP/1.0\r\n\r\n" I'm having trouble getting anything from the player this way.
If I go to a remote site, such as bluesnews, and send:
GET
Then I get the whole proper page back.
If I send a specifica page, like GET /index.html I get that page back just fine. Or a nicely formatted error screen if it's not a valid page.
If I send anything with the HTTP/1.0 string appended like you show, I get nothing back at all.
And no matter what, if I send anything at all to the empeg (even when I know the IP address is right) I get nothing back, including the kinds of stuff that works for remote sites.
Any ideas how I'm supposed to format the GET string so that KHTTPD sends me back the file I'm looking for?
|
Top
|
|
|
|
#187349 - 04/12/2003 15:39
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
It should work... You do know that \r\n\r\n means two CRLFs tho?
Do this from the command prompt
telnet your_empeg_ip 80 <PRESS ENTER>
GET /proc/uptime HTTP/1.0<PRESS ENTER>
<PRESS ENTER>
You probably won't be able to see yourself typing GET /proc/uptime etc... but just do it blindly.
It should display some numbers and then close the connection.
|
Top
|
|
|
|
#187350 - 04/12/2003 15:40
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
If you end with "HTTP/1.0", you have to hit return twice.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#187351 - 04/12/2003 15:49
Re: Empegface
[Re: tfabris]
|
enthusiast
Registered: 27/03/2002
Posts: 248
Loc: Swindon, UK
|
Tony, I've got a small vb program I knocked up that tries to do 1/100th of empegface. It grabs the file, saves it to disc, reads it back and displays it. I'll email it to you when I power up my other pc.
_________________________
Andy
MK2a 60GB Amber 040103916 32mb/Light Kit
MK2a 50GB Amber 030102560 32mb
|
Top
|
|
|
|
#187352 - 04/12/2003 15:52
Re: Empegface
[Re: skibum]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
He's already got part sorted in empegface. We're trying to avoid writing it to disk which is why we're messing around with doing the HTTP transfer manually
|
Top
|
|
|
|
#187353 - 04/12/2003 15:56
Re: Empegface
[Re: wfaulk]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
If you end with "HTTP/1.0", you have to hit return twice. Aha found it.
Actually, my problem was that I was sending LF+CR's instead of CR+LF's. Picky web servers, hmph.
Thanks for the help everyone. On to the rest of the work.
|
Top
|
|
|
|
#187354 - 04/12/2003 16:52
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Okay, so what's the syntax for the GET request if I only want it to send the file back and not the headers? Found some examples on Google but they don't seem to be working for me...
|
Top
|
|
|
|
#187355 - 04/12/2003 16:58
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
You can't with the HTTP server in Hijack. It's been hardcoded to always send headers.
|
Top
|
|
|
|
#187356 - 04/12/2003 17:01
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Okay, then I'll just parse out everything that appeas after (what seems to be) "Content-Type: text/plain" followed by two CRLF pairs.
Does that sound right?
|
Top
|
|
|
|
#187357 - 04/12/2003 17:07
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
A better way would be to just junk everything before and including the first line with just a CRLF on it. That's what delimits the header from the data.
|
Top
|
|
|
|
#187358 - 04/12/2003 17:45
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Or, in other words, junk everything up to and including the first pair of CRLFs.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#187359 - 04/12/2003 17:49
Re: Empegface
[Re: wfaulk]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Yeah Not quite sure why I was thinking in such a convoluted way.
|
Top
|
|
|
|
#187360 - 05/12/2003 00:10
Re: Empegface
[Re: tman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Thanks guys. I've got it working with the Winsock code now.
I'm not ready to release it just yet because it needs the Winsck.OCX and I have to check to find out how that needs to get distributed, if at all. Maybe I'm lucky and that gets included with IE5 or something? I can hope...
|
Top
|
|
|
|
#187361 - 05/12/2003 03:53
Re: Empegface
[Re: tfabris]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Does that sound right?
Or you could RTFM, which explicitly says that each value in the header is terminated with CRLF and that the header itself is terminated by a blank line. So, just look for CR/LF/CR/LF to find the end of the headers.
_________________________
-- roger
|
Top
|
|
|
|
#187362 - 05/12/2003 10:28
Re: Empegface
[Re: Roger]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
|
Yeah, something funny is that, between those two CRLFs and the actual empeg_screen.raw file, there are two additional bytes that are coming through (I think they're nulls) that I have to account for. Dunno why. But it only works if I filter out those two CRLF and the two following bytes. Oh well.
|
Top
|
|
|
|
|
|