How to capture the Jpeg Image From JPEGLiveSource? Is any Sample application available?
Start with the documentation, you’ll find everything there.
JPEGLiveSource
JPEGLiveSource source = new JPEGLiveSource(item);
source.Init();
source.LiveModeStart = true;
source.LiveContentEvent += (s, e) =>
{
var args = e as LiveContentEventArgs;
if(args != null)
{
if (args.LiveContent != null)
{
Console.WriteLine("The resolution of the live image " +
"from camera {0} is ({1},{2})",
item.Name,
args.LiveContent.Width,
args.LiveContent.Height);
}
else if (args.Exception != null)
{
Console.WriteLine("Error occurred: " + args.Exception.Message);
}
}
};
JPEGVideoSource
JPEGVideoSource source = new JPEGVideoSource(item);
source.Init();
JPEGData frame = source.GetNearest(DateTime.Now) as JPEGData;
Hi,
I have added the code as you explained and executed same.
But source.LiveContentEvent is not triggered, so I am not getting any image.
When I debugged the code, I have seen source.LiveModeStart remains still false after we set it true.
Also flag source.CurrentStatusFlags get returns ClientLiveStopped
What will be the reason for all above issue/flag and how to fix it?
Thanks.
Are you using a valid/connected camera item in the constructor? Check out the sample project MediaLiveViewer.
Yes, I have using valid Camera,
If I use same Camera in JPEGVideoSource and I am able to get Image in GetAtOrBefore(DateTime.Now) method.
@Felix Östh & @Shibi Chacko any updates on this Issue ?
The MIP SDK sample CameraStreamResolution does this.
Please explore the sample. If the sample works for you you can probably also utilize the code.