Hi Rick,

FWIIW, happened to be re-compiling the latest SG/FG 
git 2.99, and decided to add -DJPEG_FACTORY:BOOL=ON 
for a test, first to SG, and then to the FG compile...

Was in Windows 7 64-bit, but only compiled the 32-bit 
version... but would not expect any particular extra 
problems to do it in 64-bits...

Had to apply the following small patch to remove error 
of 'missing' Sleep(), to compile in windows -

diff --git a/src/Network/jpg-httpd.cxx b/src/Network/jpg-httpd.cxx
index 0c84f5b..e7a5679 100644
--- a/src/Network/jpg-httpd.cxx
+++ b/src/Network/jpg-httpd.cxx
@@ -46,6 +46,9 @@
 #include <Viewer/renderer.hxx>
 
 #include "jpg-httpd.hxx"
+#ifdef WIN32
+#include <Windows.h> // for Sleep(ms) function
+#endif
 
 #define __MAX_HTTP_BLOCK_SIZE       4096
 #define __MAX_STRING_SIZE           2048

And obviously it does require that cmake finds the 
JPEG includes and libraries... I had earlier compiled 
and installed jpeg-9 into my 3rdParty folder... 

This dependency would go away if OSGDB was used, 
as James mentioned, but then JPEG would probably have 
to be found during the OSG build, unless OSG has 
alternate built-in jpeg code... not sure...

Thereafter, running fgfs.exe with --jpg-httpd=1234 
worked fine by putting http://localhost:1234 is a 
browser, and bingo had a jpg image of the screen 
in the browser ;=)) cool stuff...

Of course it is a 'static' image, and had to refresh 
to get updated images of the flight... or an extension 
added to provide an actual video feed as Curt mentioned...

So I would say it worked as advertised ;=))

HTH.

Regards,
Geoff.

On Tue, 2013-09-17 at 02:41 -0700, Rick Armstrong wrote:
> Hello all,

> I'm a developer using FlightGear in a simulation project for work, and
> I'm currently getting imagery from FlightGear by triggering
> screenshots from my application and loading the screen captures from
> disk. It's kinda Rube Goldberg, but works well enough for a first
> draft. What I'd /really/ like to do is stream the imagery directly to
> my application. Googling around, I notice that there's a command-line
> option to do exactly this! It's not enabled in v2.10, but some more
> searching and I see that it can be enabled by setting 

> -DJPEG_FACTORY:BOOL=ON 

> in CMake. My question: before I go down that road, does anyone know if
> the JPG HTTPD functionality works? If yes, does it work well? The fact
> that it's turned-off by default makes me think that it might not be
> ready for prime-time.

> Any advice is greatly appreciated.

> Regards,

> Rick Armstrong
> Portland, OR, USA

> P.S. We're using Windows 7 VS 2010 and would be looking to build
> 64-bit binaries.



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to