-
Notifications
You must be signed in to change notification settings - Fork 0
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
Timekeeping broken/Dropped frames not reported #33
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any progress on this issue? Not being able to keep track of the 'real' index of a frame drastically reduces the utility of this plugin for us unfortunately. |
Sorry for the slow response on this. Basically we need to investigate this further to see if this is an internal DirectShow issue or something to do with our plugin implementation, the latter which we could then look into improving. We will look into it ASAP just haven't had anyone available to do so. Thank you for your patience. |
I've tested as far back as 2.7.5 without any change, so now imagining that this is more structural. Is there a device timestamp for each frame that could at least be acquired to calculate an approximate 'realtime' frame index? Otherwise we're stuck using when we see the new frame is available, which introduces a bunch of variability/latency. |
We could probably expose a device timestamp quite easily, if this would work for you? The underlying issue being that even if we expose the timestamp, it's still tricky to know if the frame you have is the frame you have the timestamp for - addressing this issue requires a more fundamental fix that we need to spend some proper time on. Let us know if simply exposing the timestamp could help you. |
Sorry, just a call like Plugin.GetDeviceTimestamp() isn't going to help, since it is really more data about the specific frame being accessed that I need. If the timestamp was for the active frame, at least I could calculate if it's 33ms higher than the last one (= no drops) or more (= drops), for example and make up an index from that. Can you explain what the GetCaptureDroppedFrames() function does report since I might still be missing some aspect of the timing. |
The timestamp would be for the active frame. We can add this in for you. |
OK thanks! Definitely a leg up on the timing in cases where we're trying to match things up precisely. Let know know if you want me to try out a build. |
We had a look into this and it doesn't seem as straightforward as anticipated. We'll have to see if we have any luck with this in the future, otherwise it might be something for our next major version. |
OK well thanks for investigating. Glad to have at least surfaced the value in having this type of information available. |
Have come back to this and am at a bit of a loss as to why it's not feasible to implement passing along the timestamp that each DirectShow MediaSample (as long as not preview pin) has per the DirectShow docs. Feels like a core component of DirectShow and functionality that will really allow this plugin to sync with Unity better. That page also mentions accessing Media Times which seem even more appropriate for my purposes. Anyway would love any more insight into the blockers if possible. Thanks! |
Bug Description
GetLastFrame/GetLastFrameUploaded doesn't increase at the rate predicted by CurrentFramerate, and GetCaptureDroppedFrames doesn't report any dropped frames during testing despite CaptureFPS dropping below CurrentFramerate. This significantly limits our ability to accurately perform timekeeping on inputs.
My Setup:
To Reproduce
Example Results
![image](https://user-images.githubusercontent.com/26749774/123843237-89165b00-d8c6-11eb-8162-1b30201400c7.png)
The text was updated successfully, but these errors were encountered: