Changeset 271396 in webkit
- Timestamp:
- Jan 12, 2021 2:55:16 AM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r271394 r271396 1 2021-01-12 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] Lazy initialization support 4 https://bugs.webkit.org/show_bug.cgi?id=209332 5 6 Reviewed by Carlos Garcia Campos. 7 8 The GStreamer library is now mostly used from the WebProcess only. The last remaining 9 GStreamer usage from the UIProcess is triggered by the webkit_web_view_can_show_mime_type() 10 API, which is acceptable for now. 11 12 GStreamer will now be initialized only if it is needed, so lazy initialization calls were 13 added in the various WebCore components relying on the library. 14 15 Based on preliminary patches by Charlie Turner <cturner@igalia.com> and Victor M Jaquez <vjaquez@igalia.com>. 16 17 * platform/audio/gstreamer/AudioDestinationGStreamer.cpp: 18 (WebCore::initializeDebugCategory): Lazily initialize GStreamer and load our in-house 19 elements (webkitwebaudiosrc is needed by this module). 20 * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: 21 (WebCore::initializeDebugCategory): Lazily initialize GStreamer. 22 * platform/graphics/gstreamer/GStreamerCommon.cpp: 23 (WebCore::addGStreamerOptionsFromUIProcess): Store command-line arguments from the UIProcess. 24 (WebCore::ensureGStreamerInitialized): Ooptionally use command-line arguments from the 25 UIProcess. 26 (WebCore::registerWebKitGStreamerElements): Decouple from initialization function. 27 (WebCore::initializeGStreamer): Deleted. 28 (WebCore::initializeGStreamerAndRegisterWebKitElements): Deleted. 29 * platform/graphics/gstreamer/GStreamerCommon.h: 30 * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: 31 (WebCore::GStreamerRegistryScanner::GStreamerRegistryScanner): Lazily initialize GStreamer. 32 * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: 33 (WebCore::ImageDecoderGStreamer::supportsContainerType): Bail off on non-video mime-types 34 and call-sites outside of the WebProcess. We can't rely on gst_is_initialized() anymore 35 because it is lazily initialized. 36 (WebCore::ImageDecoderGStreamer::canDecodeType): Ditto. 37 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 38 (WebCore::MediaPlayerPrivateGStreamer::isAvailable): This is a no-op now, no need to check 39 the playbin factory, we can fail from setPipeline(). 40 (WebCore::MediaPlayerPrivateGStreamer::setPipeline): Bail off if playbin wasn't found. 41 (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): 42 (WebCore::MediaPlayerPrivateGStreamer::loadFull): Remove now-useless gif hack, the player 43 discards all non-audio non-video mimetype. 44 (WebCore::MediaPlayerPrivateGStreamer::volumeChangedCallback): Prevent ghost volume notifications. 45 (WebCore::MediaPlayerPrivateGStreamer::supportsType): Bail off on image mime-types. 46 * platform/graphics/gstreamer/MediaSampleGStreamer.cpp: 47 (WebCore::MediaSampleGStreamer::createImageSample): Lazily initialize GStreamer. 48 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: 49 (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine): Simplify, isAvailable() now no-op. 50 * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp: Lazily initialize GStreamer. 51 (WebCore::initializeDebugCategory): 52 (WebCore::m_capturer): 53 (WebCore::GStreamerAudioCaptureSource::GStreamerAudioCaptureSource): 54 (WebCore::initializeGStreamerDebug): Deleted. 55 * platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp: Lazily initialize GStreamer. 56 (WebCore::GStreamerCaptureDeviceManager::captureDevices): 57 * platform/mediastream/gstreamer/GStreamerCapturer.cpp: Ditto. 58 (WebCore::initializeDebugCategory): 59 (WebCore::GStreamerCapturer::GStreamerCapturer): 60 (WebCore::initializeGStreamerAndDebug): Deleted. 61 * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp: Ditto. 62 (WebCore::initializeDebugCategory): 63 (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource): 64 (WebCore::m_capturer): 65 (WebCore::initializeGStreamerDebug): Deleted. 66 * platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp: Ditto. 67 (WebCore::MockRealtimeAudioSourceGStreamer::MockRealtimeAudioSourceGStreamer): 68 * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp: Ditto. 69 (WebCore::MockRealtimeVideoSourceGStreamer::MockRealtimeVideoSourceGStreamer): 70 * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp: Ditto. 71 (WebCore::GStreamerVideoDecoderFactory::GStreamerVideoDecoderFactory): 72 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: Ditto. 73 (WebCore::GStreamerVideoEncoderFactory::GStreamerVideoEncoderFactory): 74 1 75 2021-01-12 Zalan Bujtas <zalan@apple.com> 2 76 -
trunk/Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp
r271197 r271396 45 45 static void initializeDebugCategory() 46 46 { 47 ensureGStreamerInitialized(); 48 registerWebKitGStreamerElements(); 49 47 50 static std::once_flag onceFlag; 48 51 std::call_once(onceFlag, [] { -
trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
r269104 r271396 44 44 static void initializeDebugCategory() 45 45 { 46 ensureGStreamerInitialized(); 46 47 static std::once_flag onceFlag; 47 48 std::call_once(onceFlag, [] { -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
r271290 r271396 28 28 #include "GstAllocatorFastMalloc.h" 29 29 #include "IntSize.h" 30 #include "RuntimeApplicationChecks.h" 30 31 #include "SharedBuffer.h" 31 32 #include "WebKitAudioSinkGStreamer.h" … … 215 216 } 216 217 218 static Optional<Vector<String>> s_UIProcessCommandLineOptions; 219 void setGStreamerOptionsFromUIProcess(Vector<String>&& options) 220 { 221 s_UIProcessCommandLineOptions = WTFMove(options); 222 } 223 217 224 Vector<String> extractGStreamerOptionsFromCommandLine() 218 225 { … … 231 238 } 232 239 233 bool initializeGStreamer(Optional<Vector<String>>&& options) 234 { 240 bool ensureGStreamerInitialized() 241 { 242 RELEASE_ASSERT(isInWebProcess()); 235 243 static std::once_flag onceFlag; 236 244 static bool isGStreamerInitialized; 237 std::call_once(onceFlag, [ options = WTFMove(options)] {245 std::call_once(onceFlag, [] { 238 246 isGStreamerInitialized = false; 239 247 … … 246 254 247 255 #if ENABLE(VIDEO) || ENABLE(WEB_AUDIO) 248 Vector<String> parameters = options.valueOr(extractGStreamerOptionsFromCommandLine()); 256 Vector<String> parameters = s_UIProcessCommandLineOptions.valueOr(extractGStreamerOptionsFromCommandLine()); 257 s_UIProcessCommandLineOptions.reset(); 249 258 char** argv = g_new0(char*, parameters.size() + 2); 250 259 int argc = parameters.size() + 1; … … 293 302 #endif 294 303 295 bool initializeGStreamerAndRegisterWebKitElements() 296 { 297 if (!initializeGStreamer()) 298 return false; 299 304 void registerWebKitGStreamerElements() 305 { 300 306 static std::once_flag onceFlag; 301 307 std::call_once(onceFlag, [] { … … 344 350 } 345 351 }); 346 return true;347 352 } 348 353 -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
r271197 r271396 70 70 bool areEncryptedCaps(const GstCaps*); 71 71 Vector<String> extractGStreamerOptionsFromCommandLine(); 72 bool initializeGStreamer(Optional<Vector<String>>&& = WTF::nullopt); 73 bool initializeGStreamerAndRegisterWebKitElements(); 72 void setGStreamerOptionsFromUIProcess(Vector<String>&&); 73 bool ensureGStreamerInitialized(); 74 void registerWebKitGStreamerElements(); 74 75 unsigned getGstPlayFlag(const char* nick); 75 76 uint64_t toGstUnsigned64Time(const MediaTime&); -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
r271353 r271396 184 184 : m_isMediaSource(isMediaSource) 185 185 { 186 if (!isInWebProcess()) 186 if (isInWebProcess()) 187 ensureGStreamerInitialized(); 188 else { 189 // This is still needed, mostly because of the webkit_web_view_can_show_mime_type() public API (so 190 // running from UIProcess). 187 191 gst_init(nullptr, nullptr); 192 } 193 188 194 GST_DEBUG_CATEGORY_INIT(webkit_media_gst_registry_scanner_debug, "webkitregistryscanner", 0, "WebKit GStreamer registry scanner"); 189 195 -
trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
r270845 r271396 29 29 #include "MediaSampleGStreamer.h" 30 30 #include "NotImplemented.h" 31 #include "RuntimeApplicationChecks.h" 31 32 #include <gst/app/gstappsink.h> 32 33 #include <wtf/Lock.h> … … 101 102 // Ideally this decoder should operate only from the WebProcess (or from the GPUProcess) which 102 103 // should be the only process where GStreamer has been runtime initialized. 103 if (! gst_is_initialized())104 if (!isInWebProcess()) 104 105 return false; 105 106 107 if (!type.startsWith("video/"_s)) 108 return false; 109 106 110 return GStreamerRegistryScanner::singleton().isContainerTypeSupported(GStreamerRegistryScanner::Configuration::Decoding, type); 107 111 } … … 109 113 bool ImageDecoderGStreamer::canDecodeType(const String& mimeType) 110 114 { 115 if (mimeType.isEmpty()) 116 return false; 117 118 if (!mimeType.startsWith("video/"_s)) 119 return false; 120 111 121 // Ideally this decoder should operate only from the WebProcess (or from the GPUProcess) which 112 122 // should be the only process where GStreamer has been runtime initialized. 113 if (!gst_is_initialized()) 114 return false; 115 116 if (mimeType.isEmpty()) 123 if (!isInWebProcess()) 117 124 return false; 118 125 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r271355 r271396 304 304 bool MediaPlayerPrivateGStreamer::isAvailable() 305 305 { 306 if (!initializeGStreamerAndRegisterWebKitElements()) 307 return false; 308 309 // FIXME: This has not been updated for the playbin3 switch. 310 GRefPtr<GstElementFactory> factory = adoptGRef(gst_element_factory_find("playbin")); 311 if (!factory) 312 GST_WARNING("Couldn't find a factory for the playbin element. Media playback will be disabled."); 313 return factory; 306 return true; 314 307 } 315 308 … … 342 335 { 343 336 initializeDebugCategory(); 344 345 if (isAvailable()) 346 registrar(makeUnique<MediaPlayerFactoryGStreamer>()); 337 registrar(makeUnique<MediaPlayerFactoryGStreamer>()); 347 338 } 348 339 349 340 void MediaPlayerPrivateGStreamer::loadFull(const String& urlString, const String& pipelineName) 350 341 { 351 if (m_player->contentMIMEType() == "image/gif") {352 loadingFailed(MediaPlayer::NetworkState::FormatError, MediaPlayer::ReadyState::HaveNothing, true);353 return;354 }355 356 342 URL url(URL(), urlString); 357 343 if (url.protocolIsAbout()) { … … 359 345 return; 360 346 } 347 348 if (!ensureGStreamerInitialized()) { 349 loadingFailed(MediaPlayer::NetworkState::FormatError, MediaPlayer::ReadyState::HaveNothing, true); 350 return; 351 } 352 353 registerWebKitGStreamerElements(); 361 354 362 355 if (!m_pipeline) … … 1611 1604 void MediaPlayerPrivateGStreamer::setPipeline(GstElement* pipeline) 1612 1605 { 1606 if (!pipeline) { 1607 GST_WARNING("Playbin not found, make sure to install gst-plugins-base"); 1608 loadingFailed(MediaPlayer::NetworkState::FormatError, MediaPlayer::ReadyState::HaveNothing, true); 1609 return; 1610 } 1611 1613 1612 m_pipeline = pipeline; 1614 1613 … … 1761 1760 void MediaPlayerPrivateGStreamer::volumeChangedCallback(MediaPlayerPrivateGStreamer* player) 1762 1761 { 1762 if (player->isPlayerShuttingDown()) 1763 return; 1764 1763 1765 // This is called when m_volumeElement receives the notify::volume signal. 1764 1766 GST_DEBUG_OBJECT(player->pipeline(), "Volume changed to: %f", player->volume()); … … 2636 2638 #endif 2637 2639 2638 #if !ENABLE(MEDIA_STREAM) 2639 if (parameters.isMediaStream) 2640 if (parameters.isMediaStream) { 2641 #if ENABLE(MEDIA_STREAM) 2642 return MediaPlayer::SupportsType::IsSupported; 2643 #else 2640 2644 return result; 2641 2645 #endif 2642 2646 } 2647 2648 GST_DEBUG("Checking mime-type \"%s\"", parameters.type.raw().utf8().data()); 2643 2649 if (parameters.type.isEmpty()) 2644 2650 return result; 2645 2651 2646 GST_DEBUG("Checking mime-type \"%s\"", parameters.type.raw().utf8().data()); 2652 // This player doesn't support pictures rendering. 2653 if (parameters.type.raw().startsWith("image"_s)) 2654 return result; 2655 2647 2656 auto& gstRegistryScanner = GStreamerRegistryScanner::singleton(); 2648 2657 result = gstRegistryScanner.isContentTypeSupported(GStreamerRegistryScanner::Configuration::Decoding, parameters.type, parameters.contentTypesRequiringHardwareSupport); -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp
r269101 r271396 100 100 Ref<MediaSampleGStreamer> MediaSampleGStreamer::createImageSample(Vector<uint8_t>&& bgraData, unsigned width, unsigned height, double frameRate) 101 101 { 102 ensureGStreamerInitialized(); 103 102 104 size_t size = bgraData.sizeInBytes(); 103 105 auto* data = bgraData.releaseBuffer().leakPtr(); -
trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
r271353 r271396 99 99 void MediaPlayerPrivateGStreamerMSE::registerMediaEngine(MediaEngineRegistrar registrar) 100 100 { 101 initializeGStreamerAndRegisterWebKitElements();102 101 GST_DEBUG_CATEGORY_INIT(webkit_mse_debug, "webkitmse", 0, "WebKit MSE media player"); 103 if (isAvailable()) 104 registrar(makeUnique<MediaPlayerFactoryGStreamerMSE>()); 102 registrar(makeUnique<MediaPlayerFactoryGStreamerMSE>()); 105 103 } 106 104 -
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
r269849 r271396 45 45 #define GST_CAT_DEFAULT webkit_audio_capture_source_debug 46 46 47 static void initializeGStreamerDebug() 48 { 47 static void initializeDebugCategory() 48 { 49 ensureGStreamerInitialized(); 50 49 51 static std::once_flag debugRegisteredFlag; 50 52 std::call_once(debugRegisteredFlag, [] { … … 98 100 , m_capturer(makeUnique<GStreamerAudioCapturer>(device)) 99 101 { 100 initialize GStreamerDebug();102 initializeDebugCategory(); 101 103 } 102 104 … … 105 107 , m_capturer(makeUnique<GStreamerAudioCapturer>()) 106 108 { 107 initialize GStreamerDebug();109 initializeDebugCategory(); 108 110 } 109 111 -
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp
r241587 r271396 80 80 const Vector<CaptureDevice>& GStreamerCaptureDeviceManager::captureDevices() 81 81 { 82 initializeGStreamer();82 ensureGStreamerInitialized(); 83 83 if (m_devices.isEmpty()) 84 84 refreshCaptureDevices(); -
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp
r267934 r271396 35 35 namespace WebCore { 36 36 37 static void initialize GStreamerAndDebug()37 static void initializeDebugCategory() 38 38 { 39 initializeGStreamer();39 ensureGStreamerInitialized(); 40 40 41 41 static std::once_flag debugRegisteredFlag; … … 50 50 , m_sourceFactory(nullptr) 51 51 { 52 initialize GStreamerAndDebug();52 initializeDebugCategory(); 53 53 } 54 54 … … 58 58 , m_sourceFactory(sourceFactory) 59 59 { 60 initialize GStreamerAndDebug();60 initializeDebugCategory(); 61 61 } 62 62 -
trunk/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp
r267934 r271396 36 36 #define GST_CAT_DEFAULT webkit_video_capture_source_debug 37 37 38 static void initializeGStreamerDebug() 39 { 38 static void initializeDebugCategory() 39 { 40 ensureGStreamerInitialized(); 41 40 42 static std::once_flag debugRegisteredFlag; 41 43 std::call_once(debugRegisteredFlag, [] { … … 122 124 , m_capturer(makeUnique<GStreamerVideoCapturer>(source_factory)) 123 125 { 124 initialize GStreamerDebug();126 initializeDebugCategory(); 125 127 } 126 128 … … 129 131 , m_capturer(makeUnique<GStreamerVideoCapturer>(device)) 130 132 { 131 initialize GStreamerDebug();133 initializeDebugCategory(); 132 134 } 133 135 -
trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp
r269849 r271396 66 66 : MockRealtimeAudioSource(WTFMove(deviceID), WTFMove(name), WTFMove(hashSalt)) 67 67 { 68 ensureGStreamerInitialized(); 68 69 } 69 70 -
trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp
r269101 r271396 57 57 : MockRealtimeVideoSource(WTFMove(deviceID), WTFMove(name), WTFMove(hashSalt)) 58 58 { 59 ensureGStreamerInitialized(); 59 60 } 60 61 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp
r270190 r271396 414 414 GStreamerVideoDecoderFactory::GStreamerVideoDecoderFactory() 415 415 { 416 ensureGStreamerInitialized(); 417 416 418 static std::once_flag debugRegisteredFlag; 417 418 419 std::call_once(debugRegisteredFlag, [] { 419 420 GST_DEBUG_CATEGORY_INIT(webkit_webrtcdec_debug, "webkitlibwebrtcvideodecoder", 0, "WebKit WebRTC video decoder"); -
trunk/Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp
r270190 r271396 459 459 GStreamerVideoEncoderFactory::GStreamerVideoEncoderFactory() 460 460 { 461 ensureGStreamerInitialized(); 462 461 463 static std::once_flag debugRegisteredFlag; 462 463 464 std::call_once(debugRegisteredFlag, [] { 464 465 GST_DEBUG_CATEGORY_INIT(webkit_webrtcenc_debug, "webkitlibwebrtcvideoencoder", 0, "WebKit WebRTC video encoder"); -
trunk/Source/WebKit/ChangeLog
r271391 r271396 1 2021-01-12 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] Lazy initialization support 4 https://bugs.webkit.org/show_bug.cgi?id=209332 5 6 Reviewed by Carlos Garcia Campos. 7 8 Introduce a GTK/WPE UserMediaCaptureManager that relays permission requests to the 9 RealtimeMediaSourceCenter running in the WebProcess. We might move this to the GPUProcess at 10 some point but for the time being we only want to avoid initializing GStreamer from the 11 UIProcess. 12 13 * PlatformGTK.cmake: 14 * PlatformWPE.cmake: 15 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: 16 * UIProcess/glib/UserMediaPermissionRequestManagerProxyGLib.cpp: Added. 17 (WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionRequest): 18 * WebProcess/glib/UserMediaCaptureManager.cpp: Added. 19 (WebKit::UserMediaCaptureManager::UserMediaCaptureManager): 20 (WebKit::UserMediaCaptureManager::~UserMediaCaptureManager): 21 (WebKit::UserMediaCaptureManager::validateUserMediaRequestConstraints): 22 * WebProcess/glib/UserMediaCaptureManager.h: Added. 23 (WebKit::UserMediaCaptureManager::supplementName): 24 * WebProcess/glib/UserMediaCaptureManager.messages.in: Added. 25 * WebProcess/glib/WebProcessGLib.cpp: 26 (WebKit::WebProcess::platformInitializeWebProcess): 27 1 28 2021-01-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 29 -
trunk/Source/WebKit/PlatformGTK.cmake
r270178 r271396 429 429 "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/gtk/DOM" 430 430 "${WEBKIT_DIR}/WebProcess/Inspector/gtk" 431 "${WEBKIT_DIR}/WebProcess/glib" 431 432 "${WEBKIT_DIR}/WebProcess/gtk" 432 433 "${WEBKIT_DIR}/WebProcess/soup" … … 500 501 "${THIRDPARTY_DIR}/libwebrtc/Source/" 501 502 "${THIRDPARTY_DIR}/libwebrtc/Source/webrtc" 503 ) 504 endif () 505 506 if (ENABLE_MEDIA_STREAM) 507 list(APPEND WebKit_SOURCES 508 UIProcess/glib/UserMediaPermissionRequestManagerProxyGLib.cpp 509 510 WebProcess/glib/UserMediaCaptureManager.cpp 511 ) 512 list(APPEND WebKit_MESSAGES_IN_FILES 513 WebProcess/glib/UserMediaCaptureManager 502 514 ) 503 515 endif () -
trunk/Source/WebKit/PlatformWPE.cmake
r270880 r271396 266 266 "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe" 267 267 "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/wpe/DOM" 268 "${WEBKIT_DIR}/WebProcess/glib" 268 269 "${WEBKIT_DIR}/WebProcess/soup" 269 270 "${WEBKIT_DIR}/WebProcess/WebCoreSupport/soup" … … 320 321 list(APPEND WebKit_LIBRARIES 321 322 ${GSTREAMER_LIBRARIES} 323 ) 324 endif () 325 326 if (ENABLE_MEDIA_STREAM) 327 list(APPEND WebKit_SOURCES 328 UIProcess/glib/UserMediaPermissionRequestManagerProxyGLib.cpp 329 330 WebProcess/glib/UserMediaCaptureManager.cpp 331 ) 332 list(APPEND WebKit_MESSAGES_IN_FILES 333 WebProcess/glib/UserMediaCaptureManager 322 334 ) 323 335 endif () -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
r271049 r271396 505 505 syncWithWebCorePrefs(); 506 506 507 RealtimeMediaSourceCenter::singleton().validateRequestConstraints(WTFMove(validHandler), WTFMove(invalidHandler), m_currentUserMediaRequest->userRequest(), WTFMove(deviceIDHashSalt));507 platformValidateUserMediaRequestConstraints(WTFMove(validHandler), WTFMove(invalidHandler), WTFMove(deviceIDHashSalt)); 508 508 }); 509 509 } 510 #endif 511 512 #if ENABLE(MEDIA_STREAM) 510 511 #if ENABLE(MEDIA_STREAM) && !USE(GLIB) 512 void UserMediaPermissionRequestManagerProxy::platformValidateUserMediaRequestConstraints(WebCore::RealtimeMediaSourceCenter::ValidConstraintsHandler&& validHandler, RealtimeMediaSourceCenter::InvalidConstraintsHandler&& invalidHandler, String&& deviceIDHashSalt) 513 { 514 RealtimeMediaSourceCenter::singleton().validateRequestConstraints(WTFMove(validHandler), WTFMove(invalidHandler), m_currentUserMediaRequest->userRequest(), WTFMove(deviceIDHashSalt)); 515 } 516 #endif 517 513 518 void UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest(const String& invalidConstraint) 514 519 { -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
r271049 r271396 23 23 #include "UserMediaPermissionRequestProxy.h" 24 24 #include <WebCore/MediaProducer.h> 25 #include <WebCore/RealtimeMediaSourceCenter.h> 25 26 #include <WebCore/RealtimeMediaSourceFactory.h> 26 27 #include <WebCore/SecurityOrigin.h> … … 130 131 #endif 131 132 133 #if ENABLE(MEDIA_STREAM) 134 void platformValidateUserMediaRequestConstraints(WebCore::RealtimeMediaSourceCenter::ValidConstraintsHandler&& validHandler, WebCore::RealtimeMediaSourceCenter::InvalidConstraintsHandler&& invalidHandler, String&& deviceIDHashSalt); 135 #endif 136 132 137 void watchdogTimerFired(); 133 138 -
trunk/Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
r260065 r271396 51 51 #endif 52 52 53 #if ENABLE(MEDIA_STREAM) 54 #include "UserMediaCaptureManager.h" 55 #endif 56 53 57 namespace WebKit { 54 58 … … 62 66 void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& parameters) 63 67 { 68 #if ENABLE(MEDIA_STREAM) 69 addSupplement<UserMediaCaptureManager>(); 70 #endif 71 64 72 #if PLATFORM(WPE) 65 73 if (!parameters.isServiceWorkerProcess) { … … 92 100 93 101 #if USE(GSTREAMER) 94 WebCore:: initializeGStreamer(WTFMove(parameters.gstreamerOptions));102 WebCore::setGStreamerOptionsFromUIProcess(WTFMove(parameters.gstreamerOptions)); 95 103 #endif 96 104
Note: See TracChangeset
for help on using the changeset viewer.