REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and...
authoreocanha@igalia.com <eocanha@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2016 11:16:23 +0000 (11:16 +0000)
committereocanha@igalia.com <eocanha@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2016 11:16:23 +0000 (11:16 +0000)
commitf38b95a8bee635522fbef85428e5138c6c2d68f7
treefc11a4f9919288bb674383710ee2ab4371dd9272
parentb41792a802f2cdfcfc7b5e903b40029638a42020
REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early
https://bugs.webkit.org/show_bug.cgi?id=164022

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Covered by existing tests.

* page/Settings.cpp:
Added new setting to disable GStreamer players, so the selection of
MockMediaPlayerMediaSource can be forced for some tests, just like
it's already being done for the AVFoundation player in Mac.
(WebCore::Settings::setGStreamerEnabled):
* page/Settings.h:
(WebCore::Settings::isGStreamerEnabled):
* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
Don't register GStreamer players when they're disabled.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime):
Use doubles instead of floats.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Use doubles instead of floats for m_durationAtEOS.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Don't reset m_sample on videoSink drain, it causes too many problems.
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Removed unused methods.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
Keep releasing m_sample on drain, but don't report the event
externally via signal anymore. The base player private isn't
listening to it anymore.
(webkitVideoSinkEvent):
(webkit_video_sink_class_init):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
Check if the demuxer caps correspond to a supported codec.
(WebCore::AppendPipeline::didReceiveInitializationSegment):
Empty m_track is now legal and means unsupported codec.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
Warn about more than one stream, but "support" it by ignoring it using
a black hole probe.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
Also report the duration when it's detected for the first time. Invalid
stream types now mean that unsupported codecs have been detected.
Complete init segment processing in that case.
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
Disconnect black hole probe.
(WebCore::appendPipelineDemuxerBlackHolePadProbe): Ignore buffers.
(WebCore::appendPipelineDemuxerPadRemoved): New parameter used.
* platform/graphics/gstreamer/mse/AppendPipeline.h:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs):
Check supported codecs by matching against wildcard expressions.
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
Check for supported codecs.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
New supportsCodecs() method.
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::resetParserState):
Implemented parser resetting by aborting the AppendPipeline.
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
Added resetParserState().
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::resetParserState):
Implemented it.
* testing/Internals.cpp:
(WebCore::Internals::initializeMockMediaSource):
Disable the GStreamer players when initializing the mock media source,
like it's already done for the AVFoundation player to force the
selection of MockMediaPlayerMediaSource.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
New GStreamerEnabled preference, defaults to true.
* WebProcess/WebPage/WebPage.cpp: Ditto.
(WebKit::WebPage::updatePreferences):

Source/WTF:

* wtf/glib/GLibUtilities.h:
Added new macros to convert gulong to/from gpointer.

Tools:

* Scripts/webkitperl/FeatureList.pm:
  Re-enable MEDIA_SOURCE for the GTK+ port.

LayoutTests:

* media/media-source/media-source-resize-expected.txt:
Expect the resize event.
* media/media-source/media-source-resize.html:
The test now succeeds no matter if the dimension is reported after
processing the init-segment (GTK+ case) or after the media segment
is processed (Mac case).
* platform/gtk/TestExpectations:
Reenabled all the media/media-source tests except one.
* platform/gtk/media/media-source/media-source-resize-expected.txt:
Copied from LayoutTests/media/media-source/media-source-resize-expected.txt.
The right dimensions are received earlier than in Mac.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
LayoutTests/ChangeLog
LayoutTests/media/media-source/media-source-resize-expected.txt
LayoutTests/media/media-source/media-source-resize.html
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt [new file with mode: 0644]
Source/WTF/ChangeLog
Source/WTF/wtf/glib/GLibUtilities.h
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h
Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm