WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
194592
[MSE][GStreamer] Seek after reaching end of stream does not work
https://bugs.webkit.org/show_bug.cgi?id=194592
Summary
[MSE][GStreamer] Seek after reaching end of stream does not work
Sergey Krutikov
Reported
2019-02-13 07:34:41 PST
Created
attachment 361917
[details]
Test HTML5 application Performing a seek after reaching end of stream (EOS) has no effect. The test scenario works properly in Chrome and Firefox, but fails in MiniBrowser and in our proprietary component which is also based on WebKitGTK. Our investigation has shown that the issue is caused by switching of readyState of a media source to "closed" whereas it should be "ended". This happens because "MediaPlayerPrivateGStreamer::didEnd" function pauses private player and moves GStreamer pipeline to "ready" state (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp#L2194
). When a seek after EOS is triggered, the "source-setup" signal is generated and its handler in "MediaPlayerPrivateGStreamerMSE" class causes issuing of "error" event for media element (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/html/HTMLMediaElement.cpp#L2217
) and switching from "ended" to "closed" state in media source (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/Modules/mediasource/MediaSource.cpp#L925
). We fixed the bug by not switching the pipeline to "ready" state, but we are not sure this is the proper fix. Steps to reproduce the bug: * Unzip the attached archive. * Host and load mse.html - MSE video should start playing from a position near the end. * Wait for approximately 7 seconds - EOS will be reached and a seek will be triggered. Expected result: video playback position has changed, frame at the destination position is displayed, video playback is paused. Actual result: nothing happens. WebKitGTK version: 2.23.3
Attachments
Test HTML5 application
(3.32 MB, application/gzip)
2019-02-13 07:34 PST
,
Sergey Krutikov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2019-02-13 08:46:14 PST
These are great bug reports. Thanks!
Philippe Normand
Comment 2
2019-02-15 09:01:37 PST
(In reply to Sergey Krutikov from
comment #0
)
> Created
attachment 361917
[details]
> Test HTML5 application > > Performing a seek after reaching end of stream (EOS) has no effect. The test > scenario works properly in Chrome and Firefox, but fails in MiniBrowser and > in our proprietary component which is also based on WebKitGTK. > > Our investigation has shown that the issue is caused by switching of > readyState of a media source to "closed" whereas it should be "ended". This > happens because "MediaPlayerPrivateGStreamer::didEnd" function pauses > private player and moves GStreamer pipeline to "ready" state > (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/
> graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp#L2194). When a seek after > EOS is triggered, the "source-setup" signal is generated and its handler in > "MediaPlayerPrivateGStreamerMSE" class causes issuing of "error" event for > media element > (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/html/
> HTMLMediaElement.cpp#L2217) and switching from "ended" to "closed" state in > media source > (
https://github.com/WebKit/webkit/blob/master/Source/WebCore/Modules/
> mediasource/MediaSource.cpp#L925). We fixed the bug by not switching the > pipeline to "ready" state, but we are not sure this is the proper fix. >
This isn't the right solution indeed. I haven't checked this, but what about pre-rolling the pipeline again if a seek is triggered after the EOS event was received?
Sergey Krutikov
Comment 3
2019-02-18 03:01:40 PST
To be honest, I am not very experienced in WebKit code. I would prefer to wait until your investigation has been accomplished.
Michael Catanzaro
Comment 4
2019-06-24 11:47:29 PDT
This looks like another good MSE bug that could receive some attention.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug