I need to get a camera stream resolution from JPEGLiveSource in standalone application (using MIPSDK 2017 R2):
static void GetResLive(Guid streamid)
{
var jpegLive = new JPEGLiveSource(_camera);
jpegLive.StreamId = streamid;
jpegLive.LiveModeStart = true;
jpegLive.Height = 0;
jpegLive.Width = 0;
jpegLive.Init();
jpegLive.LiveContentEvent += jpegLiveContentEventHandler;
// ... wait for key press here
jpegLive.LiveContentEvent -= jpegLiveContentEventHandler;
jpegLive.Close();
}
jpegLiveContentEventHandler() method just prints LiveContent resolution.
But if I call GetResLive() for the first time with id of any stream (but not default) I get the resolution of default stream. But if I call this method for the second time with same (or another) stream id, the resolution will be correct.
Am I doing something wrong?
Thanks.