Hi Milestone Support,
I’m encountering a challenge while integrating a live stream from the MIP SDK into another application. While using StreamDataSource seems like a promising approach, I’m unsure how to proceed further.
Here’s the code snippet I have so far:
private void StartLiveStream(VideoOS.Platform.Item camera)
{
const int port = 7777;
UdpClient udpClient = new UdpClient(port);
Console.WriteLine($"Streaming server started on port {port}");
while (true)
{
if (Console.KeyAvailable) break;
// Current approach using StreamDataSource
StreamDataSource streamSource = new StreamDataSource(camera);
var stream = streamSource.GetTypes()[0]; // Clarification needed
// Intended outcome (replace with actual stream handling)
// udpClient.Send(sourceDgram, sourceDgram.Length, new IPEndPoint(IPAddress.Broadcast, port));
// Simulate 30 FPS frame rate
Thread.Sleep(33);
}
udpClient.Close();
}
My specific questions are:
- Retrieving Stream Data: How can I effectively access the actual video stream data using StreamDataSource or other suitable MIP SDK methods?
- Data Format: What format is the retrieved stream data in (e.g., raw bytes, encoded frames)?
I’d greatly appreciate any insights or recommendations you can offer to help me successfully integrate a live stream from the MIP SDK.
Thank you for your time and support.
Sincerely,