Thank you all. @Koen With CORS the responsefrom video server is "404 Error": so it doesn't support "OPTIONS", I think. Do you know how to make a simple proxy from Wt server vs browser? So the browser do the worst of work.
What do you mean with: "When you refresh a resource, like you do below, only the image is updated though, not the whole page ?" Maybe I repeat but what I see is that every time an image is arrive I do "m_imageResource->setData (inStream_);" but the image on browser is not refresh. I have to write "Wt::WApplication::instance()->triggerUpdate();" to take a semi-normal refresh. @Jason H I can't do what you said because I need a real time stream video and not a post-processing video. I don't know how long the video will be. What change with IFRAME? How can I use it? Bye. On 20 December 2011 17:26, Jason H <scorp...@yahoo.com> wrote: > I would question why you are sending complete images every time? I'd rather > run it through FFMPEG and create an actual video stream and save a ton of > bandwidth. > > I'd also try using an IFRAME for just he image. > > > ________________________________ > From: Marco Faletra <m.fale...@gmail.com> > To: witty-interest@lists.sourceforge.net > Sent: Tuesday, December 20, 2011 6:14 AM > Subject: [Wt-interest] View a Video Server with Wt > > Hi all. I would expose my problem: > I need to display an image stream from a video server that sends 4 > images sequentially (about 20 fps). > The best is to tell the browser: at this IP you can find the video > server (the IP address is not the same of web server), take the image > e show them. Unfortunately, try also without Wt, I found the > "Cross-site scripting" and "same origin policy" problem. If someone > know a solution I would be very grateful. Next step, if can do it, > will be use with Wt. > For this problem, a great solution, would be make a proxy-server in > order to bypass the "same origin policy": unfortunately I don't know > how code it with Wt. > Trying to give a solution to the problem, I insert a WImage and > refresh it every time an image arrive to Wt web server: in this manner > I have a worst refresh (I lose about 10-15% of image) and also I need > to refresh the whole page for "only" one image. > This is what I do: > > in ctor: > > m_imageResource = new Wt::WMemoryResource("image/telecamera", this); > m_link.setResource (m_imageResource); > m_telecamera = new WImage (m_link, "Telecamera1"); > > while, when an image arrive: > > m_imageResource->setData (inStream_); > Wt::WApplication::UpdateLock lock(Wt::WApplication::instance()); > > if (lock) { > // Push the changes to the browser > Wt::WApplication::instance()->triggerUpdate(); > } > > where inStream_ it's a buffer where inside there is the jpeg image. > If I don't insert "Wt::WApplication::instance()->triggerUpdate()", the > refresh is done, about, every 5/6 seconds. > If it can help you I can post all source code. > > Thank you. > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > witty-interest mailing list > witty-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/witty-interest > > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > witty-interest mailing list > witty-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/witty-interest > ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest