Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » [SOLVED] httpcli and MJPEG
Re: httpcli and MJPEG [message #21407 is a reply to message #21406] Mon, 18 May 2009 21:58 Go to previous message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
done, it somehow works. it's from 'httpcli' buil-in example


...

for(;;) {
    String resp = client.ExecuteRedirect();

    int end = resp.Find("--myboundary");                            // first in header
    int beg;                                                        // begining of data

    while((beg = resp.Find("\xFF\xD8", end)) != -1) {               // 2 bytes begins... just for little sure
        if((end = resp.Find("\r\n--myboundary", beg)) == -1) {      // '<CL><CR>' after each jpeg
	    break;
        }
				
        String JPEG_data = resp.Mid(beg, end - beg);                                   // <-- here's the jpeg in datas
    }
}

...



it ignores inclomplete frames in chunks of stream.
I've set DEFAULT_MAX_CONTENT_SIZE in httpcli.h to some reasonable value for me. other possibility is to make it run in other threat. doh.

[Updated on: Tue, 19 May 2009 09:54]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: Problem with "SDL Example" in Upp 2008.1 [BUG?]
Next Topic: Suggested Bugfixes
Goto Forum:
  


Current Time: Sun May 12 09:05:50 CEST 2024

Total time taken to generate the page: 0.02800 seconds