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

Fix for deadlock when seek fails #25

Closed
wants to merge 1 commit into from

Conversation

fran6co
Copy link

@fran6co fran6co commented Oct 5, 2014

When the seek fails the m_SeekCompleteInternalEvent is not emited and blocks the thread.

When the seek fails the m_SeekCompleteInternalEvent is not emited and blocks the thread.
@ntisserand
Copy link

Hi Francisco,

Apologies for the long delay, we'll be more responsive in the future.

I looked at your fix it seems reasonable, so I cherry-picked it, and added another commit on top of it, so that seeking failures are reported: 3f776fb

Both are pushed to the develop branch. Let me know if that works for you.

Last but not least, I unfortunately did not exercise the failure code path. How do you actually trigger the seeking failures on your side? I'd like to reproduce it too.

@fran6co
Copy link
Author

fran6co commented Jan 22, 2015

I was doing some unit cases where I had to extract frame per frame. I'll have to dig to get that code back, but I was pausing and seeking to a specific frame. I'll update this issue if I manage to extract that code. I don't think your commit is enough to fix this.

@fran6co
Copy link
Author

fran6co commented Jan 22, 2015

Oh, I didn't see that my commit was there too.

@fran6co fran6co closed this Jan 22, 2015
@fran6co fran6co deleted the patch-3 branch January 22, 2015 21:20
@ntisserand
Copy link

Cool! Keep us posted!

@fran6co
Copy link
Author

fran6co commented Jan 22, 2015

float speed = -1;
oniDeviceSetProperty(device, ONI_DEVICE_PROPERTY_PLAYBACK_SPEED, &speed, sizeof(speed));

for(int frame = 0;frame<100;frame++){
   OniSeek seek;
   seek.frameIndex = frame;

   seek.stream = depthStream;
   oniDeviceInvoke(device, ONI_DEVICE_COMMAND_SEEK, &seek,sizeof(seek));
   seek.stream = rgbStream;
   oniDeviceInvoke(device, ONI_DEVICE_COMMAND_SEEK, &seek,sizeof(seek));

   // Wait for frame in the callbacks
}

The code is something like this, the wait for frame in the callbacks it's in some custom wrappers that make the interface synchronic.

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

Successfully merging this pull request may close these issues.

None yet

2 participants