Changeset 246537 in webkit
- Timestamp:
- Jun 18, 2019 7:47:41 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246536 r246537 1 2019-06-18 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] Identify elements with monotonically increasing counters 4 https://bugs.webkit.org/show_bug.cgi?id=198916 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Those ids tend to be shorter, easier to read for humans and for 9 diff tools :) Underscores were also replaced by dashes, for 10 consistency with the usual GStreamer element naming untold 11 conventions. 12 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 14 (WebCore::MediaPlayerPrivateGStreamer::load): 15 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 16 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: 17 (WebCore::GStreamerVideoEncoder::makeElement): 18 (WebCore::GStreamerVideoEncoder::InitEncode): 19 1 20 2019-06-18 Zan Dobersek <zdobersek@igalia.com> 2 21 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r246490 r246537 44 44 #include <limits> 45 45 #include <wtf/FileSystem.h> 46 #include <wtf/HexNumber.h>47 46 #include <wtf/MediaTime.h> 48 47 #include <wtf/NeverDestroyed.h> … … 328 327 #if GST_CHECK_VERSION(1, 10, 0) 329 328 m_streamPrivate = &stream; 330 auto pipelineName = makeString("mediastream_", 331 (stream.hasCaptureVideoSource() || stream.hasCaptureAudioSource()) ? "Local" : "Remote", 332 "_0x", hex(reinterpret_cast<uintptr_t>(this), Lowercase)); 329 static Atomic<uint32_t> pipelineId; 330 auto pipelineName = makeString("mediastream-", 331 (stream.hasCaptureVideoSource() || stream.hasCaptureAudioSource()) ? "local" : "remote", 332 "-", pipelineId.exchangeAdd(1)); 333 333 334 334 loadFull(String("mediastream://") + stream.id(), pipelineName); … … 2387 2387 // gst_element_factory_make() returns a floating reference so 2388 2388 // we should not adopt. 2389 static Atomic<uint32_t> pipelineId; 2389 2390 setPipeline(gst_element_factory_make(playbinName, 2390 (pipelineName.isEmpty() ? makeString(" play_0x", hex(reinterpret_cast<uintptr_t>(this), Lowercase)) : pipelineName).utf8().data()));2391 (pipelineName.isEmpty() ? makeString("media-player-", pipelineId.exchangeAdd(1)) : pipelineName).utf8().data())); 2391 2392 setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get())); 2392 2393 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp
r243196 r246537 42 42 #include <gst/pbutils/encoding-profile.h> 43 43 #include <gst/video/video.h> 44 #include <wtf/Atomics.h> 44 45 #include <wtf/HashMap.h> 45 #include <wtf/HexNumber.h>46 46 #include <wtf/Lock.h> 47 47 #include <wtf/StdMap.h> 48 #include <wtf/text/StringConcatenateNumbers.h> 48 49 49 50 // Required for unified builds … … 96 97 GstElement* makeElement(const gchar* factoryName) 97 98 { 98 auto name = makeString(Name(), "_enc_", factoryName, "_0x", hex(reinterpret_cast<uintptr_t>(this))); 99 static Atomic<uint32_t> elementId; 100 auto name = makeString(Name(), "-enc-", factoryName, "-", elementId.exchangeAdd(1)); 99 101 auto elem = gst_element_factory_make(factoryName, name.utf8().data()); 100 102 … … 137 139 g_object_set(m_sink, "sync", FALSE, nullptr); 138 140 139 auto name = makeString(Name(), "_enc_rawcapsfilter_0x", hex(reinterpret_cast<uintptr_t>(this))); 140 m_capsFilter = gst_element_factory_make("capsfilter", name.utf8().data()); 141 m_capsFilter = makeElement("capsfilter"); 141 142 if (m_restrictionCaps) 142 143 g_object_set(m_capsFilter, "caps", m_restrictionCaps.get(), nullptr);
Note: See TracChangeset
for help on using the changeset viewer.