Title: [244641] trunk
Revision
244641
Author
[email protected]
Date
2019-04-25 00:52:36 -0700 (Thu, 25 Apr 2019)

Log Message

[GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
https://bugs.webkit.org/show_bug.cgi?id=196691

Reviewed by Eric Carlson.

Source/WebCore:

For gif assets, fail media loading early and notify the
MediaPlayer by setting both network and ready states, so that the
MediaPlayer will try with with the next media engine or pass the
error to HTMLMediaElement if there are none.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

LayoutTests:

Unflag test no longer crashing.

* platform/gtk/TestExpectations:
* platform/gtk/fast/replaced/border-radius-clip-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (244640 => 244641)


--- trunk/LayoutTests/ChangeLog	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/LayoutTests/ChangeLog	2019-04-25 07:52:36 UTC (rev 244641)
@@ -1,3 +1,15 @@
+2019-04-25  Philippe Normand  <[email protected]>
+
+        [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
+        https://bugs.webkit.org/show_bug.cgi?id=196691
+
+        Reviewed by Eric Carlson.
+
+        Unflag test no longer crashing.
+
+        * platform/gtk/TestExpectations:
+        * platform/gtk/fast/replaced/border-radius-clip-expected.txt:
+
 2019-04-24  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Hardcoded text color in input fields

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (244640 => 244641)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2019-04-25 07:52:36 UTC (rev 244641)
@@ -1641,8 +1641,7 @@
 
 webkit.org/b/133869 media/video-seek-after-end.html [ Failure Pass ]
 
-# Crash is webkit.org/b/176802
-webkit.org/b/36642 fast/replaced/border-radius-clip.html [ Failure Pass Crash ]
+webkit.org/b/36642 fast/replaced/border-radius-clip.html [ Failure Pass ]
 
 webkit.org/b/134573 media/track/audio-track.html [ Failure Timeout Pass ]
 webkit.org/b/134576 media/track/audio/audio-track-mkv-vorbis-language.html [ Failure Timeout Pass ]

Modified: trunk/LayoutTests/platform/gtk/fast/replaced/border-radius-clip-expected.txt (244640 => 244641)


--- trunk/LayoutTests/platform/gtk/fast/replaced/border-radius-clip-expected.txt	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/LayoutTests/platform/gtk/fast/replaced/border-radius-clip-expected.txt	2019-04-25 07:52:36 UTC (rev 244641)
@@ -1,20 +1,20 @@
-layer at (0,0) size 785x947
+layer at (0,0) size 785x952
   RenderView at (0,0) size 785x600
-layer at (0,0) size 785x923
-  RenderBlock {HTML} at (0,0) size 785x923
-    RenderBody {BODY} at (8,8) size 769x907
+layer at (0,0) size 785x928
+  RenderBlock {HTML} at (0,0) size 785x928
+    RenderBody {BODY} at (8,8) size 769x912
       RenderText {#text} at (0,0) size 457x17
         text run at (0,0) width 457: "All of the replaced elements below should be clipped to a border-radius. "
       RenderBR {BR} at (0,0) size 0x0
-      RenderImage {IMG} at (0,17) size 100x100
-      RenderText {#text} at (100,103) size 4x17
-        text run at (100,103) width 4: " "
+      RenderImage {IMG} at (0,18) size 100x100
+      RenderText {#text} at (100,104) size 4x17
+        text run at (100,104) width 4: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderImage {INPUT} at (0,120) size 100x100
-      RenderText {#text} at (100,206) size 4x17
-        text run at (100,206) width 4: " "
+      RenderImage {INPUT} at (0,122) size 100x100
+      RenderText {#text} at (100,208) size 4x17
+        text run at (100,208) width 4: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderIFrame {IFRAME} at (0,223) size 304x154 [border: (2px inset #000000)]
+      RenderIFrame {IFRAME} at (0,226) size 304x154 [border: (2px inset #000000)]
         layer at (0,0) size 300x150
           RenderView at (0,0) size 300x150
         layer at (0,0) size 300x150
@@ -21,13 +21,13 @@
           RenderBlock {HTML} at (0,0) size 300x150
             RenderBody {BODY} at (0,0) size 300x150
               RenderImage {IMG} at (0,0) size 100x100
-      RenderText {#text} at (304,363) size 4x17
-        text run at (304,363) width 4: " "
+      RenderText {#text} at (304,366) size 4x17
+        text run at (304,366) width 4: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderText {#text} at (300,516) size 4x17
-        text run at (300,516) width 4: " "
+      RenderText {#text} at (300,520) size 4x17
+        text run at (300,520) width 4: " "
       RenderBR {BR} at (0,0) size 0x0
-      RenderEmbeddedObject {EMBED} at (0,533) size 556x406 [bgcolor=#00FF00] [border: (3px solid #000000)]
+      RenderEmbeddedObject {EMBED} at (0,538) size 556x406 [bgcolor=#00FF00] [border: (3px solid #000000)]
       RenderText {#text} at (0,0) size 0x0
-layer at (8,388) size 300x150
-  RenderVideo {VIDEO} at (0,380) size 300x150
+layer at (8,392) size 300x150
+  RenderVideo {VIDEO} at (0,384) size 300x150

Modified: trunk/Source/WebCore/ChangeLog (244640 => 244641)


--- trunk/Source/WebCore/ChangeLog	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/Source/WebCore/ChangeLog	2019-04-25 07:52:36 UTC (rev 244641)
@@ -1,5 +1,22 @@
 2019-04-25  Philippe Normand  <[email protected]>
 
+        [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused
+        https://bugs.webkit.org/show_bug.cgi?id=196691
+
+        Reviewed by Eric Carlson.
+
+        For gif assets, fail media loading early and notify the
+        MediaPlayer by setting both network and ready states, so that the
+        MediaPlayer will try with with the next media engine or pass the
+        error to HTMLMediaElement if there are none.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
+        (WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+
+2019-04-25  Philippe Normand  <[email protected]>
+
         [REGRESSION(r243197)][GStreamer] http/tests/media/clearkey/collect-webkit-media-session.html hits an ASSERT
         https://bugs.webkit.org/show_bug.cgi?id=197230
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (244640 => 244641)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2019-04-25 07:52:36 UTC (rev 244641)
@@ -275,11 +275,8 @@
 
 void MediaPlayerPrivateGStreamer::loadFull(const String& urlString, const String& pipelineName)
 {
-    // FIXME: This method is still called even if supportsType() returned
-    // IsNotSupported. This would deserve more investigation but meanwhile make
-    // sure we don't ever try to play animated gif assets.
     if (m_player->contentMIMEType() == "image/gif") {
-        loadingFailed(MediaPlayer::FormatError);
+        loadingFailed(MediaPlayer::FormatError, MediaPlayer::HaveNothing, true);
         return;
     }
 
@@ -2222,17 +2219,17 @@
         m_player->durationChanged();
 }
 
-void MediaPlayerPrivateGStreamer::loadingFailed(MediaPlayer::NetworkState error)
+void MediaPlayerPrivateGStreamer::loadingFailed(MediaPlayer::NetworkState networkError, MediaPlayer::ReadyState readyState, bool forceNotifications)
 {
-    GST_WARNING("Loading failed, error: %d", error);
+    GST_WARNING("Loading failed, error: %s", convertEnumerationToString(networkError).utf8().data());
 
     m_errorOccured = true;
-    if (m_networkState != error) {
-        m_networkState = error;
+    if (forceNotifications || m_networkState != networkError) {
+        m_networkState = networkError;
         m_player->networkStateChanged();
     }
-    if (m_readyState != MediaPlayer::HaveNothing) {
-        m_readyState = MediaPlayer::HaveNothing;
+    if (forceNotifications || m_readyState != readyState) {
+        m_readyState = readyState;
         m_player->readyStateChanged();
     }
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h (244640 => 244641)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2019-04-25 07:47:25 UTC (rev 244640)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2019-04-25 07:52:36 UTC (rev 244641)
@@ -116,7 +116,7 @@
     void timeChanged();
     void didEnd();
     virtual void durationChanged();
-    void loadingFailed(MediaPlayer::NetworkState);
+    void loadingFailed(MediaPlayer::NetworkState, MediaPlayer::ReadyState = MediaPlayer::HaveNothing, bool forceNotifications = false);
 
     virtual void sourceSetup(GstElement*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to