Title: [261744] trunk
Revision
261744
Author
ab...@igalia.com
Date
2020-05-15 07:40:51 -0700 (Fri, 15 May 2020)

Log Message

[GStreamer][MediaStream] Fix missing video size
https://bugs.webkit.org/show_bug.cgi?id=211938

Reviewed by Philippe Normand.

Source/WebCore:

r261683 redefined m_currentVideoStreamId. Under the new design, tracks
have several states:

- "wanted": a track has been selected from _javascript_, or chosen by
  default.

- "requested": a track that is expected to be chosen by the next
  STREAMS_SELECTED message.

- "current": a track that has been selected after the STREAMS_SELECTED
  message has been handled.

naturalSize() used to check m_currentVideoStreamId to look for the
video size, but this is called relatively early before the track
becomes "current" under the new design.

Since the size tags can't be queried at any time, it makes sense to
use m_wantedVideoStreamId instead.

This fixes the following tests which were previously regressed:

fast/mediastream/get-user-media-constraints.html
fast/mediastream/getUserMedia-video-rescaling.html
fast/mediastream/mediastreamtrack-video-clone.html
imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https.html
fast/mediastream/media-stream-renders-first-frame.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::naturalSize const):

LayoutTests:

Updated test expectations.

* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (261743 => 261744)


--- trunk/LayoutTests/ChangeLog	2020-05-15 14:27:44 UTC (rev 261743)
+++ trunk/LayoutTests/ChangeLog	2020-05-15 14:40:51 UTC (rev 261744)
@@ -1,3 +1,14 @@
+2020-05-15  Alicia Boya García  <ab...@igalia.com>
+
+        [GStreamer][MediaStream] Fix missing video size
+        https://bugs.webkit.org/show_bug.cgi?id=211938
+
+        Reviewed by Philippe Normand.
+
+        Updated test expectations.
+
+        * platform/gtk/TestExpectations:
+
 2020-05-15  Antti Koivisto  <an...@apple.com>
 
         [Wheel event region] Invalidation when changing listeners on elements

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (261743 => 261744)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2020-05-15 14:27:44 UTC (rev 261743)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2020-05-15 14:40:51 UTC (rev 261744)
@@ -1399,10 +1399,6 @@
 webkit.org/b/211887 webgl/1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html [ Failure ]
 webkit.org/b/211887 webgl/1.0.3/conformance/textures/texture-size-limit.html [ Failure ]
 
-webkit.org/b/211938 fast/mediastream/get-user-media-constraints.html [ Failure ]
-webkit.org/b/211938 fast/mediastream/getUserMedia-video-rescaling.html [ Failure ]
-webkit.org/b/211938 imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https.html [ Failure ]
-
 webkit.org/b/211940 fast/text/multiple-codeunit-vertical-upright.html [ ImageOnlyFailure ]
 webkit.org/b/211940 fast/text/multiple-codeunit-vertical-upright-2.html [ ImageOnlyFailure ]
 
@@ -1499,7 +1495,7 @@
 webkit.org/b/199010 css2.1/t1204-order-01-d.html [ Pass Crash ]
 
 # Bug 211938 is Failure.
-webkit.org/b/199440 webkit.org/b/211938 fast/mediastream/mediastreamtrack-video-clone.html [ Pass Failure Crash ]
+webkit.org/b/199440 fast/mediastream/mediastreamtrack-video-clone.html [ Pass Crash ]
 
 # Known issues that were fixed by the WebKitMediaSrc rework that is now reverted.
 webkit.org/b/203078 imported/w3c/web-platform-tests/media-source/mediasource-seek-beyond-duration.html [ Failure Crash ]
@@ -3341,8 +3337,6 @@
 
 webkit.org/b/211569 media/video-presentation-mode.html [ Skip ]
 
-webkit.org/b/211938 fast/mediastream/media-stream-renders-first-frame.html [ Timeout ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of Tests timing out
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/WebCore/ChangeLog (261743 => 261744)


--- trunk/Source/WebCore/ChangeLog	2020-05-15 14:27:44 UTC (rev 261743)
+++ trunk/Source/WebCore/ChangeLog	2020-05-15 14:40:51 UTC (rev 261744)
@@ -1,3 +1,40 @@
+2020-05-15  Alicia Boya García  <ab...@igalia.com>
+
+        [GStreamer][MediaStream] Fix missing video size
+        https://bugs.webkit.org/show_bug.cgi?id=211938
+
+        Reviewed by Philippe Normand.
+
+        r261683 redefined m_currentVideoStreamId. Under the new design, tracks
+        have several states:
+
+        - "wanted": a track has been selected from _javascript_, or chosen by
+          default.
+
+        - "requested": a track that is expected to be chosen by the next
+          STREAMS_SELECTED message.
+
+        - "current": a track that has been selected after the STREAMS_SELECTED
+          message has been handled.
+
+        naturalSize() used to check m_currentVideoStreamId to look for the
+        video size, but this is called relatively early before the track
+        becomes "current" under the new design.
+
+        Since the size tags can't be queried at any time, it makes sense to
+        use m_wantedVideoStreamId instead.
+
+        This fixes the following tests which were previously regressed:
+
+        fast/mediastream/get-user-media-constraints.html
+        fast/mediastream/getUserMedia-video-rescaling.html
+        fast/mediastream/mediastreamtrack-video-clone.html
+        imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https.html
+        fast/mediastream/media-stream-renders-first-frame.html
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::naturalSize const):
+
 2020-05-15  Antti Koivisto  <an...@apple.com>
 
         [Wheel event region] Invalidation when changing listeners on elements

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


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-05-15 14:27:44 UTC (rev 261743)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-05-15 14:40:51 UTC (rev 261744)
@@ -1666,8 +1666,8 @@
 #endif
 
 #if ENABLE(MEDIA_STREAM)
-    if (!m_isLegacyPlaybin && !m_currentVideoStreamId.isEmpty()) {
-        RefPtr<VideoTrackPrivateGStreamer> videoTrack = m_videoTracks.get(m_currentVideoStreamId);
+    if (!m_isLegacyPlaybin && !m_wantedVideoStreamId.isEmpty()) {
+        RefPtr<VideoTrackPrivateGStreamer> videoTrack = m_videoTracks.get(m_wantedVideoStreamId);
 
         if (videoTrack) {
             auto tags = adoptGRef(gst_stream_get_tags(videoTrack->stream()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to