Changeset 209797 in webkit
- Timestamp:
- Dec 14, 2016 3:16:23 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 28 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209794 r209797 1 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 3 REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early 4 https://bugs.webkit.org/show_bug.cgi?id=164022 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * media/media-source/media-source-resize-expected.txt: 9 Expect the resize event. 10 * media/media-source/media-source-resize.html: 11 The test now succeeds no matter if the dimension is reported after 12 processing the init-segment (GTK+ case) or after the media segment 13 is processed (Mac case). 14 * platform/gtk/TestExpectations: 15 Reenabled all the media/media-source tests except one. 16 * platform/gtk/media/media-source/media-source-resize-expected.txt: 17 Copied from LayoutTests/media/media-source/media-source-resize-expected.txt. 18 The right dimensions are received earlier than in Mac. 19 1 20 2016-12-13 Yusuke Suzuki <utatane.tea@gmail.com> 2 21 -
trunk/LayoutTests/media/media-source/media-source-resize-expected.txt
r207584 r209797 6 6 RUN(sourceBuffer = source.addSourceBuffer(loader.type())) 7 7 RUN(sourceBuffer.appendBuffer(loader.initSegment())) 8 EVENT(resize) 8 9 EVENT(update) 9 10 Append a media segment. -
trunk/LayoutTests/media/media-source/media-source-resize.html
r207584 r209797 33 33 run('sourceBuffer = source.addSourceBuffer(loader.type())'); 34 34 waitForEventOn(sourceBuffer, 'update', sourceInitialized, false, true); 35 waitForEventOnce('resize', resize); 35 36 run('sourceBuffer.appendBuffer(loader.initSegment())'); 36 37 } … … 43 44 44 45 function resize() { 45 testExpected('video.videoWidth', 640); 46 testExpected('video.videoHeight', 480); 47 endTest(); 46 // First resize can be 0x0 (Mac) or 640x480 (GTK+) 47 if (video.videoWidth > 0 && video.videoHeight > 0) { 48 testExpected('video.videoWidth', 640); 49 testExpected('video.videoHeight', 480); 50 endTest(); 51 } 48 52 } 49 53 </script> -
trunk/LayoutTests/platform/gtk/TestExpectations
r209648 r209797 232 232 webkit.org/b/92749 fast/dom/NavigatorContentUtils/is-protocol-handler-registered.html [ Skip ] 233 233 234 # Tests for MediaSource API. Feature is not totally functional.234 # Tests for MediaSource API. Webm is required by the tests but we don't support it. 235 235 webkit.org/b/99065 imported/w3c/web-platform-tests/media-source/ [ Skip ] 236 237 # We don't support multiple streams per sourcebuffer nor dynamic type changes (audio/video/text) 238 webkit.org/b/165394 media/media-source/media-source-seek-detach-crash.html [ Skip ] 236 239 237 240 # Encrypted Media Extensions are not enabled. … … 2889 2892 webkit.org/b/160119 fast/css3-text/css3-text-justify/text-justify-last-line-simple-line-layout.html [ ImageOnlyFailure ] 2890 2893 2891 webkit.org/b/164022 media/media-source [ Skip ]2892 2893 2894 #//////////////////////////////////////////////////////////////////////////////////////// 2894 2895 # End of tests failing due to THREADED COMPOSITOR enablement. Don't put random test -
trunk/LayoutTests/platform/gtk/media/media-source/media-source-resize-expected.txt
r209796 r209797 6 6 RUN(sourceBuffer = source.addSourceBuffer(loader.type())) 7 7 RUN(sourceBuffer.appendBuffer(loader.initSegment())) 8 EVENT(update)9 Append a media segment.10 RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))11 8 EVENT(resize) 12 9 EXPECTED (video.videoWidth == '640') OK -
trunk/Source/WTF/ChangeLog
r209795 r209797 1 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 3 REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early 4 https://bugs.webkit.org/show_bug.cgi?id=164022 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * wtf/glib/GLibUtilities.h: 9 Added new macros to convert gulong to/from gpointer. 10 1 11 2016-12-14 Gavin Barraclough <barraclough@apple.com> 2 12 -
trunk/Source/WTF/wtf/glib/GLibUtilities.h
r185502 r209797 26 26 CString getCurrentExecutablePath(); 27 27 28 // These might be added to glib in the future, but in the meantime they're defined here. 29 #ifndef GULONG_TO_POINTER 30 #define GULONG_TO_POINTER(ul) ((gpointer) (gulong) (ul)) 28 31 #endif 32 33 #ifndef GPOINTER_TO_ULONG 34 #define GPOINTER_TO_ULONG(p) ((gulong) (p)) 35 #endif 36 37 #endif -
trunk/Source/WebCore/ChangeLog
r209796 r209797 1 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 3 REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early 4 https://bugs.webkit.org/show_bug.cgi?id=164022 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Covered by existing tests. 9 10 * page/Settings.cpp: 11 Added new setting to disable GStreamer players, so the selection of 12 MockMediaPlayerMediaSource can be forced for some tests, just like 13 it's already being done for the AVFoundation player in Mac. 14 (WebCore::Settings::setGStreamerEnabled): 15 * page/Settings.h: 16 (WebCore::Settings::isGStreamerEnabled): 17 * platform/graphics/MediaPlayer.cpp: 18 (WebCore::buildMediaEnginesVector): 19 Don't register GStreamer players when they're disabled. 20 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 21 (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime): 22 Use doubles instead of floats. 23 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 24 Use doubles instead of floats for m_durationAtEOS. 25 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 26 Don't reset m_sample on videoSink drain, it causes too many problems. 27 (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): 28 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: 29 Removed unused methods. 30 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: 31 Keep releasing m_sample on drain, but don't report the event 32 externally via signal anymore. The base player private isn't 33 listening to it anymore. 34 (webkitVideoSinkEvent): 35 (webkit_video_sink_class_init): 36 * platform/graphics/gstreamer/mse/AppendPipeline.cpp: 37 (WebCore::AppendPipeline::parseDemuxerSrcPadCaps): 38 Check if the demuxer caps correspond to a supported codec. 39 (WebCore::AppendPipeline::didReceiveInitializationSegment): 40 Empty m_track is now legal and means unsupported codec. 41 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread): 42 Warn about more than one stream, but "support" it by ignoring it using 43 a black hole probe. 44 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink): 45 Also report the duration when it's detected for the first time. Invalid 46 stream types now mean that unsupported codecs have been detected. 47 Complete init segment processing in that case. 48 (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread): 49 Disconnect black hole probe. 50 (WebCore::appendPipelineDemuxerBlackHolePadProbe): Ignore buffers. 51 (WebCore::appendPipelineDemuxerPadRemoved): New parameter used. 52 * platform/graphics/gstreamer/mse/AppendPipeline.h: 53 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: 54 (WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs): 55 Check supported codecs by matching against wildcard expressions. 56 (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType): 57 Check for supported codecs. 58 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: 59 New supportsCodecs() method. 60 * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp: 61 (WebCore::MediaSourceClientGStreamerMSE::resetParserState): 62 Implemented parser resetting by aborting the AppendPipeline. 63 * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h: 64 Added resetParserState(). 65 * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: 66 (WebCore::SourceBufferPrivateGStreamer::resetParserState): 67 Implemented it. 68 * testing/Internals.cpp: 69 (WebCore::Internals::initializeMockMediaSource): 70 Disable the GStreamer players when initializing the mock media source, 71 like it's already done for the AVFoundation player to force the 72 selection of MockMediaPlayerMediaSource. 73 1 74 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 75 -
trunk/Source/WebCore/page/Settings.cpp
r209465 r209797 82 82 #if PLATFORM(COCOA) 83 83 bool Settings::gQTKitEnabled = false; 84 #endif 85 86 #if USE(GSTREAMER) 87 bool Settings::gGStreamerEnabled = true; 84 88 #endif 85 89 … … 583 587 #endif 584 588 589 #if USE(GSTREAMER) 590 void Settings::setGStreamerEnabled(bool enabled) 591 { 592 if (gGStreamerEnabled == enabled) 593 return; 594 595 gGStreamerEnabled = enabled; 596 HTMLMediaElement::resetMediaEngines(); 597 } 598 #endif 599 585 600 #if ENABLE(MEDIA_STREAM) 586 601 bool Settings::mockCaptureDevicesEnabled() -
trunk/Source/WebCore/page/Settings.h
r208982 r209797 219 219 #endif 220 220 221 #if USE(GSTREAMER) 222 WEBCORE_EXPORT static void setGStreamerEnabled(bool flag); 223 static bool isGStreamerEnabled() { return gGStreamerEnabled; } 224 #endif 225 221 226 static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512; 222 227 static const unsigned defaultMaximumRenderTreeDepth = 512; … … 377 382 #endif 378 383 384 #if USE(GSTREAMER) 385 WEBCORE_EXPORT static bool gGStreamerEnabled; 386 #endif 387 379 388 static bool gMockScrollbarsEnabled; 380 389 static bool gUsesOverlayScrollbars; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r208151 r209797 226 226 227 227 #if ENABLE(MEDIA_STREAM) && USE(GSTREAMER) && USE(OPENWEBRTC) 228 MediaPlayerPrivateGStreamerOwr::registerMediaEngine(addMediaEngine); 228 if (Settings::isGStreamerEnabled()) 229 MediaPlayerPrivateGStreamerOwr::registerMediaEngine(addMediaEngine); 229 230 #endif 230 231 231 232 #if defined(PlatformMediaEngineClassName) 232 PlatformMediaEngineClassName::registerMediaEngine(addMediaEngine); 233 #if USE(GSTREAMER) 234 if (Settings::isGStreamerEnabled()) 235 #endif 236 PlatformMediaEngineClassName::registerMediaEngine(addMediaEngine); 233 237 #endif 234 238 235 239 #if ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(MEDIA_SOURCE) && ENABLE(VIDEO_TRACK) 236 MediaPlayerPrivateGStreamerMSE::registerMediaEngine(addMediaEngine); 240 if (Settings::isGStreamerEnabled()) 241 MediaPlayerPrivateGStreamerMSE::registerMediaEngine(addMediaEngine); 237 242 #endif 238 243 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r209796 r209797 428 428 429 429 if (m_durationAtEOS) 430 return MediaTime::createWith Float(m_durationAtEOS);430 return MediaTime::createWithDouble(m_durationAtEOS); 431 431 432 432 // The duration query would fail on a not-prerolled pipeline. -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r207885 r209797 181 181 mutable bool m_isEndReached; 182 182 mutable bool m_isStreaming; 183 mutable g floatm_durationAtEOS;183 mutable gdouble m_durationAtEOS; 184 184 bool m_paused; 185 185 float m_playbackRate; -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r209549 r209797 685 685 } 686 686 687 void MediaPlayerPrivateGStreamerBase::triggerDrain()688 {689 WTF::GMutexLocker<GMutex> lock(m_sampleMutex);690 m_videoSize = FloatSize();691 m_sample = nullptr;692 }693 694 687 void MediaPlayerPrivateGStreamerBase::repaintCallback(MediaPlayerPrivateGStreamerBase* player, GstSample* sample) 695 688 { 696 689 player->triggerRepaint(sample); 697 }698 699 void MediaPlayerPrivateGStreamerBase::drainCallback(MediaPlayerPrivateGStreamerBase* player)700 {701 player->triggerDrain();702 690 } 703 691 … … 1037 1025 m_videoSink = webkitVideoSinkNew(); 1038 1026 g_signal_connect_swapped(m_videoSink.get(), "repaint-requested", G_CALLBACK(repaintCallback), this); 1039 g_signal_connect_swapped(m_videoSink.get(), "drain", G_CALLBACK(drainCallback), this);1040 1027 } 1041 1028 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h
r208676 r209797 167 167 virtual bool handleSyncMessage(GstMessage*); 168 168 169 void triggerDrain();170 171 169 void triggerRepaint(GstSample*); 172 170 void repaint(); 173 171 174 static void drainCallback(MediaPlayerPrivateGStreamerBase*);175 172 static void repaintCallback(MediaPlayerPrivateGStreamerBase*, GstSample*); 176 173 -
trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
r207874 r209797 59 59 enum { 60 60 REPAINT_REQUESTED, 61 DRAIN,62 61 LAST_SIGNAL 63 62 }; … … 356 355 } 357 356 358 static gboolean webkitVideoSinkQuery(GstBaseSink* baseSink, GstQuery* query)359 {360 WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink);361 362 switch (GST_QUERY_TYPE(query)) {363 case GST_QUERY_DRAIN:364 GST_OBJECT_LOCK(sink);365 g_signal_emit(sink, webkitVideoSinkSignals[DRAIN], 0);366 GST_OBJECT_UNLOCK(sink);367 return TRUE;368 default:369 return GST_CALL_PARENT_WITH_DEFAULT(GST_BASE_SINK_CLASS, query, (baseSink, query), TRUE);370 }371 }372 373 357 static gboolean webkitVideoSinkEvent(GstBaseSink* baseSink, GstEvent* event) 374 358 { … … 378 362 sink->priv->scheduler.drain(); 379 363 380 GST_DEBUG_OBJECT(sink, "Flush-start, emitting DRAIN signal and releasing m_sample"); 381 382 GST_OBJECT_LOCK(sink); 383 g_signal_emit(sink, webkitVideoSinkSignals[DRAIN], 0); 384 GST_OBJECT_UNLOCK(sink); 364 GST_DEBUG_OBJECT(sink, "Flush-start, releasing m_sample"); 385 365 } 386 366 FALLTHROUGH; … … 411 391 baseSinkClass->set_caps = webkitVideoSinkSetCaps; 412 392 baseSinkClass->propose_allocation = webkitVideoSinkProposeAllocation; 413 baseSinkClass->query = webkitVideoSinkQuery;414 393 baseSinkClass->event = webkitVideoSinkEvent; 415 394 … … 424 403 1, // Only one parameter 425 404 GST_TYPE_SAMPLE); 426 427 webkitVideoSinkSignals[DRAIN] = g_signal_new("drain",428 G_TYPE_FROM_CLASS(klass),429 static_cast<GSignalFlags>(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),430 0, // Class offset.431 0, // Accumulator.432 0, // Accumulator data.433 g_cclosure_marshal_generic,434 G_TYPE_NONE, // Return type.435 0); // No parameters.436 405 } 437 406 -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
r207894 r209797 40 40 #include <gst/video/video.h> 41 41 #include <wtf/Condition.h> 42 #include <wtf/glib/GLibUtilities.h> 42 43 43 44 namespace WebCore { … … 75 76 static GstPadProbeReturn appendPipelinePadProbeDebugInformation(GstPad*, GstPadProbeInfo*, struct PadProbeInformation*); 76 77 #endif 78 static GstPadProbeReturn appendPipelineDemuxerBlackHolePadProbe(GstPad*, GstPadProbeInfo*, gpointer); 77 79 static GstFlowReturn appendPipelineAppsinkNewSample(GstElement*, AppendPipeline*); 78 80 static void appendPipelineAppsinkEOS(GstElement*, AppendPipeline*); … … 531 533 const gchar* originalMediaType = gst_structure_get_string(structure, "original-media-type"); 532 534 533 if (g_str_has_prefix(originalMediaType, "video/")) { 535 if (!MediaPlayerPrivateGStreamerMSE::supportsCodecs(originalMediaType)) { 536 m_presentationSize = WebCore::FloatSize(); 537 m_streamType = WebCore::MediaSourceStreamTypeGStreamer::Invalid; 538 } else if (g_str_has_prefix(originalMediaType, "video/")) { 534 539 int width = 0; 535 540 int height = 0; … … 561 566 GstVideoInfo info; 562 567 563 if (g_str_has_prefix(structureName, "video/") && gst_video_info_from_caps(&info, demuxerSrcPadCaps)) { 568 if (!MediaPlayerPrivateGStreamerMSE::supportsCodecs(structureName)) { 569 m_presentationSize = WebCore::FloatSize(); 570 m_streamType = WebCore::MediaSourceStreamTypeGStreamer::Invalid; 571 } else if (g_str_has_prefix(structureName, "video/") && gst_video_info_from_caps(&info, demuxerSrcPadCaps)) { 564 572 float width, height; 565 573 … … 705 713 WebCore::SourceBufferPrivateClient::InitializationSegment initializationSegment; 706 714 707 GST_DEBUG("Notifying SourceBuffer for track %s", m_track->id().string().utf8().data());715 GST_DEBUG("Notifying SourceBuffer for track %s", (m_track) ? m_track->id().string().utf8().data() : nullptr); 708 716 initializationSegment.duration = m_mediaSourceClient->duration(); 717 709 718 switch (m_streamType) { 710 719 case Audio: { … … 723 732 } 724 733 default: 725 GST_ERROR("Unsupported or unknown stream type"); 726 ASSERT_NOT_REACHED(); 734 GST_ERROR("Unsupported stream type or codec"); 727 735 break; 728 736 } … … 872 880 GST_DEBUG("connecting to appsink"); 873 881 882 if (m_demux->numsrcpads > 1) { 883 GST_WARNING("Only one stream per SourceBuffer is allowed! Ignoring stream %d by adding a black hole probe.", m_demux->numsrcpads); 884 gulong probeId = gst_pad_add_probe(demuxerSrcPad, GST_PAD_PROBE_TYPE_BUFFER, reinterpret_cast<GstPadProbeCallback>(appendPipelineDemuxerBlackHolePadProbe), nullptr, nullptr); 885 g_object_set_data(G_OBJECT(demuxerSrcPad), "blackHoleProbeId", GULONG_TO_POINTER(probeId)); 886 return; 887 } 888 874 889 GRefPtr<GstPad> appsinkSinkPad = adoptGRef(gst_element_get_static_pad(m_appsink.get(), "sink")); 875 890 … … 960 975 #endif 961 976 962 if (m_initialDuration > m_mediaSourceClient->duration()) 977 if (m_initialDuration > m_mediaSourceClient->duration() 978 || (m_mediaSourceClient->duration().isInvalid() && m_initialDuration > MediaTime::zeroTime())) 963 979 m_mediaSourceClient->durationChanged(m_initialDuration); 964 980 … … 979 995 m_track = WebCore::InbandTextTrackPrivateGStreamer::create(id(), sinkSinkPad.get()); 980 996 break; 997 case WebCore::MediaSourceStreamTypeGStreamer::Invalid: 998 { 999 GUniquePtr<gchar> strcaps(gst_caps_to_string(caps.get())); 1000 GST_DEBUG("Unsupported track codec: %s", strcaps.get()); 1001 } 1002 // This is going to cause an error which will detach the SourceBuffer and tear down this 1003 // AppendPipeline, so we need the padAddRemove lock released before continuing. 1004 m_track = nullptr; 1005 m_padAddRemoveCondition.notifyOne(); 1006 locker.unlockEarly(); 1007 didReceiveInitializationSegment(); 1008 return; 981 1009 default: 982 1010 // No useful data, but notify anyway to complete the append operation. … … 989 1017 } 990 1018 991 void AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread() 992 { 1019 void AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread(GstPad* demuxerSrcPad) 1020 { 1021 // Must be done in the thread we were called from (usually streaming thread). 1022 if (!gst_pad_is_linked(demuxerSrcPad)) { 1023 gulong probeId = GPOINTER_TO_ULONG(g_object_get_data(G_OBJECT(demuxerSrcPad), "blackHoleProbeId")); 1024 if (probeId) { 1025 GST_DEBUG("Disconnecting black hole probe."); 1026 g_object_set_data(G_OBJECT(demuxerSrcPad), "blackHoleProbeId", nullptr); 1027 gst_pad_remove_probe(demuxerSrcPad, probeId); 1028 } else 1029 GST_WARNING("Not disconnecting demuxer src pad because it wasn't linked"); 1030 return; 1031 } 1032 993 1033 GST_DEBUG("Disconnecting appsink"); 994 1034 995 // Must be done in the thread we were called from (usually streaming thread).996 1035 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) 997 1036 if (m_decryptor) { … … 1037 1076 #endif 1038 1077 1078 static GstPadProbeReturn appendPipelineDemuxerBlackHolePadProbe(GstPad*, GstPadProbeInfo* info, gpointer) 1079 { 1080 ASSERT(GST_PAD_PROBE_INFO_TYPE(info) & GST_PAD_PROBE_TYPE_BUFFER); 1081 GstBuffer* buffer = GST_PAD_PROBE_INFO_BUFFER(info); 1082 GST_TRACE("buffer of size %" G_GSIZE_FORMAT " ignored", gst_buffer_get_size(buffer)); 1083 return GST_PAD_PROBE_DROP; 1084 } 1085 1039 1086 static void appendPipelineAppsrcNeedData(GstAppSrc*, guint, AppendPipeline* appendPipeline) 1040 1087 { … … 1047 1094 } 1048 1095 1049 static void appendPipelineDemuxerPadRemoved(GstElement*, GstPad* , AppendPipeline* appendPipeline)1050 { 1051 appendPipeline->disconnectDemuxerSrcPadFromAppsinkFromAnyThread( );1096 static void appendPipelineDemuxerPadRemoved(GstElement*, GstPad* demuxerSrcPad, AppendPipeline* appendPipeline) 1097 { 1098 appendPipeline->disconnectDemuxerSrcPadFromAppsinkFromAnyThread(demuxerSrcPad); 1052 1099 } 1053 1100 -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h
r207894 r209797 78 78 WebCore::MediaSourceStreamTypeGStreamer streamType() { return m_streamType; } 79 79 80 void disconnectDemuxerSrcPadFromAppsinkFromAnyThread( );80 void disconnectDemuxerSrcPadFromAppsinkFromAnyThread(GstPad*); 81 81 void connectDemuxerSrcPadToAppsinkFromAnyThread(GstPad*); 82 82 void connectDemuxerSrcPadToAppsink(GstPad*); -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
r209796 r209797 42 42 #include "VideoTrackPrivateGStreamer.h" 43 43 44 #include <fnmatch.h> 44 45 #include <gst/app/gstappsink.h> 45 46 #include <gst/app/gstappsrc.h> … … 750 751 } 751 752 753 bool MediaPlayerPrivateGStreamerMSE::supportsCodecs(const String& codecs) 754 { 755 static Vector<const char*> supportedCodecs = { "avc*", "mp4a*", "mpeg", "x-h264" }; 756 Vector<String> codecEntries; 757 codecs.split(',', false, codecEntries); 758 759 for (String codec : codecEntries) { 760 bool isCodecSupported = false; 761 762 // If the codec is named like a mimetype (eg: video/avc) remove the "video/" part. 763 size_t slashIndex = codec.find('/'); 764 if (slashIndex != WTF::notFound) 765 codec = codec.substring(slashIndex+1); 766 767 const char* codecData = codec.utf8().data(); 768 for (const auto& pattern : supportedCodecs) { 769 if (isCodecSupported = !fnmatch(pattern, codecData, 0)) 770 break; 771 } 772 if (!isCodecSupported) 773 return false; 774 } 775 776 return true; 777 } 778 752 779 MediaPlayer::SupportsType MediaPlayerPrivateGStreamerMSE::supportsType(const MediaEngineSupportParameters& parameters) 753 780 { … … 767 794 768 795 // Spec says we should not return "probably" if the codecs string is empty. 769 if (mimeTypeCache().contains(parameters.type)) 770 result = parameters.codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported; 796 if (mimeTypeCache().contains(parameters.type)) { 797 if (parameters.codecs.isEmpty()) 798 result = MediaPlayer::MayBeSupported; 799 else 800 result = supportsCodecs(parameters.codecs) ? MediaPlayer::IsSupported : MediaPlayer::IsNotSupported; 801 } 771 802 772 803 return extendedSupportsType(parameters, result); -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
r207881 r209797 88 88 void notifySeekNeedsDataForTime(const MediaTime&); 89 89 90 static bool supportsCodecs(const String& codecs); 91 90 92 private: 91 93 static void getSupportedTypes(HashSet<String, ASCIICaseInsensitiveHash>&); -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp
r207878 r209797 105 105 } 106 106 107 void MediaSourceClientGStreamerMSE::resetParserState(RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivate) 108 { 109 ASSERT(WTF::isMainThread()); 110 111 GST_DEBUG("resetting parser state"); 112 113 if (!m_playerPrivate) 114 return; 115 116 RefPtr<AppendPipeline> appendPipeline = m_playerPrivate->m_appendPipelinesMap.get(sourceBufferPrivate); 117 118 ASSERT(appendPipeline); 119 120 appendPipeline->abort(); 121 } 122 107 123 bool MediaSourceClientGStreamerMSE::append(RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivate, const unsigned char* data, unsigned length) 108 124 { -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h
r207878 r209797 48 48 // From SourceBufferPrivateGStreamer. 49 49 void abort(RefPtr<SourceBufferPrivateGStreamer>); 50 void resetParserState(RefPtr<SourceBufferPrivateGStreamer>); 50 51 bool append(RefPtr<SourceBufferPrivateGStreamer>, const unsigned char*, unsigned); 51 52 void removedFromMediaSource(RefPtr<SourceBufferPrivateGStreamer>); -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
r207879 r209797 87 87 void SourceBufferPrivateGStreamer::resetParserState() 88 88 { 89 notImplemented();89 m_client->resetParserState(this); 90 90 } 91 91 -
trunk/Source/WebCore/testing/Internals.cpp
r209794 r209797 2694 2694 WebCore::Settings::setAVFoundationEnabled(false); 2695 2695 #endif 2696 #if USE(GSTREAMER) 2697 WebCore::Settings::setGStreamerEnabled(false); 2698 #endif 2696 2699 MediaPlayerFactorySupport::callRegisterMediaEngine(MockMediaPlayerMediaSource::registerMediaEngine); 2697 2700 } -
trunk/Source/WebKit2/ChangeLog
r209793 r209797 1 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 3 REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early 4 https://bugs.webkit.org/show_bug.cgi?id=164022 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * Shared/WebPreferencesDefinitions.h: 9 New GStreamerEnabled preference, defaults to true. 10 * WebProcess/WebPage/WebPage.cpp: Ditto. 11 (WebKit::WebPage::updatePreferences): 12 1 13 2016-12-13 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r209643 r209797 153 153 macro(AVFoundationEnabled, isAVFoundationEnabled, Bool, bool, true, "", "") \ 154 154 macro(AVFoundationNSURLSessionEnabled, isAVFoundationNSURLSessionEnabled, Bool, bool, true, "", "") \ 155 macro(GStreamerEnabled, isGStreamerEnabled, Bool, bool, true, "", "") \ 155 156 macro(RequiresUserGestureForMediaPlayback, requiresUserGestureForMediaPlayback, Bool, bool, false, "", "") \ 156 157 macro(RequiresUserGestureForVideoPlayback, requiresUserGestureForVideoPlayback, Bool, bool, false, "", "") \ -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r209757 r209797 3021 3021 #endif 3022 3022 3023 #if USE(GSTREAMER) 3024 settings.setGStreamerEnabled(store.getBoolValueForKey(WebPreferencesKey::isGStreamerEnabledKey())); 3025 #endif 3026 3023 3027 #if PLATFORM(COCOA) 3024 3028 settings.setQTKitEnabled(store.getBoolValueForKey(WebPreferencesKey::isQTKitEnabledKey())); -
trunk/Tools/ChangeLog
r209786 r209797 1 2016-12-14 Enrique Ocaña González <eocanha@igalia.com> 2 3 REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early 4 https://bugs.webkit.org/show_bug.cgi?id=164022 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * Scripts/webkitperl/FeatureList.pm: 9 Re-enable MEDIA_SOURCE for the GTK+ port. 10 1 11 2016-12-13 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Tools/Scripts/webkitperl/FeatureList.pm
r209310 r209797 335 335 336 336 { option => "media-source", desc => "Toggle Media Source support", 337 define => "ENABLE_MEDIA_SOURCE", default => 0, value => \$mediaSourceSupport },337 define => "ENABLE_MEDIA_SOURCE", default => isGtk(), value => \$mediaSourceSupport }, 338 338 339 339 { option => "media-statistics", desc => "Toggle Media Statistics support",
Note: See TracChangeset
for help on using the changeset viewer.