Beta Release: GPT (cockpit texture extraction, remote cockpit control, shm mirror)
-
Note to self, add used network ports to the manual: 8050-8055ish
-
Well m8 u are on another path here. As u started for the MFD over LAN is fine. But this if it doesn’t work flawlessly over internet will be a dead horse. Have in mind that from the same line must pass falcon heavy mission data, IVC or TeamSpeak data and your app data all synched perfectly performing top knots…
Sounds like a net nightmare. -
Great job man got it working its really nice
-
Well m8 u are on another path here. As u started for the MFD over LAN is fine. But this if it doesn’t work flawlessly over internet will be a dead horse. Have in mind that from the same line must pass falcon heavy mission data, IVC or TeamSpeak data and your app data all synched perfectly performing top knots…
Sounds like a net nightmare.Well I dont have need for it atm. If someone wants to provide code that I can implement then no problem, but for me I’m satisfied with what I got right now. If you really want to share textures online, then someone needs to hook me up with some video encoding source code samples :).
-
Well I dont have need for it atm. If someone wants to provide code that I can implement then no problem, but for me I’m satisfied with what I got right now. If you really want to share textures online, then someone needs to hook me up with some video encoding source code samples :).
In layman terms are you capturing the video of a remote machine? is the issue that you are capturing it without compression at high resolution?
There are tons of open source video encoding algorithms, h264 immediately comes to mind. Xvid would be a logical choice too.
-
Loaded the files per the Manual.PDF…
Would like some guidance with:
a. running on one computer with a secondary monitor (USB LCD or VGA LCD).
I assume that the DisplaysTransmitter.ini file must have (only showing variables having to do with displaying on one PC, the others are in the file but Im not showing them because they are unchanged), are these correct?
[falconhook_shm]
active = 1[falconhook_socket]
addr = “127.0.0.1”b. Setting up the MFD display area on the remote PCs primary or local PCs secondary monitor
To get the Left MFD to display on a secondary monitor (1680x1050 or 800x480)) which is placed to the right of the main monitor (1920x1200)
Again Im guessing here, but do we use the file CONFIG.XML to edit the height and width of the secondary monitor with respect to size of the primary monitor?
If so, the upper left hand corner of the primary monitor is considered (x=0, y=0) and the upper right is (x=1920, y=0)?
Thus, the X_SCR, Y_SCR is the upper left of the remote display area on the secondary monitor, and the W_SCR and H_SCR are the width and height of the height and width of the L MFD area.<displays><left_mfd><active>true</active>
<x_tex>0.625</x_tex>
<y_tex>0.625</y_tex>
<w_tex>0.375</w_tex>
<h_tex>0.375</h_tex>
<x_scr>1920</x_scr>
<y_scr>50</y_scr>
<w_scr>680</w_scr>
<h_scr>680</h_scr>
<alwaysontop>true</alwaysontop>
<border>false</border></left_mfd>c. To run the MFD shared memory on the same PC but secondary monitor, do we just:
1. Put both the contents of the DisplaysTransmitter and DisplaysReciever into the BMS/bin/x86 (for 32 bit systems)
2. Edit the DisplaysTransmitter.ini and Config.XLM files as mentioned in parts A and B above
3. Run the Start.bat and then DisplaysTransmitter appWhat else?
I tried the above and it did not work.
The Manual.PDF does not go to this level of detail for what Im trying to do.Thanks</displays>
-
Loaded the files per the Manual.PDF…
Would like some guidance with:
a. running on one computer with a secondary monitor (USB LCD or VGA LCD).
I assume that the DisplaysTransmitter.ini file must have (only showing variables having to do with displaying on one PC, the others are in the file but Im not showing them because they are unchanged), are these correct?
[falconhook_shm]
active = 1This is stated in the DisplaysTransmitter.ini file. If you set shm to active, then the socket export will be inactive.
This setting is useful if you only intend to draw on the local pc, and not send over network.[falconhook_socket]
addr = “127.0.0.1”None of the “falconhook_socket” settings have any effect when “falconhook_shm” is set to active.
b. Setting up the MFD display area on the remote PCs primary or local PCs secondary monitor
To get the Left MFD to display on a secondary monitor (1680x1050 or 800x480)) which is placed to the right of the main monitor (1920x1200)
Again Im guessing here, but do we use the file CONFIG.XML to edit the height and width of the secondary monitor with respect to size of the primary monitor?
If so, the upper left hand corner of the primary monitor is considered (x=0, y=0) and the upper right is (x=1920, y=0)?
Thus, the X_SCR, Y_SCR is the upper left of the remote display area on the secondary monitor, and the W_SCR and H_SCR are the width and height of the height and width of the L MFD area.<displays><left_mfd><active>true</active>
<x_tex>0.625</x_tex>
<y_tex>0.625</y_tex>
<w_tex>0.375</w_tex>
<h_tex>0.375</h_tex>
<x_scr>1920</x_scr>
<y_scr>50</y_scr>
<w_scr>680</w_scr>
<h_scr>680</h_scr>
<alwaysontop>true</alwaysontop>
<border>false</border></left_mfd></displays>tex coordinates are relative internal positions of the cockpit display data’s coordinates in FBO/render target which is downloaded from VRAM to SYSRAM. If you do not know what that means, do not touch it.
_scr are the desktop coordinates and size of the window. These are global desktop coordiantes, so they relate to your windows desktop setup. If you are unsure, set border to true, and you can move the windows around yourself.
c. To run the MFD shared memory on the same PC but secondary monitor, do we just:
1. Put both the contents of the DisplaysTransmitter and DisplaysReciever into the BMS/bin/x86 (for 32 bit systems)
2. Edit the DisplaysTransmitter.ini and Config.XLM files as mentioned in parts A and B above
3. Run the Start.bat and then DisplaysTransmitter appNo. The DisplaysTransmitter zip contents goes into your x86 folder. This is the direct3d dll hook and the loader. Start falcon by running the loader (the DisplaysTransmitter.exe)
The contents of the DisplaysReceiver.zip you place somewhere you like, basically anywhere, like programs/DisplaysReceiver/.
The start.bat starts the application with maximum java optimizations. You can double click the jar file itself instead, but that yields worse performance.What else?
I tried the above and it did not work.
The Manual.PDF does not go to this level of detail for what Im trying to do.Thanks
Well, there are details in the manual and the ini files, and some of the xml stuff are self explanatory, but it depends on how much experience you have with this stuff. If you have time to make some list (numbered or separated), either as a forum post or some document, then we could perhaps add the answers to those things more detailed in the manual?
-
@Yoda,
Please be patient with me as I struggle to figure this out. I will help with the documentation of how it worked for me and my single PC to USB LCDs application.
I currently do this for DCS using the LUA scripts and Helios for the CDU, and I hope to do the same for FalconBMS.Cheers mate.
-
@Yoda,
Please be patient with me as I struggle to figure this out. I will help with the documentation of how it worked for me and my single PC to USB LCDs application.
I currently do this for DCS using the LUA scripts and Helios for the CDU, and I hope to do the same for FalconBMS.Cheers mate.
No prob, take your time.
PS: IM IM IMI have it set up currently so that as soon as I switch on the main power for my slave PC, it starts up everything. On my main pc I run a startup script and then BMS, and then it’s all alive…really handy. That’s how I would like it to be for any user.
-
Not sure if this could help but I use this program for streaming live. It’s able to multicast, so you could have more than 1 client, and it takes care of all the encoding…
http://www.umediaserver.net/umediaserver/overview.html
RTMP/RTMPT Flash protocol
RTSP IETF RFC2326
H264, MPEG4 Video over RTP IETF RFC3984, IETF RFC3640
AAC, MP3 Audio over RTP ISO/IEC 14496-3, IETF RFC2250
MS-WMSP Windows Media Streaming Protocol
MPEG2-TS ISO/IEC 13818-1SDK is available!
http://www.umediaserver.net/umediaserver/source.html
Contents of the package: COM components, samples and documentation for:
Web-based user administration, Session-based authentication, Custom live transform, Custom encoding support, Alarm acceptors for Motion detection, Custom user logging, Adding/removing resources to/from Media Server configuration metabase, Starting/stopping recording for Live Server, Connecting Live Server to Media Server, Archival Server automation. ActiveX control documentation. Sample web pages hosting ActiveX control. C# player: a simple container of ActiveX control. Flash player and sample web pages hosting it. WebCam Community demo web application demonstrating the use of the SDK for WebCam portals creation.It’s also HTTP streaming compatible, so can be viewed from a browser.
This could also remove the need to program for apple / android devices as most should be java / flash compatible.
Another possible solution? Emulating your output as a “WDM virtual camera device” could technically allow it to interface with any real time streaming solution.
Latency would be the main hurdle, I figure.
-
Not sure if this could help but I use this program for streaming live. It’s able to multicast, so you could have more than 1 client, and it takes care of all the encoding…
http://www.umediaserver.net/umediaserver/overview.html
RTMP/RTMPT Flash protocol
RTSP IETF RFC2326
H264, MPEG4 Video over RTP IETF RFC3984, IETF RFC3640
AAC, MP3 Audio over RTP ISO/IEC 14496-3, IETF RFC2250
MS-WMSP Windows Media Streaming Protocol
MPEG2-TS ISO/IEC 13818-1SDK is available!
http://www.umediaserver.net/umediaserver/source.html
Contents of the package: COM components, samples and documentation for:
Web-based user administration, Session-based authentication, Custom live transform, Custom encoding support, Alarm acceptors for Motion detection, Custom user logging, Adding/removing resources to/from Media Server configuration metabase, Starting/stopping recording for Live Server, Connecting Live Server to Media Server, Archival Server automation. ActiveX control documentation. Sample web pages hosting ActiveX control. C# player: a simple container of ActiveX control. Flash player and sample web pages hosting it. WebCam Community demo web application demonstrating the use of the SDK for WebCam portals creation.It’s also HTTP streaming compatible, so can be viewed from a browser.
This could also remove the need to program for apple / android devices as most should be java / flash compatible.
Another possible solution? Emulating your output as a “WDM virtual camera device” could technically allow it to interface with any real time streaming solution.
Latency would be the main hurdle, I figure.
Thanks for investigating.
If anyone is willing to produce some C++ code samples using such tools (though I’d prefer ffmpeg), I could work from there. Personally though I’m not going to spend time doing it from scratch. Don’t get me wrong I’m very grateful for your help here, it’s just that for me it’s not something I want to prioritize atm. For my purposes I’ve got enough as it is. Give me a couple of source code samples? Thats another story, I could implement something better frmo there :). -
No prob, take your time.
PS: IM IM IMI have it set up currently so that as soon as I switch on the main power for my slave PC, it starts up everything. On my main pc I run a startup script and then BMS, and then it’s all alive…really handy. That’s how I would like it to be for any user.
I tried the boarders enabled, and still I dont see any windows on my primary or secondary monitors (tried USB and VGA).
Theres something Im not doing right, and I havent figured it out yet. Where does the SHM-TX and SHM-RX fit into the display on one PC use model fit into this methodology?Regarding your startup script:
That would make a nice small GUI application, to have it start all GPTs or selectively, then save config.
Or just provide the script and let folks edit what they wanted started and when.Regarding IM, IM, IM…
I found you on SKYPE, left you an IM. Youre probably sleeping at 5PM PST or 1AM GMT. Sweden and Pacific Coast USA arent so easliy IMed. Maybe weekends. -
I tried the boarders enabled, and still I dont see any windows on my primary or secondary monitors (tried USB and VGA).
Theres something Im not doing right, and I havent figured it out yet. Where does the SHM-TX and SHM-RX fit into the display on one PC use model fit into this methodology?Just run the DisplaysReceiver startup script (start.bat). What happens? Do you get any errors in the batch/cmd window? Does it disappear or stay?
SHM-TX and SHM-RX: Are not used. These are only used to share flight- and cockpit switch data, should you wish to for example run helios on another computer. They are not needed in any way for the displays to work. GPT = 3 different tools, independent of each other. Displays, SHM, Remote Keyboard.Can you verify that java 7 (sometimes referred to as 1.7) is installed on your computer?
open a cmd window and type:
java -versionThe results should be something like:
Microsoft Windows [Version 6.1.7601]
Copyright 2009 Microsoft Corporation. All rights reserved.C:\Users\GiGurra>java -version
java version “1.7.0_04”
Java SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot 64-Bit Server VM (build 23.0-b21, mixed mode)C:\Users\GiGurra>
Regarding your startup script:
That would make a nice small GUI application, to have it start all GPTs or selectively, then save config.
Or just provide the script and let folks edit what they wanted started and when.Config files are already saved on each program shutdown. The script is already in each released zip file.
Edit _scr coordinates in config.xml, move the windows while it’s active, you’ll see it appears at that new position.
If you want to make a master script it’s just like any other bat/batch file in windows.Example from my master PC:
set DIR0=%cd%
set BASE=“C:\Users\GiGurra\workspaceJavaFsim”
cd %BASE%/ShmTransmitter/dist
START/B start.bat
cd %BASE%/KeyComReceiver/dist
START/B start.bat
cd %DIR0%
START/B TrackIR5.lnk
START/B CH_CM.lnk
START/B VACSystem.lnkExample from my slave PC:
set DT=%cd%
set BASE=“C:\Documents and Settings\j\workspace2”
cd %BASE%/ShmReceiver/dist
START/B start.bat
cd %BASE%/KeyComTransmitter/dist
START/B start.bat
cd %BASE%/DisplaysReceiver/dist
START/B start.bat
cd %DT%
Helios.lnkRegarding IM, IM, IM…
I found you on SKYPE, left you an IM. Youre probably sleeping at 5PM PST or 1AM GMT. Sweden and Pacific Coast USA arent so easliy IMed. Maybe weekends.Hooray :). But we have very high probability that at some point we’ll happen to be online at the same time
-
Hi GiGurra,
first of all thank you for the program. It works great.
i have encountered just one problem with the display extraction.
If I run directly the DisplayReceiver.jar i get it to work, but if I try to use the start.bat, the cmd window will popup and dissapear almost inmediately.
It only happens if i do it on a separate PFC. i have trid running all on the same PC and I didnt have that problem
I was not expecting the program to be so CPU hungry. My second PC is an old Athlon64 and the framerate is really poor. But it is a start. Maybe it will improve when I am able to run it through the start.bat. Let´s see
tahnks again
-
Hi GiGurra,
first of all thank you for the program. It works great.
i have encountered just one problem with the display extraction.
If I run directly the DisplayReceiver.jar i get it to work, but if I try to use the start.bat, the cmd window will popup and dissapear almost inmediately.
It only happens if i do it on a separate PFC. i have trid running all on the same PC and I didnt have that problem
I was not expecting the program to be so CPU hungry. My second PC is an old Athlon64 and the framerate is really poor. But it is a start. Maybe it will improve when I am able to run it through the start.bat. Let´s see
tahnks again
start.bat failing happens when your java installation is not working 100%. (when java.exe is not on Windows search path).
Add your jre/bin folder to the PATH variable, and the bat will work (normally the JRE installation does this for you afaik).On my slave PC (2.6 GHz generation 1 i7 with GT210 GPU) I see 6% CPU usage, and those 6% are entirely due to decompressing JPEGs.
This decompression is done outside java (in the C library called turbojpeg), so for me I would expect it to make little diff if I run that one with or without start.bat (the start.bat only improves java performance, that is not to say it MIGHT improve your performance). 6% is the result if I run the export at 50 Hz. If I run it at 100 Hz (also possible), then it goes up to 12% naturally.Eventually if we move away from jpeg encoded frames to something like ffmpeg encoded video stream, that might reduce CPU usage.
Also it’s very important that you have good PCI-express bandwidth to the GPU on your slave system (for example it will never work with a classic PCI graphics card). After decompressing each image, it has to upload the image raw each frame, so that’s a lot of bandwidth (SYSRAM->VRAM).
-
Hi GiGurra,
great work. Working perfect on my setup.
Just one thing…… Is it possible to connect more than 1 client to the shared memory transmitter?
If that is possible, could you tell me how?I’m planning on using 2 small laptops as MFD’s. One one each side of the CP. (in my future pit… work in progress).
Ringo
-
Hi GiGurra,
great work. Working perfect on my setup.
Just one thing…… Is it possible to connect more than 1 client to the shared memory transmitter?
If that is possible, could you tell me how?I’m planning on using 2 small laptops as MFD’s. One one each side of the CP. (in my future pit… work in progress).
Ringo
Just run two copies of the ShmTransmitter with different config files and it will work for flight data and switches.
In the future I might make it work from a single transmitter instance, but for now you must use two.However for MFDs you do NOT use ShmTransmitter, you use the injected dll (DisplaysTransmitter) which sends encoded jpeg images, and these cannot be sent to two (it doesnt support it, and because you cant run 2 bms.exe). Perhaps this will be supported at a later point.
Another way is to have the DisplaysTransmitter just dump raw rbga frames in SHM and write your own compression and distribution code. -
Thanks for the quick answer.
Guess I have to find a small monitor and connect it to 1 of the laptops……
Anyway… Thank you again for the program. Now I can run BMS on my 3 monitors and still have the MFD’s extracted.
Ringo
-
GiGurra: Just run the DisplaysReceiver startup script (start.bat). What happens?
Do you get any errors in the batch/cmd window? Does it disappear or stay?AV8R: The window goes away immediately.
So I opened up a CMD prompt window, changed directory to where I put the reciever files (which happened to be the same place as the transmit files under x86)
ran the START.BAT file in the CMD window and it tells all…E:\SIMS\Falcon BMS\Bin\x86>java -server -jar DisplaysReceiver.jar
Error: missingserver' JVM at
C:\Program Files\Java\jre7\bin\server\jvm.dll’.
Please install or use the JRE or JDK that contains these missing components.Apparently, im missing something with the JAVA install I did. Heres the one I installed for my Win Vista 32 bit system:
http://www.oracle.com/technetwork/java/javase/downloads/jre-7u4-download-1591157.html
Windows x86 Offline (32-bit) 20.08 MB jre-7u4-windows-i586.exe==> Maybe Im seeing the same problem as did the earlier post where the BAT file didnt run due to path to the JAR files?
Note too, that the error looks under the SERVER folder for the file JVM.DLL.
For the install I have, theres a CLIENT folder and no SERVER folder.
Makes me think I need to load the ONLINE version too? Will try that.GiGurra: SHM-TX and SHM-RX: Are not used. These are only used to share flight- and cockpit switch data, should you wish to for example run helios on another computer. They are not needed in any way for the displays to work. GPT = 3 different tools, independent of each other. Displays, SHM, Remote Keyboard.
AV8R: OK I got it, these are remote control of keyboard strokes from another PC. For my single PC application, this is unnecessary.
GiGurra: Can you verify that java 7 (sometimes referred to as 1.7) is installed on your computer?
open a cmd window and type:
java -versionAV8R: yes, but I get a different version number, maybe cause Im on 32 bit?
C:\Users\AV8R>java -version
java version “1.7.0_04”
Java SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot Client VM (build 23.0-b21, mixed mode, sharing)GiGurra: Hooray :). But we have very high probability that at some point we’ll happen to be online at the same time
AV8R: Yes Horrah! But my Swedish is quite bad. Hope your English can be understood by Californian Surfish. ;)))
Thanks mate. I think we are getting to the source of the problem. The Java install.
-
GiGurra: Just run the DisplaysReceiver startup script (start.bat). What happens?
Do you get any errors in the batch/cmd window? Does it disappear or stay?AV8R: The window goes away immediately.
So I opened up a CMD prompt window, changed directory to where I put the reciever files (which happened to be the same place as the transmit files under x86)
ran the START.BAT file in the CMD window and it tells all…E:\SIMS\Falcon BMS\Bin\x86>java -server -jar DisplaysReceiver.jar
Error: missingserver' JVM at
C:\Program Files\Java\jre7\bin\server\jvm.dll’.
Please install or use the JRE or JDK that contains these missing components.Apparently, im missing something with the JAVA install I did. Heres the one I installed for my Win Vista 32 bit system:
http://www.oracle.com/technetwork/java/javase/downloads/jre-7u4-download-1591157.html
Windows x86 Offline (32-bit) 20.08 MB jre-7u4-windows-i586.exe==> Maybe Im seeing the same problem as did the earlier post where the BAT file didnt run due to path to the JAR files?
Note too, that the error looks under the SERVER folder for the file JVM.DLL.
For the install I have, theres a CLIENT folder and no SERVER folder.
Makes me think I need to load the ONLINE version too? Will try that.GiGurra: SHM-TX and SHM-RX: Are not used. These are only used to share flight- and cockpit switch data, should you wish to for example run helios on another computer. They are not needed in any way for the displays to work. GPT = 3 different tools, independent of each other. Displays, SHM, Remote Keyboard.
AV8R: OK I got it, these are remote control of keyboard strokes from another PC. For my single PC application, this is unnecessary.
GiGurra: Can you verify that java 7 (sometimes referred to as 1.7) is installed on your computer?
open a cmd window and type:
java -versionAV8R: yes, but I get a different version number, maybe cause Im on 32 bit?
C:\Users\AV8R>java -version
java version “1.7.0_04”
Java SE Runtime Environment (build 1.7.0_04-b22)
Java HotSpot Client VM (build 23.0-b21, mixed mode, sharing)GiGurra: Hooray :). But we have very high probability that at some point we’ll happen to be online at the same time
AV8R: Yes Horrah! But my Swedish is quite bad. Hope your English can be understood by Californian Surfish. ;)))
Thanks mate. I think we are getting to the source of the problem. The Java install.
You’re mostly correct, but SHM RX/TX is not for Keyboard commands. It’s for shared memory blocks containing flight, switch and light bits data. :).
It would seem the standard JRE 7 does not contain a server JVM? How odd… Well you can run the JAR files directly then, but that might cost a bit of performance.
If you want to get around this you can download and install the java 7 JDK instead, then edit the windows environment variable PATH and set replace the jre/bin path with jdk/bin/ (In my case it’s C:\Program Files\Java\jdk1.7.0_04\bin)
Microsoft Windows [Version 6.1.7601]
Copyright 2009 Microsoft Corporation. All rights reserved.C:\Users\GiGurra>java -version
java version “1.7.0_04”
Java SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot 64-Bit Server VM (build 23.0-b21, mixed mode)See the last line? That should be there…hmm.
I’ve updated the manual to briefly explain this issue, and I’ve also released a new version of the software which adds a “pause” command at the end of each start.bat. This means the window will not just disappear anymore when it fails to start, but it waits for you to press the “any key” (so you can read any error messages).