- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I observed that when I use StreamFrames with a false flag my programs get stuck when I try to stop streaming frames.
According to the documentation StreamFrames method in SenseManager takes a boolean; true for blocking and false for non-blocking.
I am starting my stream like this:
_senseManager.StreamFrames(false);
and to stop it I call:
_senseManager.Close(); _senseManager.Dispose()
This hangs the program when the Close method is called.
However, if I create a new Thread and I call StreamFrames with a true flag everything works fine when I call Close and Dispose.
Something like this works fine:
Task.Factory.StartNew(() => { _senseManager.StreamFrames(true); });
Is this normal? Am I doing something wrong? I would like to call the non-blocking version of StreamFrames but also be able to Close it.
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This video may be of help. It explains how to access the raw frames in both modes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I understand, my approach is exactly the same as the one proposed in the video.
The only difference I can see is that the video is using C++ instead of C#. This shouldn't make a difference however...
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pol P. wrote:
As I understand, my approach is exactly the same as the one proposed in the video.
The only difference I can see is that the video is using C++ instead of C#. This shouldn't make a difference however...
Thanks,
Double check the function names though. I remember there were a bit different in different languages. Something like Close in C++ vs CloseDown in C#, or something similar. Or maybe they changed that now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just looked up the documentation and the function you have to call is called Close (same as in C++).
Here:
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. If you did everything right there might be a bug in the C# implementation...
I guess Intel guys would need to have a sample code to check for this.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page