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

Unibrain Fire-i Board BW freeze fix #37

Open
ecolner opened this issue Oct 25, 2016 · 3 comments
Open

Unibrain Fire-i Board BW freeze fix #37

ecolner opened this issue Oct 25, 2016 · 3 comments

Comments

@ecolner
Copy link

ecolner commented Oct 25, 2016

I was experiencing freezes using the Unibrain Fire-i Board BW FireWire camera. After adding logging and testing start/acquire/stop for 24 hours I determined the filter graph as configured is incompatible with this particular device. Note that the Logitech Webcam C170 USB device that I'm using for testing did not experience any freezes with the original graph or the new graph after my code change.

The filter that seems to have caused the issue is the IMediaFilter with SetSyncSource to NULL.

I've commented this code and my test passed without any freezes.

// EXP - lets try setting the sync source to null - and make it run as fast as possible
{
    IMediaFilter *pMediaFilter = 0;
    hr = VD->pGraph->QueryInterface(IID_IMediaFilter, (void**)&pMediaFilter);
    if (FAILED(hr)){
        if(verbose)printf("ERROR: Could not get IID_IMediaFilter interface\n");
    }else{
        pMediaFilter->SetSyncSource(NULL);
        pMediaFilter->Release();
    }
}

https://msdn.microsoft.com/en-us/library/windows/desktop/dd377588(v=vs.85).aspx

You can also set the filter graph to run with no clock, by calling SetSyncSource with the value NULL. If there is no clock, the graph runs as quickly as possible. With no clock, renderer filters do not wait for a sample's presentation time. Instead, they render each sample as soon as it arrives. Setting the graph to run without a clock is useful if you want to process data quickly, rather than previewing it in real time.

@ofTheo
Copy link
Owner

ofTheo commented Oct 19, 2019

just saw this - wow, so basically if this whole block is commented out it stops the freezing issue?

@ecolner
Copy link
Author

ecolner commented Oct 21, 2019

Yes, that's correct. I built a fork with the change, which works for our purposes, but I think the correct approach is to make this block configurable. I'll send you the exact line numbers that I commented when I get to the office tomorrow.

@ecolner
Copy link
Author

ecolner commented Oct 21, 2019

I've double checked this. It's the entire block that I've commented out. The lines are 2109-2119.

@ecolner ecolner closed this as completed Oct 21, 2019
@ecolner ecolner reopened this Oct 21, 2019
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

No branches or pull requests

2 participants