-
Notifications
You must be signed in to change notification settings - Fork 56
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
Hang on stop grabbing during WPF form closing #4
Comments
I am also having this problem... |
As far as I can see it happens in webcamlib.cpp @ This is calling Dunno if this only happens in combination with wpf...? So any help would be really appreciated! Cheers, Stephan |
O.k. - after ~6 hours digging and trying different suggestions I think the solution regarding WPF is to seperate threads for updating the imagesource in the window as suggested here: |
@Stephanowicz If you guys figure out solution to problem feel free to update README.md and send me pull request - I'll gladly merge. |
@Stephanowicz can you share your implementation ? thanks in advance. |
Well, did You take a look at |
Yeah.. i tried adding a DispatcherTimer but it still crashes on stop so i figured i might have done something wrong |
O.k., ` in XAML in CS
` |
@Stephanowicz thanks for sharing it. Well, i tried your implementation but it still crashes when The exception: InnerException: Any ideas ? |
Sorry, not really... The idea of the workaround is to put the image into a local resource in If You set up everything like this, it ought to work... |
@Stephanowicz I really appreciate the effort in trying to help me. I'll just leave my code below so you can take a look, but i've done pretty much what you did. `
|
@Stephanowicz i found the problem... it was my mistake. So once again: thanks for your time & help and i'm sorry for my fault. |
Good to hear that it is working now! Cheers, |
Here is the scenario:
1 - I wrote a simple simple WPF form application
2 - At startup I start grabbing the webcam getting frames and displaying them insie a picture box
3 - At close time, inside the WPF form close event I call the webcam capture stop method
4 - The stop capture method never ends!
5 - If I call the stop capture method inside the Dispose method it works!
Could you help me please?
The text was updated successfully, but these errors were encountered: