Title: [222388] trunk
Revision
222388
Author
[email protected]
Date
2017-09-22 08:43:24 -0700 (Fri, 22 Sep 2017)

Log Message

[GTK] HTMLMediaElement resize event not fired when video size changes
https://bugs.webkit.org/show_bug.cgi?id=174582

Reviewed by Xabier Rodriguez-Calvar.

Modify AppendPipeline to notify MediaPlayerPrivateGStreamerMSE that a track is detected
not only for the initial track detection but also for subsequent in particular when the
video size has changed.

Update test expectation for new passing tests.

Source/WebCore:

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkCapsChanged):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
* platform/graphics/gstreamer/mse/AppendPipeline.h:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
* platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
(WebCore::PlaybackPipeline::reattachTrack):
* platform/graphics/gstreamer/mse/PlaybackPipeline.h:

LayoutTests:

* platform/gtk/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (222387 => 222388)


--- trunk/LayoutTests/ChangeLog	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/LayoutTests/ChangeLog	2017-09-22 15:43:24 UTC (rev 222388)
@@ -1,3 +1,18 @@
+2017-09-22  Nael Ouedraogo  <[email protected]>
+
+        [GTK] HTMLMediaElement resize event not fired when video size changes
+        https://bugs.webkit.org/show_bug.cgi?id=174582
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Modify AppendPipeline to notify MediaPlayerPrivateGStreamerMSE that a track is detected
+        not only for the initial track detection but also for subsequent in particular when the
+        video size has changed.
+
+        Update test expectation for new passing tests.
+
+        * platform/gtk/TestExpectations:
+
 2017-09-22  Ms2ger  <[email protected]>
 
         [GTK] Couple of pasteboard related tests are failing after r222228

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (222387 => 222388)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-09-22 15:43:24 UTC (rev 222388)
@@ -234,8 +234,6 @@
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure Crash ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html [ Failure ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html [ Failure ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate.html [ Failure ]
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-av-framesize.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (222387 => 222388)


--- trunk/Source/WebCore/ChangeLog	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/ChangeLog	2017-09-22 15:43:24 UTC (rev 222388)
@@ -1,3 +1,27 @@
+2017-09-22  Nael Ouedraogo  <[email protected]>
+
+        [GTK] HTMLMediaElement resize event not fired when video size changes
+        https://bugs.webkit.org/show_bug.cgi?id=174582
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Modify AppendPipeline to notify MediaPlayerPrivateGStreamerMSE that a track is detected
+        not only for the initial track detection but also for subsequent in particular when the
+        video size has changed.
+
+        Update test expectation for new passing tests.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::appsinkCapsChanged):
+        (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
+        * platform/graphics/gstreamer/mse/AppendPipeline.h:
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
+        * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
+        (WebCore::PlaybackPipeline::reattachTrack):
+        * platform/graphics/gstreamer/mse/PlaybackPipeline.h:
+
 2017-09-22  Ms2ger  <[email protected]>
 
         [GTK] Couple of pasteboard related tests are failing after r222228

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2017-09-22 15:43:24 UTC (rev 222388)
@@ -639,8 +639,8 @@
 
     if (m_appsinkCaps != caps) {
         m_appsinkCaps = WTFMove(caps);
-        if (m_playerPrivate && previousCapsWereNull)
-            m_playerPrivate->trackDetected(this, m_oldTrack, m_track);
+        if (m_playerPrivate)
+            m_playerPrivate->trackDetected(this, m_track, previousCapsWereNull);
         didReceiveInitializationSegment();
         gst_element_set_state(m_pipeline.get(), GST_STATE_PLAYING);
     }
@@ -1021,8 +1021,6 @@
         || (m_mediaSourceClient->duration().isInvalid() && m_initialDuration > MediaTime::zeroTime()))
         m_mediaSourceClient->durationChanged(m_initialDuration);
 
-    m_oldTrack = m_track;
-
     parseDemuxerSrcPadCaps(gst_caps_ref(caps.get()));
 
     switch (m_streamType) {

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h	2017-09-22 15:43:24 UTC (rev 222388)
@@ -151,7 +151,6 @@
     bool m_abortPending;
 
     WebCore::MediaSourceStreamTypeGStreamer m_streamType;
-    RefPtr<WebCore::TrackPrivateBase> m_oldTrack;
     RefPtr<WebCore::TrackPrivateBase> m_track;
 
     GRefPtr<GstBuffer> m_pendingBuffer;

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2017-09-22 15:43:24 UTC (rev 222388)
@@ -728,7 +728,7 @@
     types = mimeTypeCache();
 }
 
-void MediaPlayerPrivateGStreamerMSE::trackDetected(RefPtr<AppendPipeline> appendPipeline, RefPtr<WebCore::TrackPrivateBase> oldTrack, RefPtr<WebCore::TrackPrivateBase> newTrack)
+void MediaPlayerPrivateGStreamerMSE::trackDetected(RefPtr<AppendPipeline> appendPipeline, RefPtr<WebCore::TrackPrivateBase> newTrack, bool firstTrackDetected)
 {
     ASSERT(appendPipeline->track() == newTrack);
 
@@ -749,10 +749,10 @@
         m_videoSize.setHeight(height);
     }
 
-    if (!oldTrack)
+    if (firstTrackDetected)
         m_playbackPipeline->attachTrack(appendPipeline->sourceBufferPrivate(), newTrack, structure, caps);
     else
-        m_playbackPipeline->reattachTrack(appendPipeline->sourceBufferPrivate(), newTrack);
+        m_playbackPipeline->reattachTrack(appendPipeline->sourceBufferPrivate(), newTrack, mediaType);
 }
 
 const static HashSet<AtomicString>& codecSet()

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h	2017-09-22 15:43:24 UTC (rev 222388)
@@ -80,7 +80,7 @@
 
     void markEndOfStream(MediaSourcePrivate::EndOfStreamStatus);
 
-    void trackDetected(RefPtr<AppendPipeline>, RefPtr<WebCore::TrackPrivateBase> oldTrack, RefPtr<WebCore::TrackPrivateBase> newTrack);
+    void trackDetected(RefPtr<AppendPipeline>, RefPtr<WebCore::TrackPrivateBase>, bool firstTrackDetected);
     void notifySeekNeedsDataForTime(const MediaTime&);
 
     static bool supportsCodecs(const String& codecs);

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.cpp	2017-09-22 15:43:24 UTC (rev 222388)
@@ -300,7 +300,7 @@
         g_signal_emit(G_OBJECT(stream->parent), webKitMediaSrcSignals[signal], 0, nullptr);
 }
 
-void PlaybackPipeline::reattachTrack(RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivate, RefPtr<TrackPrivateBase> trackPrivate)
+void PlaybackPipeline::reattachTrack(RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivate, RefPtr<TrackPrivateBase> trackPrivate, const char* mediaType)
 {
     GST_DEBUG("Re-attaching track");
 
@@ -315,10 +315,6 @@
 
     ASSERT(stream && stream->type != Invalid);
 
-    // The caps change is managed by gst_appsrc_push_sample() in enqueueSample() and
-    // flushAndEnqueueNonDisplayingSamples(), so the caps aren't set from here.
-    GRefPtr<GstCaps> appsrcCaps = adoptGRef(gst_app_src_get_caps(GST_APP_SRC(stream->appsrc)));
-    const gchar* mediaType = gst_structure_get_name(gst_caps_get_structure(appsrcCaps.get(), 0));
     int signal = -1;
 
     GST_OBJECT_LOCK(webKitMediaSrc);

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.h (222387 => 222388)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.h	2017-09-22 14:45:48 UTC (rev 222387)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/PlaybackPipeline.h	2017-09-22 15:43:24 UTC (rev 222388)
@@ -58,7 +58,7 @@
     MediaSourcePrivate::AddStatus addSourceBuffer(RefPtr<SourceBufferPrivateGStreamer>);
     void removeSourceBuffer(RefPtr<SourceBufferPrivateGStreamer>);
     void attachTrack(RefPtr<SourceBufferPrivateGStreamer>, RefPtr<TrackPrivateBase>, GstStructure*, GstCaps*);
-    void reattachTrack(RefPtr<SourceBufferPrivateGStreamer>, RefPtr<TrackPrivateBase>);
+    void reattachTrack(RefPtr<SourceBufferPrivateGStreamer>, RefPtr<TrackPrivateBase>, const char*);
     void notifyDurationChanged();
 
     // From MediaSourceGStreamer.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to