Bug 86310

Summary: [GStreamer] media/media-continues-playing-after-replace-source.html fails
Product: WebKit Reporter: Raphael Kubo da Costa (:rakuco) <rakuco>
Component: MediaAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: d-r, eric.carlson, feature-media-reviews, gustavo, gyuyoung.kim, menard, mfeil, mrobinson, ossy, pnormand, spenap, tmpsantos, webkit.review.bot, zan
Priority: P2 Keywords: LayoutTestFailure, MakingBotsRed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://build.webkit.org/builders/EFL Linux Debug/builds/1574
Bug Depends on: 93658    
Bug Blocks: 86235    
Attachments:
Description Flags
Patch
none
Patch eric.carlson: review+

Raphael Kubo da Costa (:rakuco)
Reported 2012-05-12 20:21:56 PDT
<http://trac.webkit.org/changeset/116858> has made the EFL and GTK+ bots fail the media/media-continues-playing-after-replace-source.html and should be fixed. Layout test results for the bots can be accessed via http://build.webkit.org/results
Attachments
Patch (7.52 KB, patch)
2012-06-13 22:41 PDT, Philippe Normand
no flags
Patch (4.58 KB, patch)
2012-07-31 04:15 PDT, Philippe Normand
eric.carlson: review+
Max Feil
Comment 1 2012-05-13 10:15:28 PDT
(In reply to comment #0) > <http://trac.webkit.org/changeset/116858> has made the EFL and GTK+ bots fail the media/media-continues-playing-after-replace-source.html and should be fixed. This changeset is a result of https://bugs.webkit.org/show_bug.cgi?id=86235. The EWS analysis shows all green, including for efl and gtk. In fact different versions of this test passed both efl and gtk 3 times on separate EWS analyses. So I'm wondering what's going on here. The failed test results for EFL are: FAIL: Timed out waiting for notifyDone to be called Test that media keeps playing when the source element is replaced. The failed test results for GTK are: FAIL: Timed out waiting for notifyDone to be called Test that media keeps playing when the source element is replaced. EVENT(canplaythrough) EXPECTED (testElement.currentTime == '0') OK EVENT(playing) EXPECTED (testElement.currentTime > '0') OK Replacing the media's source element: EXPECTED (testElement.currentTime == '0') OK These seem like actual bugs. So what I propose to do is to add this test to the "skipped" files for these two ports, and then open new bugs to determine why the test fails.
Max Feil
Comment 2 2012-05-13 10:24:58 PDT
(In reply to comment #1) > These seem like actual bugs. The EFL case looks like the Layout Test framework is not set up to support any HTML5 media tests. They are all failing. This is just one more in a long list of failures. Is the correct thing to put this test in the Skipped file in that case? Why aren't all the other media tests in the Skipped file?
Max Feil
Comment 3 2012-05-13 10:28:15 PDT
In the GTK case, I'm thinking that it may be best to leave the test failure outstanding, rather than hide it via the Skipped file. This test has highlighted an area where the GTK port is different than the other major ports, and perhaps should be brought in line instead of ignoring the test.
Raphael Kubo da Costa (:rakuco)
Comment 4 2012-05-13 14:01:28 PDT
(In reply to comment #1) > This changeset is a result of https://bugs.webkit.org/show_bug.cgi?id=86235. The EWS analysis shows all green, including for efl and gtk. In fact different versions of this test passed both efl and gtk 3 times on separate EWS analyses. So I'm wondering what's going on here. Most of the EWS bots only build the patches, they don't run the layout tests. (In reply to comment #2) > The EFL case looks like the Layout Test framework is not set up to support any HTML5 media tests. They are all failing. This is just one more in a long list of failures. Is the correct thing to put this test in the Skipped file in that case? Why aren't all the other media tests in the Skipped file? They aren't all skipped because they pass :-) As you said, I think the best option for now is to skip the test on the port to get things green and then investigate.
Raphael Kubo da Costa (:rakuco)
Comment 5 2012-05-13 14:09:02 PDT
I've skipped the test for the EFL port in <http://trac.webkit.org/changeset/116901>, and have filed bug 86322.
Max Feil
Comment 6 2012-05-14 11:39:21 PDT
(In reply to comment #4) > Most of the EWS bots only build the patches, they don't run the layout tests. Thanks for that piece of information. I assumed all the EWS bots ran layout tests, as this is an important verification of the sanity of a patch. Can you tell me which bots don't run layout tests of the 7 ports which are currently part of EWS? Also, can you tell me how to actually run a proposed layout test on all major ports to ensure that it passes before I submit a patch for review? > They aren't all skipped because they pass :-) I am looking at results in http://build.webkit.org/results/EFL%20Linux%20Release/ and every media test that I look at has the following line in the actual results: FAIL: Timed out waiting for notifyDone to be called Am I looking in the wrong place?
Raphael Kubo da Costa (:rakuco)
Comment 7 2012-05-14 11:45:36 PDT
(In reply to comment #6) > (In reply to comment #4) > > Most of the EWS bots only build the patches, they don't run the layout tests. > > Thanks for that piece of information. I assumed all the EWS bots ran layout tests, as this is an important verification of the sanity of a patch. Can you tell me which bots don't run layout tests of the 7 ports which are currently part of EWS? IIRC, only the chromium bot runs layout tests, all the others only build the patches. > Also, can you tell me how to actually run a proposed layout test on all major ports to ensure that it passes before I submit a patch for review? This has been discussed a few times in webkit-dev but I don't think we've reached an agreement yet. Since people are not expected to have all ports built locally and then run all tests, the best we can do for now is to work with the people who do gardening for the ports and make sure the bots look green -- this means the tests need to be skipped until the failures are further investigated, or the commit which introduced them needs to be rolled out. > > They aren't all skipped because they pass :-) > > I am looking at results in http://build.webkit.org/results/EFL%20Linux%20Release/ and every media test that I look at has the following line in the actual results: > > FAIL: Timed out waiting for notifyDone to be called > > Am I looking in the wrong place? The Release bot is not in a very good state at the moment -- I recommend taking a look at the Debug bot instead. Anyway, the very fact that some tests are present in the results zip file means it has failed somehow; OTOH, tests which are not there have passed.
Max Feil
Comment 8 2012-05-14 17:54:22 PDT
I looked in http://build.webkit.org/results/ and the results for this test are as follows: Chromium Linux Release (Tests): Test not in results.html, but in tests_run1.txt (i.e. PASS) Qt Linux Release: Test not in results.html, OR tests_run*.txt (?) GTK Linux 32-bit Release: time goes to 0 but 2nd source does not play (FAIL) Lion Leaks: Test not in results.html, but in tests_run7.txt (i.e. PASS) Lion Debug (Tests): Test not in results.html, but in tests_run3.txt (i.e. PASS) Lion Debug (WebKit2 Tests): Test not in results.html, but in tests_run3.txt (i.e. PASS) Windows: I can't find any up to date test results EFL Linux Debug: time goes to 0 but 2nd source does not play (FAIL) Both the GTK and EFL ports are skipping this test for now.
Philippe Normand
Comment 9 2012-05-15 22:08:01 PDT
This is not a regression in the sense that this new test simply highlights a previously-hidden bug :) The issue is that when the media element loads the new <source> element a new MediaPlayerPrivate instance is created and it sets the gst pipeline state to PAUSED instead of PLAYING, so the test forever waits for never-arriving timeupdate events. One problem I see here is that the MediaPlayerPrivate is not aware that the up-layer previously tried another <source> element. So it's difficult to know when ::load() should set the pipeline to PLAYING instead of simply pausing it. :( Maybe the MediaPlayerClient could be made aware of a previous URI that it attempted to play, so ::load() could compare the new and old URIs. I wonder if that could be used by the Blackberry player as well and they could remove their not-so-great ::isElementPaused() which seems to be a layer violation, accessing the HTMLMediaElement API from the private player.
Raphael Kubo da Costa (:rakuco)
Comment 10 2012-05-17 14:03:29 PDT
*** Bug 86322 has been marked as a duplicate of this bug. ***
Philippe Normand
Comment 11 2012-05-22 21:30:11 PDT
I tested this on WebKitGTK WK1 and WK2 (with Martin's patch), I can clearly see that playback is not smooth.
Philippe Normand
Comment 12 2012-05-22 21:30:48 PDT
(In reply to comment #11) > I tested this on WebKitGTK WK1 and WK2 (with Martin's patch), I can clearly see that playback is not smooth. wrong bug, I should get some sleep... sorry for the noise!
Philippe Normand
Comment 13 2012-06-13 22:41:21 PDT
Philippe Normand
Comment 14 2012-07-25 06:15:15 PDT
Eric, can you please review this patch?
Eric Carlson
Comment 15 2012-07-25 09:08:22 PDT
Comment on attachment 147488 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=147488&action=review > Source/WebCore/html/HTMLMediaElement.cpp:948 > + if (!m_currentSrc.isEmpty()) > + m_previousSrc = m_currentSrc; Why is this necessary? It would be good to have a comment here and in the change log. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:312 > + // Reset network and ready states if the media element previously > + // used another location. This allows the media player client to > + // potentially emit a timeupdate event while the new location is being > + // loaded. States are synchronized again after the pipeline > + // pre-rolled. > + if (!m_player->mediaPlayerClient()->mediaPlayerPreviousUrl().isEmpty()) { > + m_networkState = MediaPlayer::Loading; > + m_player->networkStateChanged(); > + m_readyState = MediaPlayer::HaveNothing; > + m_player->readyStateChanged(); > + } Why don't you *always* reset the states to Loading and HaveNothing like other ports do?
Philippe Normand
Comment 16 2012-07-31 04:15:47 PDT
Created attachment 155487 [details] Patch Thanks Eric for the feedback. Unconditionally resetting the network and ready states is indeed the right and simpler fix.
Eric Carlson
Comment 17 2012-08-08 09:26:31 PDT
Comment on attachment 155487 [details] Patch Much simpler, thanks!
Philippe Normand
Comment 18 2012-08-08 10:18:31 PDT
Csaba Osztrogonác
Comment 19 2012-08-09 14:33:06 PDT
(In reply to comment #18) > Committed r125045: <http://trac.webkit.org/changeset/125045> It caused a regression on Qt WK2 - https://bugs.webkit.org/show_bug.cgi?id=93658 Could you check it, please?
Note You need to log in before you can comment on or make changes to this bug.