Bug 195867

Summary: [MSE][GStreamer] Don't construct segments on PlaybackPipeline::flush
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: WebKitGTKAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, commit-queue, eric.carlson, jer.noble, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/15976
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from webkit-cq-02 for mac-highsierra
none
Patch for landing
none
Patch for landing none

Description Alicia Boya García 2019-03-17 16:30:53 PDT
The previous approach did not really work for flushes on only one
branch, as setting reset-time in FLUSH_STOP affects the running time
of the entire pipeline, causing timing issues in the other branch.

Since it's preferable not to interfere with the other branch if
possible, setting reset-time to FALSE fixes that problem.

Also, it's not necessary to fabricate a segment. Since we are not
seeking, only the base needs to be adjusted, and gstbasesrc already
handles this correctly by default.

This fixes an audio/video synchronization bug in YT when some
automatic quality changes occur.
Comment 1 Alicia Boya García 2019-03-17 16:33:30 PDT
Created attachment 364983 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2019-03-18 02:32:36 PDT
Comment on attachment 364983 [details]
Patch

Patch is right, but I think we should have a test for this.
Comment 3 Xabier Rodríguez Calvar 2019-03-18 02:33:32 PDT
And even better if we submit the test to the W3C test suite to backport it later here.
Comment 4 Alicia Boya García 2019-03-21 05:26:36 PDT
Created attachment 365537 [details]
Patch
Comment 5 Alicia Boya García 2019-03-21 05:31:02 PDT
Created attachment 365538 [details]
Patch
Comment 6 Alicia Boya García 2019-03-21 05:32:31 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/15976
Comment 7 Xabier Rodríguez Calvar 2019-03-21 06:05:23 PDT
Comment on attachment 365538 [details]
Patch

The directory of imported test is only for imported tests. We shouldn't add a test there if it didn't land on the WPT repo yet. We need to move it to our LayoutTests/media/media-source/ while we wait for the other to land.

One this patch is landed, we create another bug to keep track of the WPT pull request.
Comment 8 Xabier Rodríguez Calvar 2019-03-21 09:07:32 PDT
Comment on attachment 365538 [details]
Patch

(In reply to Xabier Rodríguez Calvar from comment #7)
> Comment on attachment 365538 [details]
> Patch
> 
> The directory of imported test is only for imported tests. We shouldn't add
> a test there if it didn't land on the WPT repo yet. We need to move it to
> our LayoutTests/media/media-source/ while we wait for the other to land.
> 
> One this patch is landed, we create another bug to keep track of the WPT
> pull request.

Forget about this, everything is ok.
Comment 9 WebKit Commit Bot 2019-03-21 10:32:43 PDT
Comment on attachment 365538 [details]
Patch

Rejecting attachment 365538 [details] from commit-queue.

New failing tests:
imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html
imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend.html
Full output: https://webkit-queues.webkit.org/results/11600730
Comment 10 WebKit Commit Bot 2019-03-21 10:32:46 PDT
Created attachment 365564 [details]
Archive of layout-test-results from webkit-cq-02 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-02  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 11 Michael Catanzaro 2019-03-21 11:30:17 PDT
(In reply to WebKit Commit Bot from comment #9)
> Comment on attachment 365538 [details]
> Patch
> 
> Rejecting attachment 365538 [details] from commit-queue.
> 
> New failing tests:
> imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html
> imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-
> after-reappend.html
> Full output: https://webkit-queues.webkit.org/results/11600730

That looks bad!
Comment 12 Xabier Rodríguez Calvar 2019-03-21 12:44:42 PDT
Jer, Eric, any insights?
Comment 13 Alicia Boya García 2019-03-22 02:20:51 PDT
Drawing the <video> into the canvas does not seem to work in Safari (I tried doing so from the console to no effect). There seems to be also a problem getting the audio out of it for the AudioAnalyser.
Comment 14 Alicia Boya García 2019-03-22 02:51:46 PDT
Potentially related: https://bugs.webkit.org/show_bug.cgi?id=153588

I'm marking the test as Skip in mac linking to that bug.
Comment 15 Alicia Boya García 2019-03-22 03:28:00 PDT
Created attachment 365701 [details]
Patch for landing
Comment 16 WebKit Commit Bot 2019-03-22 03:29:21 PDT
Comment on attachment 365701 [details]
Patch for landing

Rejecting attachment 365701 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 365701, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=365701&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=195867&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Processing patch 365701 from bug 195867.
Fetching: https://bugs.webkit.org/attachment.cgi?id=365701
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 11 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/imported/w3c/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend-expected.txt
patching file LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend.html
patching file LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-expected.txt
patching file LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html
patching file LayoutTests/platform/mac/TestExpectations
Hunk #1 FAILED at 1796.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/mac/TestExpectations.rej

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: https://webkit-queues.webkit.org/results/11611555
Comment 17 Alicia Boya García 2019-03-22 04:18:29 PDT
Created attachment 365707 [details]
Patch for landing
Comment 18 WebKit Commit Bot 2019-03-22 05:22:31 PDT
Comment on attachment 365707 [details]
Patch for landing

Clearing flags on attachment: 365707

Committed r243372: <https://trac.webkit.org/changeset/243372>
Comment 19 WebKit Commit Bot 2019-03-22 05:22:33 PDT
All reviewed patches have been landed.  Closing bug.