-
Notifications
You must be signed in to change notification settings - Fork 152
[GStreamer][MSE] Remove use of timeouts completely on AppendPipeline #23
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
Conversation
8082ea7
to
5f4af99
Compare
This reverts commit f118607.
Removed useless checks
5f4af99
to
b2dd25f
Compare
This replaces the whole end of append detection with custom downstream events and also solves the issue of the data starve timer being needed.
Setting and reading might happen in different threads, so it is better to protect it with a mutex.
When resetting the pipeline we also need to reset if the first buffer went thru.
Since we don't need custom events, we don't need tracking the events anymore.
When the probe is not needed anymore, we can remove it and reinstate it again when necessary.
b2dd25f
to
da57d5e
Compare
{ | ||
ASSERT(WTF::isMainThread()); | ||
LOG_MEDIA_MESSAGE("resetting pipeline"); | ||
m_atLeastABufferLeftAppsrcMutex.lock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can simply use LockHolder lock(m_atLeastABufferLeftAppsrcMutex);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I can't, the rest of the method forces to claim the mutex somewhere else and then we have a deadlock. That was the first thing I tried. I could use unlockEarly() on the MutexLocker, but I think it doesn't pay off for such straight method.
[GStreamer][MSE] Remove use of timeouts completely on AppendPipeline
WPE: Make the backend switchable at compile- and runtime.
After some investigation I got the idea that using the need-data signal on appsrc could be what we needed to remove the data starve timeout in the cases the demuxer stalls. I realized too that with that signal was telling us in every case when the demuxer had finished processing so we could really get rid of the custom events as well and rely only on that signal.