-
Notifications
You must be signed in to change notification settings - Fork 136
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
[wpe-2.38][mse] an error reported on early EOS #1366
Comments
I've developed a preliminary solution in 29c0ec7, in the https://github.com/WebPlatformForEmbedded/WPEWebKit/commits/eocanha/eocanha-debug-150 branch. I still have to port it upstream, check the layout tests and have it reviewed, but at least it's a start. |
https://bugs.webkit.org/show_bug.cgi?id=278726 Reviewed by NOBODY (OOPS!). MediaSource::markEndOfStream() causes the SourceBuffer TrackBuffers to push EOS to playback pipeline through WebKitMediaSrc. When that happens without any SourceBuffer::appendBuffer() call, the pipeline can't finish autoplugging and parsebin triggers an unrecoverable error. That's on GStreamer 1.18.6 at least. On GStreamer 1.24 no error is triggered, but still, playback (of no data) never finishes. While it's certainly possible to change parsebin to not trigger the error, the truth is that this seems legitimate GStreamer behaviour that shouldn't be altered (and also, doesn't fix the problem by itself, I've checked it, playback doesn't finish, see previous paragraph). This commit adds support for temporarily ignoring the error when using an affected GStreamer version, and asking the pipeline to change to READY state. It also notifies HTMLMediaElement about timeChanged, so the "ended" event can be triggered (after all, there's no other position to go beyond 0, as there are no samples and 0 is already the duration, so technically playback is ended). See: WebPlatformForEmbedded/WPEWebKit#1366 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Allow time change processing when duration is zero and current time is zero. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore errors when the m_ignoreErrors flag is enabled. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add m_ignoreErrors flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): Report time changed on EOS with no buffer. (WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Set the m_isEosWithNoBuffer flag. Change the pipeline to READY when enabled (with errors disabled on older GStreamer versions). * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: Added m_isEosWithNoBuffer flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::markEndOfStream): Detect the "EOS with no buffers" condition and report it to the player private. (WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream): Disable the "EOS with no buffers" condition. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: Added unmarkEndOfStream().
https://bugs.webkit.org/show_bug.cgi?id=278726 Reviewed by NOBODY (OOPS!). MediaSource::markEndOfStream() causes the SourceBuffer TrackBuffers to push EOS to playback pipeline through WebKitMediaSrc. When that happens without any SourceBuffer::appendBuffer() call, the pipeline can't finish autoplugging and parsebin triggers an unrecoverable error. That's on GStreamer 1.18.6 at least. On GStreamer 1.24 no error is triggered, but still, playback (of no data) never finishes. While it's certainly possible to change parsebin to not trigger the error, the truth is that this seems legitimate GStreamer behaviour that shouldn't be altered (and also, doesn't fix the problem by itself, I've checked it, playback doesn't finish, see previous paragraph). This commit adds support for temporarily ignoring the error when using an affected GStreamer version, and asking the pipeline to change to READY state. It also notifies HTMLMediaElement about timeChanged, so the "ended" event can be triggered (after all, there's no other position to go beyond 0, as there are no samples and 0 is already the duration, so technically playback is ended). See: WebPlatformForEmbedded/WPEWebKit#1366 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Allow time change processing when duration is zero and current time is zero. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore errors when the m_ignoreErrors flag is enabled. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add m_ignoreErrors flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): Report time changed on EOS with no buffer. (WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Set the m_isEosWithNoBuffer flag. Change the pipeline to READY when enabled (with errors disabled on older GStreamer versions). * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: Added m_isEosWithNoBuffer flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::markEndOfStream): Detect the "EOS with no buffers" condition and report it to the player private. (WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream): Disable the "EOS with no buffers" condition. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: Added unmarkEndOfStream().
https://bugs.webkit.org/show_bug.cgi?id=278726 Reviewed by Xabier Rodriguez-Calvar. MediaSource::markEndOfStream() causes the SourceBuffer TrackBuffers to push EOS to playback pipeline through WebKitMediaSrc. When that happens without any SourceBuffer::appendBuffer() call, the pipeline can't finish autoplugging and parsebin triggers an unrecoverable error. That's on GStreamer 1.18.6 at least. On GStreamer 1.24 no error is triggered, but still, playback (of no data) never finishes. While it's certainly possible to change parsebin to not trigger the error, the truth is that this seems legitimate GStreamer behaviour that shouldn't be altered (and also, doesn't fix the problem by itself, I've checked it, playback doesn't finish, see previous paragraph). This commit adds support for temporarily ignoring the error when using an affected GStreamer version, and asking the pipeline to change to READY state. It also notifies HTMLMediaElement about timeChanged, so the "ended" event can be triggered (after all, there's no other position to go beyond 0, as there are no samples and 0 is already the duration, so technically playback is ended). See: WebPlatformForEmbedded/WPEWebKit#1366 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Allow time change processing when duration is zero and current time is zero. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore errors when the m_ignoreErrors flag is enabled. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add m_ignoreErrors flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): Report time changed on EOS with no buffer. (WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Set the m_isEosWithNoBuffer flag. Change the pipeline to READY when enabled (with errors disabled on older GStreamer versions). * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: Added m_isEosWithNoBuffer flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::markEndOfStream): Detect the "EOS with no buffers" condition and report it to the player private. (WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream): Disable the "EOS with no buffers" condition. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: Added unmarkEndOfStream(). Canonical link: https://commits.webkit.org/282958@main
https://bugs.webkit.org/show_bug.cgi?id=278726 Reviewed by Xabier Rodriguez-Calvar. MediaSource::markEndOfStream() causes the SourceBuffer TrackBuffers to push EOS to playback pipeline through WebKitMediaSrc. When that happens without any SourceBuffer::appendBuffer() call, the pipeline can't finish autoplugging and parsebin triggers an unrecoverable error. That's on GStreamer 1.18.6 at least. On GStreamer 1.24 no error is triggered, but still, playback (of no data) never finishes. While it's certainly possible to change parsebin to not trigger the error, the truth is that this seems legitimate GStreamer behaviour that shouldn't be altered (and also, doesn't fix the problem by itself, I've checked it, playback doesn't finish, see previous paragraph). This commit adds support for temporarily ignoring the error when using an affected GStreamer version, and asking the pipeline to change to READY state. It also notifies HTMLMediaElement about timeChanged, so the "ended" event can be triggered (after all, there's no other position to go beyond 0, as there are no samples and 0 is already the duration, so technically playback is ended). See: #1366 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Allow time change processing when duration is zero and current time is zero. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore errors when the m_ignoreErrors flag is enabled. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add m_ignoreErrors flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): Report time changed on EOS with no buffer. (WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Set the m_isEosWithNoBuffer flag. Change the pipeline to READY when enabled (with errors disabled on older GStreamer versions). * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: Added m_isEosWithNoBuffer flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::markEndOfStream): Detect the "EOS with no buffers" condition and report it to the player private. (WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream): Disable the "EOS with no buffers" condition. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: Added unmarkEndOfStream(). Canonical link: https://commits.webkit.org/282958@main
The patch has landed upstream as https://commits.webkit.org/282958@main and Closing this Issue. |
I must have screwed my local environment and the commit had some merge leftovers. I've undone it (force-pushed the previous wpe-2.38 commit before mine) and I'm pushing again mine in a moment. |
https://bugs.webkit.org/show_bug.cgi?id=278726 Reviewed by Xabier Rodriguez-Calvar. MediaSource::markEndOfStream() causes the SourceBuffer TrackBuffers to push EOS to playback pipeline through WebKitMediaSrc. When that happens without any SourceBuffer::appendBuffer() call, the pipeline can't finish autoplugging and parsebin triggers an unrecoverable error. That's on GStreamer 1.18.6 at least. On GStreamer 1.24 no error is triggered, but still, playback (of no data) never finishes. While it's certainly possible to change parsebin to not trigger the error, the truth is that this seems legitimate GStreamer behaviour that shouldn't be altered (and also, doesn't fix the problem by itself, I've checked it, playback doesn't finish, see previous paragraph). This commit adds support for temporarily ignoring the error when using an affected GStreamer version, and asking the pipeline to change to READY state. It also notifies HTMLMediaElement about timeChanged, so the "ended" event can be triggered (after all, there's no other position to go beyond 0, as there are no samples and 0 is already the duration, so technically playback is ended). See: #1366 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Allow time change processing when duration is zero and current time is zero. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore errors when the m_ignoreErrors flag is enabled. * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add m_ignoreErrors flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::updateStates): Report time changed on EOS with no buffer. (WebCore::MediaPlayerPrivateGStreamerMSE::setEosWithNoBuffers): Set the m_isEosWithNoBuffer flag. Change the pipeline to READY when enabled (with errors disabled on older GStreamer versions). * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: Added m_isEosWithNoBuffer flag. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::markEndOfStream): Detect the "EOS with no buffers" condition and report it to the player private. (WebCore::MediaSourcePrivateGStreamer::unmarkEndOfStream): Disable the "EOS with no buffers" condition. * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h: Added unmarkEndOfStream(). Canonical link: https://commits.webkit.org/282958@main
Now for good, backported to wpe-2.38 as cf98ff8 |
WPEWebKit MSE reports a playback error when app ends stream before appending any samples. Reproducible with attached test
mse_early_eos.html.gz
The text was updated successfully, but these errors were encountered: