Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
Nidhi
Posts: 4
Joined: Thu Jun 13, 2019 9:23 am

Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Post by Nidhi »

Hello , I am trying to stream a view from Prepare3D to VLC player. I have been able to stream the active view using SimConnect_BeginVideoStream and using the following sdp file

v=0
s=No Name
t=0 0
m=video 1234 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization - mode = 1

The video stream works fine but when I try and end the session using SimConnect_EndVideoStream the streaming does not stop until and unless I close the prepare3D application.

Also, I am unable to stream any other view except the active view. I am not exactly sure what szViewName should be set to in SimConnect_BeginVideoStream, as if I set it to view named Spot still the active view is streamed. Changing the view using SimConnect_ChangeView to Spot works fine so I don't think the name is wrong.

While trying to stream view named spot the sdp file I use is as following

v=0
s=Spot
t=0 0
m=video 1234 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization - mode = 1

I want to stream any view selected by the user regardless of what the active view is.

Thanks
Nidhi
Nidhi
Posts: 4
Joined: Thu Jun 13, 2019 9:23 am

Re: Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Post by Nidhi »

I have got the SimConnect_EndVideoStream working ,I was closing the Simconnect handle before closing the stream .
I still need help with changing streaming to a different view other than the active view. I am not exactly sure what szViewName should be set to in SimConnect_BeginVideoStream, as if I set it to view named Spot still the active view is streamed. Changing the view using SimConnect_ChangeView to Spot works fine so I don't think the name is wrong.
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3703
Joined: Wed Aug 24, 2011 1:37 pm

Re: Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Post by Rob McCarthy »

Hello,

Try the name of the window that shows up when you undock the view. It will be the name of the camera followed by the view number, i.e. "Cockpit - View 01"

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
Nidhi
Posts: 4
Joined: Thu Jun 13, 2019 9:23 am

Re: Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Post by Nidhi »

Thank you Rob, but I still could not get it to work . The window title is Cockpit - View 00 for me , I tried using that but I am still getting the default view . The sdp file I am using does not has any session name currently, do I need to change that and what will be the session name. I tried Cockpit - View 00 it didn't work at all ,I didn't get any video stream.

Kind Regards
Nidhi
Nidhi
Posts: 4
Joined: Thu Jun 13, 2019 9:23 am

Re: Video Stream EndVideoStream not working and not able to stream any other view except the active view.

Post by Nidhi »

Hello,

We have managed to figure out the issue , I can stream a view now with the view name suggested by Rob .

The issue is the view we want to stream should be running in addition to the default view. What we were looking for was streaming view that is not running on the screen. We can only stream views that are on screen at the time.

The other thing we noticed was if we change the view the title of the window changes, but the streaming still continues. I am able to close the streaming with the view name I started the streaming with, but cannot close the view using the same name.To close the view I need the new title from the window. So, initially the view name is same as title, but to close view and to end stream we need different names if the view has been changed.

Example:
1. Start Prepare 3D the window title for the running view is Virtual Cockpit -View 00.
2. Start another view by going to View->New View->Spot.
3. The new window name is Spot - view 02.
4. Start Streaming Spot - view 02 , streaming of the view works fine.
5. Click on the window titled Spot - view 02.
6. Change view Views->Change view ->Nearest Tower. Now the view is Nearest Tower -view 02.
7. Streaming still keeps on running.
8. To close stream I still need to use SimConnect_EndVideoStream with spot - view 02.But to close the view I have to use Nearest Tower -02.

The documentation for Prepare3d fails to explain the difference between different variables used for names of view and camera and format expected for them.

Kind Regards
Nidhi
Post Reply