Changeset 271399 in webkit
- Timestamp:
- Jan 12, 2021 4:33:25 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r271398 r271399 1 2021-01-12 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] Bump version requirement 4 https://bugs.webkit.org/show_bug.cgi?id=220356 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 * Source/cmake/GStreamerChecks.cmake: Bump required version to 1.14. 9 1 10 2021-01-12 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r271398 r271399 1 2021-01-12 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] Bump version requirement 4 https://bugs.webkit.org/show_bug.cgi?id=220356 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Remove compile-time and runtime GStreamer version checks that are 9 not needed anymore since we now require at least GStreamer 1.14 at 10 configure time. 11 12 * platform/GStreamer.cmake: 13 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: 14 (_WebKitWebAudioSrcPrivate::_WebKitWebAudioSrcPrivate): 15 (webKitWebAudioSrcRenderAndPushFrames): 16 (webKitWebAudioSrcChangeState): 17 * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: 18 (requestGLContext): 19 (webKitGLVideoSinkChangeState): 20 * platform/graphics/gstreamer/GStreamerAudioMixer.cpp: 21 (WebCore::GStreamerAudioMixer::ensureState): 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 23 (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const): 24 (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): 25 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 26 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 27 (WebCore::convertToInternalProtocol): Deleted. 28 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 29 * platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp: 30 (PlatformDisplay::tryEnsureGstGLContext const): 31 * platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp: 32 (webKitAudioSinkChangeState): 33 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 34 (webKitWebSrcCreate): 35 (webKitWebSrcGetProtocols): 36 (convertPlaybinURI): 37 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: 38 (WebCore::InitData::payloadContainerType const): 39 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: 40 (transformCaps): 41 * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: 42 (webkitMediaStreamSrcChangeState): 43 1 44 2021-01-12 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 45 -
trunk/Source/WebCore/platform/GStreamer.cmake
r270190 r271399 142 142 143 143 if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC) 144 if (PC_GSTREAMER_VERSION VERSION_LESS "1.10") 145 message(FATAL_ERROR "GStreamer 1.10 is needed for ENABLE_MEDIA_STREAM or ENABLE_WEB_RTC") 146 else () 147 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 148 ${GSTREAMER_CODECPARSERS_INCLUDE_DIRS} 144 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES 145 ${GSTREAMER_CODECPARSERS_INCLUDE_DIRS} 146 ) 147 if (NOT USE_GSTREAMER_FULL) 148 list(APPEND WebCore_LIBRARIES 149 ${GSTREAMER_CODECPARSERS_LIBRARIES} 149 150 ) 150 if (NOT USE_GSTREAMER_FULL)151 list(APPEND WebCore_LIBRARIES152 ${GSTREAMER_CODECPARSERS_LIBRARIES}153 )154 endif ()155 151 endif () 156 152 endif () -
trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
r271197 r271399 79 79 GRefPtr<GstBufferPool> pool; 80 80 81 bool enableGapBufferSupport;82 81 bool hasRenderedAudibleFrame { false }; 83 82 … … 94 93 95 94 g_rec_mutex_init(&mutex); 96 97 // GAP buffer support is enabled only for GStreamer 1.12.5 because of a98 // memory leak that was fixed in that version.99 // https://bugzilla.gnome.org/show_bug.cgi?id=793067100 enableGapBufferSupport = webkitGstCheckVersion(1, 12, 5);101 95 } 102 96 … … 371 365 GST_BUFFER_DURATION(buffer.get()) = duration; 372 366 373 if (priv-> enableGapBufferSupport && priv->bus->channel(i)->isSilent())367 if (priv->bus->channel(i)->isSilent()) 374 368 GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_GAP); 375 369 … … 431 425 auto* priv = src->priv; 432 426 433 #if GST_CHECK_VERSION(1, 14, 0)434 427 GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition)); 435 #endif436 428 437 429 switch (transition) { -
trunk/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
r267138 r271399 134 134 GstContext* appContext = gst_context_new("gst.gl.app_context", TRUE); 135 135 GstStructure* structure = gst_context_writable_structure(appContext); 136 #if GST_CHECK_VERSION(1, 12, 0)137 136 gst_structure_set(structure, "context", GST_TYPE_GL_CONTEXT, gstGLContext, nullptr); 138 #else139 gst_structure_set(structure, "context", GST_GL_TYPE_CONTEXT, gstGLContext, nullptr);140 #endif141 137 return adoptGRef(appContext); 142 138 } … … 159 155 static GstStateChangeReturn webKitGLVideoSinkChangeState(GstElement* element, GstStateChange transition) 160 156 { 161 #if GST_CHECK_VERSION(1, 14, 0)162 157 GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition)); 163 #endif164 158 165 159 switch (transition) { 166 160 case GST_STATE_CHANGE_NULL_TO_READY: 167 #if GST_CHECK_VERSION(1, 14, 0)168 161 case GST_STATE_CHANGE_READY_TO_READY: 169 #endif170 162 case GST_STATE_CHANGE_READY_TO_PAUSED: { 171 163 if (!setGLContext(element, GST_GL_DISPLAY_CONTEXT_TYPE)) -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
r267787 r271399 58 58 void GStreamerAudioMixer::ensureState(GstStateChange stateChange) 59 59 { 60 #if GST_CHECK_VERSION(1, 14, 0)61 60 GST_DEBUG_OBJECT(m_pipeline.get(), "Handling %s transition (%u mixer pads)", gst_state_change_get_name(stateChange), m_mixer->numsinkpads); 62 #endif 61 63 62 switch (stateChange) { 64 63 case GST_STATE_CHANGE_READY_TO_PAUSED: -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r271398 r271399 154 154 } 155 155 156 static void convertToInternalProtocol(URL& url)157 {158 if (webkitGstCheckVersion(1, 12, 0))159 return;160 if (url.protocolIsInHTTPFamily() || url.protocolIsBlob())161 url.setProtocol(makeString("webkit+", url.protocol()));162 }163 164 156 static void initializeDebugCategory() 165 157 { … … 849 841 Optional<bool> MediaPlayerPrivateGStreamer::wouldTaintOrigin(const SecurityOrigin& origin) const 850 842 { 851 if (webkitGstCheckVersion(1, 12, 0)) { 852 GST_TRACE_OBJECT(pipeline(), "Checking %u origins", m_origins.size()); 853 for (auto& responseOrigin : m_origins) { 854 if (!origin.canAccess(*responseOrigin)) { 855 GST_DEBUG_OBJECT(pipeline(), "Found reachable response origin"); 856 return true; 857 } 858 } 859 GST_DEBUG_OBJECT(pipeline(), "No valid response origin found"); 860 return false; 861 } 862 863 // GStreamer < 1.12 has an incomplete uridownloader implementation so we 864 // can't use WebKitWebSrc for adaptive fragments downloading if this 865 // version is detected. 866 return m_hasTaintedOrigin; 843 GST_TRACE_OBJECT(pipeline(), "Checking %u origins", m_origins.size()); 844 for (auto& responseOrigin : m_origins) { 845 if (!origin.canAccess(*responseOrigin)) { 846 GST_DEBUG_OBJECT(pipeline(), "Found reachable response origin"); 847 return true; 848 } 849 } 850 GST_DEBUG_OBJECT(pipeline(), "No valid response origin found"); 851 return false; 867 852 } 868 853 … … 984 969 985 970 m_url = URL(URL(), cleanURLString); 986 convertToInternalProtocol(m_url);987 971 GST_INFO_OBJECT(pipeline(), "Load %s", m_url.string().utf8().data()); 988 972 g_object_set(m_pipeline.get(), "uri", m_url.string().utf8().data(), nullptr); … … 1974 1958 if (const char* uri = gst_structure_get_string(structure, "uri")) { 1975 1959 URL url(URL(), uri); 1976 convertToInternalProtocol(url);1977 1960 m_origins.add(SecurityOrigin::create(url)); 1978 1961 … … 2013 1996 if (gst_structure_get(structure, "read-position", G_TYPE_UINT64, &m_networkReadPosition, "size", G_TYPE_UINT64, &m_httpResponseTotalSize, nullptr)) 2014 1997 GST_DEBUG_OBJECT(pipeline(), "Updated network read position %" G_GUINT64_FORMAT ", size: %" G_GUINT64_FORMAT, m_networkReadPosition, m_httpResponseTotalSize); 2015 } else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) {2016 if (WEBKIT_IS_WEB_SRC(m_source.get()) && !webkitGstCheckVersion(1, 12, 0)) {2017 if (const char* uri = gst_structure_get_string(structure, "uri"))2018 m_hasTaintedOrigin = webKitSrcWouldTaintOrigin(WEBKIT_WEB_SRC_CAST(m_source.get()), SecurityOrigin::create(URL(URL(), uri)));2019 }2020 1998 } else if (gst_structure_has_name(structure, "GstCacheDownloadComplete")) { 2021 1999 GST_INFO_OBJECT(pipeline(), "Stream is fully downloaded, stopping monitoring downloading progress."); … … 2817 2795 ASSERT(m_textAppSinkPad); 2818 2796 2819 GRefPtr<GstCaps> textCaps; 2820 if (webkitGstCheckVersion(1, 14, 0)) 2821 textCaps = adoptGRef(gst_caps_new_empty_simple("application/x-subtitle-vtt")); 2822 else 2823 textCaps = adoptGRef(gst_caps_new_empty_simple("text/vtt")); 2797 auto textCaps = adoptGRef(gst_caps_new_empty_simple("application/x-subtitle-vtt")); 2824 2798 g_object_set(m_textAppSink.get(), "emit-signals", TRUE, "enable-last-sample", FALSE, "caps", textCaps.get(), nullptr); 2825 2799 g_signal_connect_swapped(m_textAppSink.get(), "new-sample", G_CALLBACK(newTextSampleCallback), this); -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r271302 r271399 52 52 // Include the <epoxy/gl.h> header before <gst/gl/gl.h>. 53 53 #include <epoxy/gl.h> 54 55 // Workaround build issue with RPi userland GLESv2 headers and libepoxy <https://webkit.org/b/185639>56 #if !GST_CHECK_VERSION(1, 14, 0)57 #include <gst/gl/gstglconfig.h>58 #if defined(GST_GL_HAVE_WINDOW_DISPMANX) && GST_GL_HAVE_WINDOW_DISPMANX59 #define __gl2_h_60 #undef GST_GL_HAVE_GLSYNC61 #define GST_GL_HAVE_GLSYNC 162 #endif63 #endif // !GST_CHECK_VERSION(1, 14, 0)64 54 #endif // USE(LIBEPOXY) 65 55 -
trunk/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp
r261854 r271399 99 99 return false; 100 100 101 bool shouldAdoptRef = webkitGstCheckVersion(1, 14, 0); 102 103 if (shouldAdoptRef) 104 m_gstGLDisplay = adoptGRef(createGstGLDisplay(*this)); 105 else 106 m_gstGLDisplay = createGstGLDisplay(*this); 101 m_gstGLDisplay = adoptGRef(createGstGLDisplay(*this)); 107 102 if (!m_gstGLDisplay) 108 103 return false; … … 110 105 GstGLPlatform glPlatform = sharedContext->isEGLContext() ? GST_GL_PLATFORM_EGL : GST_GL_PLATFORM_GLX; 111 106 112 if (shouldAdoptRef) 113 m_gstGLContext = adoptGRef(gst_gl_context_new_wrapped(m_gstGLDisplay.get(), reinterpret_cast<guintptr>(contextHandle), glPlatform, glAPI)); 114 else 115 m_gstGLContext = gst_gl_context_new_wrapped(m_gstGLDisplay.get(), reinterpret_cast<guintptr>(contextHandle), glPlatform, glAPI); 107 m_gstGLContext = adoptGRef(gst_gl_context_new_wrapped(m_gstGLDisplay.get(), reinterpret_cast<guintptr>(contextHandle), glPlatform, glAPI)); 116 108 117 109 // Activate and fill the GStreamer wrapped context with the Webkit's shared one. -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
r267787 r271399 257 257 auto* priv = sink->priv; 258 258 259 #if GST_CHECK_VERSION(1, 14, 0)260 259 GST_DEBUG_OBJECT(sink, "Handling %s transition", gst_state_change_get_name(stateChange)); 261 #endif262 260 263 261 auto& mixer = GStreamerAudioMixer::singleton(); -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r269951 r271399 466 466 // "source-setup" event. This doesn't work for additional WebKitWebSrc elements created by adaptivedemux. 467 467 // 468 // 2) A GstContext query made here. Because of a bug, this only works in GStreamer >= 1.12. 469 // 470 // As a compatibility workaround, the http: URI protocol is only registered for gst>=1.12; otherwise using 471 // webkit+http:, which is used by MediaPlayerPrivateGStreamer but not by adaptivedemux's additional source 472 // elements, therefore using souphttpsrc instead and not routing traffic through the NetworkProcess. 473 if (webkitGstCheckVersion(1, 12, 0) && !members->player) { 468 // 2) A GstContext query made here. 469 if (!members->player) { 474 470 members.runUnlocked([src, baseSrc]() { 475 471 GRefPtr<GstQuery> query = adoptGRef(gst_query_new_context(WEBKIT_WEB_SRC_PLAYER_CONTEXT_TYPE_NAME)); … … 864 860 { 865 861 static const char* protocols[4]; 866 if (webkitGstCheckVersion(1, 12, 0)) { 867 protocols[0] = "http"; 868 protocols[1] = "https"; 869 protocols[2] = "blob"; 870 } else { 871 protocols[0] = "webkit+http"; 872 protocols[1] = "webkit+https"; 873 protocols[2] = "webkit+blob"; 874 } 862 protocols[0] = "http"; 863 protocols[1] = "https"; 864 protocols[2] = "blob"; 875 865 protocols[3] = nullptr; 876 866 return protocols; … … 880 870 { 881 871 URL url(URL(), uriString); 882 if (!webkitGstCheckVersion(1, 12, 0)) {883 ASSERT(url.protocol().substring(0, 7) == "webkit+");884 url.setProtocol(url.protocol().substring(7).toString());885 }886 872 return url; 887 873 } -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h
r269097 r271399 80 80 String payloadContainerType() const 81 81 { 82 #if GST_CHECK_VERSION(1, 1 5, 0)82 #if GST_CHECK_VERSION(1, 16, 0) 83 83 if (m_systemId == GST_PROTECTION_UNSPECIFIED_SYSTEM_ID) 84 84 return "webm"_s; -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
r269031 r271399 126 126 // developement git master which will ship as version 1.16.0. 127 127 gst_structure_set_name(outgoingStructure.get(), 128 #if GST_CHECK_VERSION(1, 1 5, 0)128 #if GST_CHECK_VERSION(1, 16, 0) 129 129 !g_strcmp0(klass->protectionSystemId(self), GST_PROTECTION_UNSPECIFIED_SYSTEM_ID) ? "application/x-webm-enc" : 130 130 #endif -
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
r271290 r271399 402 402 static GstStateChangeReturn webkitMediaStreamSrcChangeState(GstElement* element, GstStateChange transition) 403 403 { 404 #if GST_CHECK_VERSION(1, 14, 0)405 404 GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition)); 406 #endif407 405 408 406 if (transition == GST_STATE_CHANGE_PAUSED_TO_READY) -
trunk/Source/cmake/GStreamerChecks.cmake
r268907 r271399 29 29 endif () 30 30 31 find_package(GStreamer 1.1 0.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})31 find_package(GStreamer 1.14.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS}) 32 32 33 33 if (ENABLE_WEB_AUDIO) … … 53 53 endif () 54 54 55 if (ENABLE_MEDIA_SOURCE AND PC_GSTREAMER_VERSION VERSION_LESS "1.14")56 message(FATAL_ERROR "GStreamer 1.14 is needed for ENABLE_MEDIA_SOURCE.")57 endif ()58 59 55 if (ENABLE_MEDIA_STREAM AND ENABLE_WEB_RTC) 60 if (PC_GSTREAMER_VERSION VERSION_LESS "1.12")61 message(FATAL_ERROR "GStreamer 1.12 is needed for ENABLE_WEB_RTC.")62 endif ()63 56 SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE) 64 57 SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE)
Note: See TracChangeset
for help on using the changeset viewer.