Open LuckyTeng opened 6 years ago
Thank you for this information. I don't see why Stop() should affect SnapshotSourceImage(), if everything should be reinitialized every change of camera.
Yes, Stop() didn't affect SnapshotSourceImage() Buf if you stop "Camera Frame" service in Window 10, SnapshotSourceImage() will not work.
Buf if you stop "Camera Frame" service in Window 10, SnapshotSourceImage() will not work.
I don't know the proper way to deal with this new service. If you ever find out please tell me.
I think the behavior of DirectX in windows 10 is changed, in order to let multi apps access the camera at the same time, "Camera Frame" service will capture the image save into buffer, and DirectX interface will access that buffer, but my working environment is windows 7, so I don't know how to handle it properly.
I have a window10 tablet, it has front and rear camera, when I change one to another, it stop responding.
I think in CloseAll() function, it call StopWhenReady(), this is asyc call, and it behavior is different than prior.
And window 10 introduce a new service, "Camera Frame", it allows multiple apps to get the frame of camera at the same time.
So my solution is as below, remove StopWhenReady() in CloseAll():
try
{
//DX.MediaControl.StopWhenReady();
DX.MediaControl.Stop();
}
It stop normally but the sideeffect is that SnapshotSourceImage() does't work.Any perfect solution?