Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not stop properly in window 10 #12

Open
LuckyTeng opened this issue May 29, 2018 · 4 comments
Open

Can not stop properly in window 10 #12

LuckyTeng opened this issue May 29, 2018 · 4 comments

Comments

@LuckyTeng
Copy link

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?

@LuckyTeng LuckyTeng changed the title Can stop properly in window 10 Can not stop properly in window 10 May 31, 2018
@free5lot
Copy link
Owner

Thank you for this information. I don't see why Stop() should affect SnapshotSourceImage(), if everything should be reinitialized every change of camera.

@LuckyTeng
Copy link
Author

Yes, Stop() didn't affect SnapshotSourceImage()
Buf if you stop "Camera Frame" service in Window 10, SnapshotSourceImage() will not work.

@free5lot
Copy link
Owner

free5lot commented Jun 24, 2018

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.

@LuckyTeng
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants