STANAG 4609 Player .NET SDK
Version 4.0.0
|
STANAG Player SDK can serve as a client for the STANAG OnDemand server VMS.
By default, the demo application is installed in "C:\Program Files\ImpleoTV\StanagPlayerSdkNet\Samples\KlvPlayerStServerClientTestApp" directory. Open the KlvPlayerStServerClientTestAppPr.sln solution and build it as a 64 bit application (debug or release).
Make sure NuGet packages are restored.
The code is very similar to the code in the basic file/stream console app. STANAG OnDemand server VMS has a REST API interface and can be used by a client to get a video url. This url should be then provided to the player. You can use any method to access the server. The demo application is using a helper library StServerUtils that handles some basic tasks.
In order to use it, add the reference to the StServerUtils and make sure RestSharp and SocketIOClient nuget libraries are installed.
First, make sure you have all prerequisites in place. For more info on Prerequisites.
Create the player instance:
Setup events
Create StServerUtils instance and wire events:
StServer_StateChanged event will report the state. When the server is online, you can query it for a list of available missions. Once you have a mission name, get a video url using m_StServer.BuildSensorUrl method.
Initialize the Player
Optional parameters:
Now, all you need is to start playback.
Video will be rendered in the Window provided during the initialization phase and OnKlvDataEvent method will be called on Klv data arrival.
During the playback, the relevant events (if set) will be fired.
For a complete code sample please use the KlvPlayerStServerClientTestApp demo project.