20,741
edits
No edit summary |
|||
| Line 146: | Line 146: | ||
}} | }} | ||
}} | }} | ||
== Screen Shots == | |||
{{FGCquote | |||
|You can access the new screenshot handler after starting with <br/> | |||
--httpd{{=}}8080 at http://localhost:8080/screenshot<br/> | |||
<br/> | |||
It understands some request parameters:<br/> | |||
type: either png or jpg (guess what this does)<br/> | |||
window: the name of the window to capture (for those with multi screen <br/> | |||
setups)<br/> | |||
stream: provide mjpeg stream | |||
|{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32889510/ | |||
|title=<nowiki>[Flightgear-devel] Heads up: --jpg-httpd is gone</nowiki> | |||
|author=<nowiki>Torsten Dreyer</nowiki> | |||
|date=<nowiki>2014-10-02</nowiki> | |||
}} | |||
}} | |||
{{FGCquote | |||
|Examples:<br/> | |||
<br/> | |||
http://localhost:8080/screenshot?type=png<br/> | |||
send png instead of jpg (jpg is default)<br/> | |||
<br/> | |||
http://localhost:8080/screenshot?type{{=}}png&window{{=}}WindowA<br/> | |||
send a png screenshot from the window named "WindowA" as defined under <br/> | |||
rendering/camera-group/window/name in your screen configuration.<br/> | |||
<br/> | |||
http://localhost:8080/screenshot?window{{=}}WindowA<br/> | |||
do the same as before, but use default jpg encoding | |||
|{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32889510/ | |||
|title=<nowiki>[Flightgear-devel] Heads up: --jpg-httpd is gone</nowiki> | |||
|author=<nowiki>Torsten Dreyer</nowiki> | |||
|date=<nowiki>2014-10-02</nowiki> | |||
}} | |||
}} | |||
{{FGCquote | |||
|http://localhost:8080/screenshot?window{{=}}WindowA&stream{{=}}y<br/> | |||
same as before, but not just send a single image but a motion-jpeg <br/> | |||
encoded video stream.<br/> | |||
Can be used by ffmpeg to directly encode various video formats.<br/> | |||
try ffplay -f mjpeg http://localhost:8080/screenshot/stream{{=}}y<br/> | |||
<br/> | |||
Compression level for PNG is hardcoded to 9 (highest) and JPEG_QUALITY <br/> | |||
hardcoded to 80.<br/> | |||
These seem to be a good balance of performance vs. quality. | |||
|{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32889510/ | |||
|title=<nowiki>[Flightgear-devel] Heads up: --jpg-httpd is gone</nowiki> | |||
|author=<nowiki>Torsten Dreyer</nowiki> | |||
|date=<nowiki>2014-10-02</nowiki> | |||
}} | |||
}} | |||
== Web-based EFIS == | == Web-based EFIS == | ||
| Line 218: | Line 271: | ||
}} | }} | ||
== EFIS via SVG == | |||
{{FGCquote | |||
|I use Inkscape to draw the svgs. The elements to animate are selected by <br/> | |||
their id attribute, so you have to set a reasonabl name for those.<br/> | |||
To get proper scaling of the svg, you need to set the viewBox, width, <br/> | |||
height and preserveAspectRation of the <svg> element.<br/> | |||
It should be also possible to draw svg on the fly e.g. from svg.js and <br/> | |||
animate this, too. I havn't looked into this so far.<br/> | |||
<br/> | |||
The port number for the httpd is set from the commandline, use whatever <br/> | |||
suits your needs. No other ports are involved or hardcoded, everything <br/> | |||
runs over http protocol at that port, the websocket included. The <br/> | |||
individual services are distinguished by their url (/props/, /json/, <br/> | |||
/screenshot/, PropertyListener etc). Again, everything runs over port <br/> | |||
8080 (or whatever you told http to bind to). | |||
|{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32854893/ | |||
|title=<nowiki>Re: [Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki> | |||
|author=<nowiki>Torsten Dreyer</nowiki> | |||
|date=<nowiki>2014-09-22</nowiki> | |||
}} | |||
}} | |||
{{FGCquote | |||
|Personally, I like to stick with fgdata as the repo. Master branch is a <br/> | |||
good enough playground. During the development cycle things don't <br/> | |||
necessarily have to be stable to get checked in there, if they are new <br/> | |||
and mostly unused parts and do not get sucked into the running fgfs <br/> | |||
instance.<br/> | |||
I am planning to move the .js library files out of the aircraft <br/> | |||
directory into common fgdata once they seem to be in someway usable.<br/> | |||
If you want to contribute to that area, I'm happy to handle merge <br/> | |||
requests or appyl diffs. | |||
|{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32854893/ | |||
|title=<nowiki>Re: [Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki> | |||
|author=<nowiki>Torsten Dreyer</nowiki> | |||
|date=<nowiki>2014-09-22</nowiki> | |||
}} | |||
}} | |||
== Why Phi ?== | == Why Phi ?== | ||