[GStreamer] Adopt nullptr
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 10:32:57 +0000 (10:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2017 10:32:57 +0000 (10:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123438

Patch by Vanessa Chipirrás Navalón <vchipirras@igalia.com> on 2017-03-06
Reviewed by Xabier Rodriguez-Calvar.

To adapt the code to the C++11 standard, all NULL or 0 pointers have been changed to nullptr.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::handleNewDeinterleavePad):
(WebCore::AudioFileReader::plugDeinterleave):
(WebCore::AudioFileReader::decodeAudioForBusCreation):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::configureAudioBin):
(WebCore::AudioSourceProviderGStreamer::setClient):
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
(webKitWebAudioSrcLoop):
(webKitWebAudioSrcChangeState):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::setEnabled):
* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
(WebCore::initializeGStreamerAndRegisterWebKitElements):
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::newTextSample):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
Removed the unused second argument on processTableOfContentsEntry function.
(WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
Removed the unused second argument on this function.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Removed the unused second argument on processTableOfContentsEntry function.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
(WebCore::MediaPlayerPrivateGStreamerBase::muted):
(WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
(WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
(WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::registerMediaEngine):
* platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
(webkit_text_combiner_init):
(webkitTextCombinerPadEvent):
(webkitTextCombinerRequestNewPad):
(webkitTextCombinerNew):
* platform/graphics/gstreamer/TextSinkGStreamer.cpp:
(webkitTextSinkNew):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkit_video_sink_init):
(webkitVideoSinkProposeAllocation):
(webkitVideoSinkNew):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::setSelected):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcSetProperty):
(webKitWebSrcStop):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetProtocols):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(ResourceHandleStreamingClient::didFail):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
* platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcGetProtocols):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213445 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp
Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.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/MediaPlayerPrivateGStreamerOwr.cpp
Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/TextSinkGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp

index 9f2aade..716ad2b 100644 (file)
@@ -1,3 +1,91 @@
+2017-03-06  Vanessa Chipirrás Navalón  <vchipirras@igalia.com>
+
+        [GStreamer] Adopt nullptr
+        https://bugs.webkit.org/show_bug.cgi?id=123438
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        To adapt the code to the C++11 standard, all NULL or 0 pointers have been changed to nullptr.
+
+        * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
+        (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
+        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
+        (WebCore::AudioFileReader::handleNewDeinterleavePad):
+        (WebCore::AudioFileReader::plugDeinterleave):
+        (WebCore::AudioFileReader::decodeAudioForBusCreation):
+        * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
+        (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
+        (WebCore::AudioSourceProviderGStreamer::configureAudioBin):
+        (WebCore::AudioSourceProviderGStreamer::setClient):
+        (WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
+        * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
+        (webkit_web_audio_src_init):
+        (webKitWebAudioSrcLoop):
+        (webKitWebAudioSrcChangeState):
+        * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
+        (WebCore::AudioTrackPrivateGStreamer::setEnabled):
+        * platform/graphics/gstreamer/GStreamerUtilities.cpp:
+        (WebCore::initializeGStreamer):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
+        (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
+        (WebCore::initializeGStreamerAndRegisterWebKitElements):
+        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
+        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
+        (WebCore::MediaPlayerPrivateGStreamer::newTextSample):
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
+        Removed the unused second argument on processTableOfContentsEntry function.
+        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
+        Removed the unused second argument on this function.
+        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
+        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
+        (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
+        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
+        Removed the unused second argument on processTableOfContentsEntry function.
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
+        (WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
+        (WebCore::MediaPlayerPrivateGStreamerBase::muted):
+        (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
+        (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
+        (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
+        (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerOwr::registerMediaEngine):
+        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
+        (webkit_text_combiner_init):
+        (webkitTextCombinerPadEvent):
+        (webkitTextCombinerRequestNewPad):
+        (webkitTextCombinerNew):
+        * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
+        (webkitTextSinkNew):
+        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
+        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
+        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
+        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+        (webkit_video_sink_init):
+        (webkitVideoSinkProposeAllocation):
+        (webkitVideoSinkNew):
+        * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
+        (WebCore::VideoTrackPrivateGStreamer::setSelected):
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webkit_web_src_init):
+        (webKitWebSrcDispose):
+        (webKitWebSrcSetProperty):
+        (webKitWebSrcStop):
+        (webKitWebSrcChangeState):
+        (webKitWebSrcQueryWithParent):
+        (webKitWebSrcGetProtocols):
+        (StreamingClient::handleResponseReceived):
+        (StreamingClient::handleDataReceived):
+        (ResourceHandleStreamingClient::didFail):
+        (ResourceHandleStreamingClient::wasBlocked):
+        (ResourceHandleStreamingClient::cannotShowURL):
+        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
+        (webKitMediaSrcGetProtocols):
+
 2017-03-06  Andreas Kling  <akling@apple.com>
 
         [iOS] Report domains crashing under memory pressure via enhanced privacy logging.
index 55f84d4..758389c 100644 (file)
@@ -92,9 +92,9 @@ AudioDestinationGStreamer::AudioDestinationGStreamer(AudioIOCallback& callback,
                                                                             "rate", sampleRate,
                                                                             "bus", m_renderBus.get(),
                                                                             "provider", &m_callback,
-                                                                            "frames", framesToPull, NULL));
+                                                                            "frames", framesToPull, nullptr));
 
-    GRefPtr<GstElement> audioSink = gst_element_factory_make("autoaudiosink", 0);
+    GRefPtr<GstElement> audioSink = gst_element_factory_make("autoaudiosink", nullptr);
     m_audioSinkAvailable = audioSink;
     if (!audioSink) {
         LOG_ERROR("Failed to create GStreamer autoaudiosink element");
@@ -114,9 +114,9 @@ AudioDestinationGStreamer::AudioDestinationGStreamer(AudioIOCallback& callback,
         return;
     }
 
-    GstElement* audioConvert = gst_element_factory_make("audioconvert", 0);
-    GstElement* audioResample = gst_element_factory_make("audioresample", 0);
-    gst_bin_add_many(GST_BIN(m_pipeline), webkitAudioSrc, audioConvert, audioResample, audioSink.get(), NULL);
+    GstElement* audioConvert = gst_element_factory_make("audioconvert", nullptr);
+    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
+    gst_bin_add_many(GST_BIN(m_pipeline), webkitAudioSrc, audioConvert, audioResample, audioSink.get(), nullptr);
 
     // Link src pads from webkitAudioSrc to audioConvert ! audioResample ! autoaudiosink.
     gst_element_link_pads_full(webkitAudioSrc, "src", audioConvert, "sink", GST_PAD_LINK_CHECK_NOTHING);
index 9129498..6cd8bd7 100644 (file)
@@ -213,8 +213,8 @@ void AudioFileReader::handleNewDeinterleavePad(GstPad* pad)
     // in an appsink so we can pull the data from each
     // channel. Pipeline looks like:
     // ... deinterleave ! queue ! appsink.
-    GstElement* queue = gst_element_factory_make("queue", 0);
-    GstElement* sink = gst_element_factory_make("appsink", 0);
+    GstElement* queue = gst_element_factory_make("queue", nullptr);
+    GstElement* sink = gst_element_factory_make("appsink", nullptr);
 
     static GstAppSinkCallbacks callbacks = {
         nullptr, // eos
@@ -225,9 +225,9 @@ void AudioFileReader::handleNewDeinterleavePad(GstPad* pad)
         },
         { nullptr }
     };
-    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, 0);
+    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, nullptr);
 
-    g_object_set(sink, "sync", FALSE, NULL);
+    g_object_set(sink, "sync", FALSE, nullptr);
 
     gst_bin_add_many(GST_BIN(m_pipeline.get()), queue, sink, nullptr);
 
@@ -256,12 +256,12 @@ void AudioFileReader::plugDeinterleave(GstPad* pad)
     // A decodebin pad was added, plug in a deinterleave element to
     // separate each planar channel. Sub pipeline looks like
     // ... decodebin2 ! audioconvert ! audioresample ! capsfilter ! deinterleave.
-    GstElement* audioConvert  = gst_element_factory_make("audioconvert", 0);
-    GstElement* audioResample = gst_element_factory_make("audioresample", 0);
-    GstElement* capsFilter = gst_element_factory_make("capsfilter", 0);
+    GstElement* audioConvert  = gst_element_factory_make("audioconvert", nullptr);
+    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
+    GstElement* capsFilter = gst_element_factory_make("capsfilter", nullptr);
     m_deInterleave = gst_element_factory_make("deinterleave", "deinterleave");
 
-    g_object_set(m_deInterleave.get(), "keep-positions", TRUE, NULL);
+    g_object_set(m_deInterleave.get(), "keep-positions", TRUE, nullptr);
     g_signal_connect_swapped(m_deInterleave.get(), "pad-added", G_CALLBACK(deinterleavePadAddedCallback), this);
     g_signal_connect_swapped(m_deInterleave.get(), "no-more-pads", G_CALLBACK(deinterleaveReadyCallback), this);
 
@@ -316,18 +316,18 @@ void AudioFileReader::decodeAudioForBusCreation()
     GstElement* source;
     if (m_data) {
         ASSERT(m_dataSize);
-        source = gst_element_factory_make("giostreamsrc", 0);
-        GRefPtr<GInputStream> memoryStream = adoptGRef(g_memory_input_stream_new_from_data(m_data, m_dataSize, 0));
-        g_object_set(source, "stream", memoryStream.get(), NULL);
+        source = gst_element_factory_make("giostreamsrc", nullptr);
+        GRefPtr<GInputStream> memoryStream = adoptGRef(g_memory_input_stream_new_from_data(m_data, m_dataSize, nullptr));
+        g_object_set(source, "stream", memoryStream.get(), nullptr);
     } else {
-        source = gst_element_factory_make("filesrc", 0);
-        g_object_set(source, "location", m_filePath, NULL);
+        source = gst_element_factory_make("filesrc", nullptr);
+        g_object_set(source, "location", m_filePath, nullptr);
     }
 
     m_decodebin = gst_element_factory_make("decodebin", "decodebin");
     g_signal_connect_swapped(m_decodebin.get(), "pad-added", G_CALLBACK(decodebinPadAddedCallback), this);
 
-    gst_bin_add_many(GST_BIN(m_pipeline.get()), source, m_decodebin.get(), NULL);
+    gst_bin_add_many(GST_BIN(m_pipeline.get()), source, m_decodebin.get(), nullptr);
     gst_element_link_pads_full(source, "src", m_decodebin.get(), "sink", GST_PAD_LINK_CHECK_NOTHING);
 
     // Catch errors here immediately, there might not be an error message if we're unlucky.
index 19f82fb..4d7f415 100644 (file)
@@ -83,7 +83,7 @@ static void copyGStreamerBuffersToAudioChannel(GstAdapter* adapter, AudioBus* bu
 }
 
 AudioSourceProviderGStreamer::AudioSourceProviderGStreamer()
-    : m_client(0)
+    : m_client(nullptr)
     , m_deinterleaveSourcePads(0)
     , m_deinterleavePadAddedHandlerId(0)
     , m_deinterleaveNoMorePadsHandlerId(0)
@@ -113,13 +113,13 @@ void AudioSourceProviderGStreamer::configureAudioBin(GstElement* audioBin, GstEl
     m_audioSinkBin = audioBin;
 
     GstElement* audioTee = gst_element_factory_make("tee", "audioTee");
-    GstElement* audioQueue = gst_element_factory_make("queue", 0);
-    GstElement* audioConvert = gst_element_factory_make("audioconvert", 0);
-    GstElement* audioConvert2 = gst_element_factory_make("audioconvert", 0);
-    GstElement* audioResample = gst_element_factory_make("audioresample", 0);
-    GstElement* audioResample2 = gst_element_factory_make("audioresample", 0);
+    GstElement* audioQueue = gst_element_factory_make("queue", nullptr);
+    GstElement* audioConvert = gst_element_factory_make("audioconvert", nullptr);
+    GstElement* audioConvert2 = gst_element_factory_make("audioconvert", nullptr);
+    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
+    GstElement* audioResample2 = gst_element_factory_make("audioresample", nullptr);
     GstElement* volumeElement = gst_element_factory_make("volume", "volume");
-    GstElement* audioSink = gst_element_factory_make("autoaudiosink", 0);
+    GstElement* audioSink = gst_element_factory_make("autoaudiosink", nullptr);
 
     gst_bin_add_many(GST_BIN(m_audioSinkBin.get()), audioTee, audioQueue, audioConvert, audioResample, volumeElement, audioConvert2, audioResample2, audioSink, nullptr);
 
@@ -211,10 +211,10 @@ void AudioSourceProviderGStreamer::setClient(AudioSourceProviderClient* client)
     // The audioconvert and audioresample elements are needed to
     // ensure deinterleave and the sinks downstream receive buffers in
     // the format specified by the capsfilter.
-    GstElement* audioQueue = gst_element_factory_make("queue", 0);
-    GstElement* audioConvert  = gst_element_factory_make("audioconvert", 0);
-    GstElement* audioResample = gst_element_factory_make("audioresample", 0);
-    GstElement* capsFilter = gst_element_factory_make("capsfilter", 0);
+    GstElement* audioQueue = gst_element_factory_make("queue", nullptr);
+    GstElement* audioConvert  = gst_element_factory_make("audioconvert", nullptr);
+    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
+    GstElement* capsFilter = gst_element_factory_make("capsfilter", nullptr);
     GstElement* deInterleave = gst_element_factory_make("deinterleave", "deinterleave");
 
     g_object_set(deInterleave, "keep-positions", TRUE, nullptr);
@@ -257,8 +257,8 @@ void AudioSourceProviderGStreamer::handleNewDeinterleavePad(GstPad* pad)
 
     if (m_deinterleaveSourcePads > 2) {
         g_warning("The AudioSourceProvider supports only mono and stereo audio. Silencing out this new channel.");
-        GstElement* queue = gst_element_factory_make("queue", 0);
-        GstElement* sink = gst_element_factory_make("fakesink", 0);
+        GstElement* queue = gst_element_factory_make("queue", nullptr);
+        GstElement* sink = gst_element_factory_make("fakesink", nullptr);
         g_object_set(sink, "async", FALSE, nullptr);
         gst_bin_add_many(GST_BIN(m_audioSinkBin.get()), queue, sink, nullptr);
 
@@ -277,14 +277,14 @@ void AudioSourceProviderGStreamer::handleNewDeinterleavePad(GstPad* pad)
     // in an appsink so we can pull the data from each
     // channel. Pipeline looks like:
     // ... deinterleave ! queue ! appsink.
-    GstElement* queue = gst_element_factory_make("queue", 0);
-    GstElement* sink = gst_element_factory_make("appsink", 0);
+    GstElement* queue = gst_element_factory_make("queue", nullptr);
+    GstElement* sink = gst_element_factory_make("appsink", nullptr);
 
     GstAppSinkCallbacks callbacks;
-    callbacks.eos = 0;
-    callbacks.new_preroll = 0;
+    callbacks.eos = nullptr;
+    callbacks.new_preroll = nullptr;
     callbacks.new_sample = onAppsinkNewBufferCallback;
-    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, 0);
+    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, nullptr);
 
     g_object_set(sink, "async", FALSE, nullptr);
 
index 995ef97..445c979 100644 (file)
@@ -184,14 +184,14 @@ static void webkit_web_audio_src_init(WebKitWebAudioSrc* src)
     src->priv = priv;
     new (priv) WebKitWebAudioSourcePrivate();
 
-    priv->sourcePad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", 0);
+    priv->sourcePad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", nullptr);
     gst_element_add_pad(GST_ELEMENT(src), priv->sourcePad);
 
-    priv->provider = 0;
-    priv->bus = 0;
+    priv->provider = nullptr;
+    priv->bus = nullptr;
 
     g_rec_mutex_init(&priv->mutex);
-    priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, 0));
+    priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, nullptr));
 
     gst_task_set_lock(priv->task.get(), &priv->mutex);
 }
@@ -344,7 +344,7 @@ static void webKitWebAudioSrcLoop(WebKitWebAudioSrc* src)
     }
 
     // FIXME: Add support for local/live audio input.
-    priv->provider->render(0, priv->bus, priv->framesToPull);
+    priv->provider->render(nullptr, priv->bus, priv->framesToPull);
 
     ASSERT(channelBufferList.size() == priv->sources.size());
     bool failed = false;
@@ -378,7 +378,7 @@ static GstStateChangeReturn webKitWebAudioSrcChangeState(GstElement* element, Gs
     case GST_STATE_CHANGE_NULL_TO_READY:
         if (!src->priv->interleave) {
             gst_element_post_message(element, gst_missing_element_message_new(element, "interleave"));
-            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (0), ("no interleave"));
+            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (nullptr), ("no interleave"));
             return GST_STATE_CHANGE_FAILURE;
         }
         src->priv->numberOfSamples = 0;
index 6e1fc46..fc2d674 100644 (file)
@@ -55,7 +55,7 @@ void AudioTrackPrivateGStreamer::setEnabled(bool enabled)
     AudioTrackPrivate::setEnabled(enabled);
 
     if (enabled && m_playbin)
-        g_object_set(m_playbin.get(), "current-audio", m_index, NULL);
+        g_object_set(m_playbin.get(), "current-audio", m_index, nullptr);
 }
 
 } // namespace WebCore
index 9c49fd8..7706752 100644 (file)
@@ -152,7 +152,7 @@ bool initializeGStreamer()
 
     GUniqueOutPtr<GError> error;
     // FIXME: We should probably pass the arguments from the command line.
-    bool gstInitialized = gst_init_check(0, 0, &error.outPtr());
+    bool gstInitialized = gst_init_check(nullptr, nullptr, &error.outPtr());
     ASSERT_WITH_MESSAGE(gstInitialized, "GStreamer initialization failed: %s", error ? error->message : "unknown error occurred");
 
 #if ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
index f765676..55a8d38 100644 (file)
@@ -96,8 +96,8 @@ void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object)
         return;
 
     const char* role = m_player->client().mediaPlayerIsVideo() ? "video" : "music";
-    GstStructure* structure = gst_structure_new("stream-properties", "media.role", G_TYPE_STRING, role, NULL);
-    g_object_set(object, "stream-properties", structure, NULL);
+    GstStructure* structure = gst_structure_new("stream-properties", "media.role", G_TYPE_STRING, role, nullptr);
+    g_object_set(object, "stream-properties", structure, nullptr);
     gst_structure_free(structure);
     GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
     GST_DEBUG("Set media.role as %s at %s", role, elementName.get());
@@ -107,7 +107,7 @@ void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar regis
 {
     if (isAvailable())
         registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateGStreamer>(player); },
-            getSupportedTypes, supportsType, 0, 0, 0, supportsKeySystem);
+            getSupportedTypes, supportsType, nullptr, nullptr, nullptr, supportsKeySystem);
 }
 
 bool initializeGStreamerAndRegisterWebKitElements()
@@ -120,7 +120,7 @@ bool initializeGStreamerAndRegisterWebKitElements()
     GRefPtr<GstElementFactory> srcFactory = adoptGRef(gst_element_factory_find("webkitwebsrc"));
     if (!srcFactory) {
         GST_DEBUG_CATEGORY_INIT(webkit_media_player_debug, "webkitmediaplayer", 0, "WebKit media player");
-        gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
+        gst_element_register(nullptr, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
     }
 
     return true;
@@ -153,10 +153,10 @@ MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer(MediaPlayer* player)
     , m_seeking(false)
     , m_seekIsPending(false)
     , m_seekTime(0)
-    , m_source(0)
+    , m_source(nullptr)
     , m_volumeAndMuteInitialized(false)
     , m_weakPtrFactory(this)
-    , m_mediaLocations(0)
+    , m_mediaLocations(nullptr)
     , m_mediaLocationCurrentIndex(0)
     , m_playbackRatePause(false)
     , m_timeOfOverlappingSeek(-1)
@@ -194,7 +194,7 @@ MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer()
 
     if (m_mediaLocations) {
         gst_structure_free(m_mediaLocations);
-        m_mediaLocations = 0;
+        m_mediaLocations = nullptr;
     }
 
     if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get()))
@@ -796,7 +796,7 @@ void MediaPlayerPrivateGStreamer::newTextSample()
         gst_pad_get_sticky_event(m_textAppSinkPad.get(), GST_EVENT_STREAM_START, 0));
 
     GRefPtr<GstSample> sample;
-    g_signal_emit_by_name(m_textAppSink.get(), "pull-sample", &sample.outPtr(), NULL);
+    g_signal_emit_by_name(m_textAppSink.get(), "pull-sample", &sample.outPtr(), nullptr);
     ASSERT(sample);
 
     if (streamStartEvent) {
@@ -986,7 +986,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
 
         // Construct a filename for the graphviz dot file output.
         GstState newState;
-        gst_message_parse_state_changed(message, &currentState, &newState, 0);
+        gst_message_parse_state_changed(message, &currentState, &newState, nullptr);
         CString dotFileName = String::format("webkit-video.%s_%s", gst_element_state_get_name(currentState), gst_element_state_get_name(newState)).utf8();
         GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
 
@@ -1173,12 +1173,11 @@ void MediaPlayerPrivateGStreamer::processTableOfContents(GstMessage* message)
     ASSERT(toc);
 
     for (GList* i = gst_toc_get_entries(toc.get()); i; i = i->next)
-        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), 0);
+        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data));
 }
 
-void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry, GstTocEntry* parent)
+void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry)
 {
-    UNUSED_PARAM(parent);
     ASSERT(entry);
 
     RefPtr<GenericCueData> cue = GenericCueData::create();
@@ -1192,7 +1191,7 @@ void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry
 
     GstTagList* tags = gst_toc_entry_get_tags(entry);
     if (tags) {
-        gchar* title =  0;
+        gchar* title =  nullptr;
         gst_tag_list_get_string(tags, GST_TAG_TITLE, &title);
         if (title) {
             cue->setContent(title);
@@ -1203,7 +1202,7 @@ void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry
     m_chaptersTrack->addGenericCue(cue.release());
 
     for (GList* i = gst_toc_entry_get_sub_entries(entry); i; i = i->next)
-        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), entry);
+        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data));
 }
 #endif
 
@@ -1219,7 +1218,7 @@ void MediaPlayerPrivateGStreamer::fillTimerFired()
     gint64 start, stop;
     gdouble fillStatus = 100.0;
 
-    gst_query_parse_buffering_range(query, 0, &start, &stop, 0);
+    gst_query_parse_buffering_range(query, nullptr, &start, &stop, nullptr);
     gst_query_unref(query);
 
     if (stop != -1)
@@ -1654,7 +1653,7 @@ bool MediaPlayerPrivateGStreamer::loadNextLocation()
         return false;
 
     const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
-    const gchar* newLocation = 0;
+    const gchar* newLocation = nullptr;
 
     if (!locations) {
         // Fallback on new-location string.
@@ -1665,7 +1664,7 @@ bool MediaPlayerPrivateGStreamer::loadNextLocation()
 
     if (!newLocation) {
         if (m_mediaLocationCurrentIndex < 0) {
-            m_mediaLocations = 0;
+            m_mediaLocations = nullptr;
             return false;
         }
 
@@ -1974,7 +1973,7 @@ void MediaPlayerPrivateGStreamer::setPreload(MediaPlayer::Preload preload)
 
 GstElement* MediaPlayerPrivateGStreamer::createAudioSink()
 {
-    m_autoAudioSink = gst_element_factory_make("autoaudiosink", 0);
+    m_autoAudioSink = gst_element_factory_make("autoaudiosink", nullptr);
     if (!m_autoAudioSink) {
         GST_WARNING("GStreamer's autoaudiosink not found. Please check your gst-plugins-good installation");
         return nullptr;
@@ -2115,7 +2114,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
     // See https://bugzilla.gnome.org/show_bug.cgi?id=735748 for
     // the reason for using >= 1.4.2 instead of >= 1.4.0.
     if (m_preservesPitch && webkitGstCheckVersion(1, 4, 2)) {
-        GstElement* scale = gst_element_factory_make("scaletempo", 0);
+        GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
 
         if (!scale)
             GST_WARNING("Failed to create scaletempo");
index 6c6a39c..953239b 100644 (file)
@@ -161,7 +161,7 @@ private:
 #endif
 #if ENABLE(VIDEO_TRACK)
     void processTableOfContents(GstMessage*);
-    void processTableOfContentsEntry(GstTocEntry*, GstTocEntry* parent);
+    void processTableOfContentsEntry(GstTocEntry*);
 #endif
     virtual bool doSeek(gint64 position, float rate, GstSeekFlags seekType);
     virtual void updatePlaybackRate();
index 1134406..086c65f 100644 (file)
@@ -201,7 +201,7 @@ private:
 
 MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase(MediaPlayer* player)
     : m_player(player)
-    , m_fpsSink(0)
+    , m_fpsSink(nullptr)
     , m_readyState(MediaPlayer::HaveNothing)
     , m_networkState(MediaPlayer::Empty)
 #if USE(GSTREAMER_GL) || USE(COORDINATED_GRAPHICS_THREADED)
@@ -209,7 +209,7 @@ MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase(MediaPlayer* pl
 #endif
     , m_usingFallbackVideoSink(false)
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
-    , m_cdmSession(0)
+    , m_cdmSession(nullptr)
 #endif
 {
     g_mutex_init(&m_sampleMutex);
@@ -595,7 +595,7 @@ void MediaPlayerPrivateGStreamerBase::setMuted(bool muted)
     if (!m_volumeElement)
         return;
 
-    g_object_set(m_volumeElement.get(), "mute", muted, NULL);
+    g_object_set(m_volumeElement.get(), "mute", muted, nullptr);
 }
 
 bool MediaPlayerPrivateGStreamerBase::muted() const
@@ -604,7 +604,7 @@ bool MediaPlayerPrivateGStreamerBase::muted() const
         return false;
 
     bool muted;
-    g_object_get(m_volumeElement.get(), "mute", &muted, NULL);
+    g_object_get(m_volumeElement.get(), "mute", &muted, nullptr);
     return muted;
 }
 
@@ -614,7 +614,7 @@ void MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute()
         return;
 
     gboolean muted;
-    g_object_get(m_volumeElement.get(), "mute", &muted, NULL);
+    g_object_get(m_volumeElement.get(), "mute", &muted, nullptr);
     m_player->muteChanged(static_cast<bool>(muted));
 }
 
@@ -1179,12 +1179,12 @@ void MediaPlayerPrivateGStreamerBase::setStreamVolumeElement(GstStreamVolume* vo
     // https://bugs.webkit.org/show_bug.cgi?id=118974 for more information.
     if (!m_player->platformVolumeConfigurationRequired()) {
         GST_DEBUG("Setting stream volume to %f", m_player->volume());
-        g_object_set(m_volumeElement.get(), "volume", m_player->volume(), NULL);
+        g_object_set(m_volumeElement.get(), "volume", m_player->volume(), nullptr);
     } else
         GST_DEBUG("Not setting stream volume, trusting system one");
 
     GST_DEBUG("Setting stream muted %d",  m_player->muted());
-    g_object_set(m_volumeElement.get(), "mute", m_player->muted(), NULL);
+    g_object_set(m_volumeElement.get(), "mute", m_player->muted(), nullptr);
 
     g_signal_connect_swapped(m_volumeElement.get(), "notify::volume", G_CALLBACK(volumeChangedCallback), this);
     g_signal_connect_swapped(m_volumeElement.get(), "notify::mute", G_CALLBACK(muteChangedCallback), this);
@@ -1194,7 +1194,7 @@ unsigned MediaPlayerPrivateGStreamerBase::decodedFrameCount() const
 {
     guint64 decodedFrames = 0;
     if (m_fpsSink)
-        g_object_get(m_fpsSink.get(), "frames-rendered", &decodedFrames, NULL);
+        g_object_get(m_fpsSink.get(), "frames-rendered", &decodedFrames, nullptr);
     return static_cast<unsigned>(decodedFrames);
 }
 
@@ -1202,7 +1202,7 @@ unsigned MediaPlayerPrivateGStreamerBase::droppedFrameCount() const
 {
     guint64 framesDropped = 0;
     if (m_fpsSink)
-        g_object_get(m_fpsSink.get(), "frames-dropped", &framesDropped, NULL);
+        g_object_get(m_fpsSink.get(), "frames-dropped", &framesDropped, nullptr);
     return static_cast<unsigned>(framesDropped);
 }
 
index ee568cb..8e3736c 100644 (file)
@@ -286,7 +286,7 @@ void MediaPlayerPrivateGStreamerOwr::registerMediaEngine(MediaEngineRegistrar re
     if (initializeGStreamerAndGStreamerDebugging()) {
         registrar([](MediaPlayer* player) {
             return std::make_unique<MediaPlayerPrivateGStreamerOwr>(player);
-        }, getSupportedTypes, supportsType, 0, 0, 0, 0);
+        }, getSupportedTypes, supportsType, nullptr, nullptr, nullptr, nullptr);
     }
 }
 
index 339ca37..02de1e8 100644 (file)
@@ -76,7 +76,7 @@ static gboolean webkitTextCombinerPadEvent(GstPad*, GstObject* parent, GstEvent*
 
 static void webkit_text_combiner_init(WebKitTextCombiner* combiner)
 {
-    combiner->funnel = gst_element_factory_make("funnel", NULL);
+    combiner->funnel = gst_element_factory_make("funnel", nullptr);
     ASSERT(combiner->funnel);
 
     gboolean ret = gst_bin_add(GST_BIN(combiner), combiner->funnel);
@@ -147,7 +147,7 @@ static gboolean webkitTextCombinerPadEvent(GstPad* pad, GstObject* parent, GstEv
              * the funnel */
             if (targetParent == combiner->funnel) {
                 /* Setup a WebVTT encoder */
-                GstElement* encoder = gst_element_factory_make("webvttenc", NULL);
+                GstElement* encoder = gst_element_factory_make("webvttenc", nullptr);
                 ASSERT(encoder);
 
                 ret = gst_bin_add(GST_BIN(combiner), encoder);
@@ -232,7 +232,7 @@ static GstPad* webkitTextCombinerRequestNewPad(GstElement * element,
     GstPad* pad = gst_element_request_pad(combiner->funnel, templ, name, caps);
     ASSERT(pad);
 
-    GstPad* ghostPad = GST_PAD(g_object_new(WEBKIT_TYPE_TEXT_COMBINER_PAD, "direction", gst_pad_get_direction(pad), NULL));
+    GstPad* ghostPad = GST_PAD(g_object_new(WEBKIT_TYPE_TEXT_COMBINER_PAD, "direction", gst_pad_get_direction(pad), nullptr));
     ASSERT(ghostPad);
 
     ret = gst_ghost_pad_construct(GST_GHOST_PAD(ghostPad));
@@ -295,7 +295,7 @@ static void webkit_text_combiner_pad_class_init(WebKitTextCombinerPadClass* klas
 
 GstElement* webkitTextCombinerNew()
 {
-    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_COMBINER, 0));
+    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_COMBINER, nullptr));
 }
 
 #endif // ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK)
index 678e7ac..e651deb 100644 (file)
@@ -95,7 +95,7 @@ static void webkit_text_sink_class_init(WebKitTextSinkClass* klass)
 
 GstElement* webkitTextSinkNew()
 {
-    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_SINK, 0));
+    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_SINK, nullptr));
 }
 
 #endif // ENABLE(VIDEO) && USE(GSTREAMER) && ENABLE(VIDEO_TRACK)
index 9be1fea..e176e3a 100644 (file)
@@ -89,7 +89,7 @@ void TrackPrivateBaseGStreamer::tagsChanged()
 {
     GRefPtr<GstTagList> tags;
     if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_pad.get()), "tags"))
-        g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL);
+        g_object_get(m_pad.get(), "tags", &tags.outPtr(), nullptr);
     else
         tags = adoptGRef(gst_tag_list_new_empty());
 
@@ -108,7 +108,7 @@ void TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged()
 
     gboolean active = false;
     if (m_pad && g_object_class_find_property(G_OBJECT_GET_CLASS(m_pad.get()), "active"))
-        g_object_get(m_pad.get(), "active", &active, NULL);
+        g_object_get(m_pad.get(), "active", &active, nullptr);
 
     setActive(active);
 }
index b5b7cb7..a6107b3 100644 (file)
@@ -183,7 +183,7 @@ G_DEFINE_TYPE_WITH_CODE(WebKitVideoSink, webkit_video_sink, GST_TYPE_VIDEO_SINK,
 static void webkit_video_sink_init(WebKitVideoSink* sink)
 {
     sink->priv = G_TYPE_INSTANCE_GET_PRIVATE(sink, WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkPrivate);
-    g_object_set(GST_BASE_SINK(sink), "enable-last-sample", FALSE, NULL);
+    g_object_set(GST_BASE_SINK(sink), "enable-last-sample", FALSE, nullptr);
     new (sink->priv) WebKitVideoSinkPrivate();
 }
 
@@ -341,7 +341,7 @@ static gboolean webkitVideoSinkSetCaps(GstBaseSink* baseSink, GstCaps* caps)
 static gboolean webkitVideoSinkProposeAllocation(GstBaseSink* baseSink, GstQuery* query)
 {
     GstCaps* caps;
-    gst_query_parse_allocation(query, &caps, 0);
+    gst_query_parse_allocation(query, &caps, nullptr);
     if (!caps)
         return FALSE;
 
@@ -349,9 +349,9 @@ static gboolean webkitVideoSinkProposeAllocation(GstBaseSink* baseSink, GstQuery
     if (!gst_video_info_from_caps(&sink->priv->info, caps))
         return FALSE;
 
-    gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, 0);
-    gst_query_add_allocation_meta(query, GST_VIDEO_CROP_META_API_TYPE, 0);
-    gst_query_add_allocation_meta(query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, 0);
+    gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, nullptr);
+    gst_query_add_allocation_meta(query, GST_VIDEO_CROP_META_API_TYPE, nullptr);
+    gst_query_add_allocation_meta(query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, nullptr);
     return TRUE;
 }
 
@@ -408,7 +408,7 @@ static void webkit_video_sink_class_init(WebKitVideoSinkClass* klass)
 
 GstElement* webkitVideoSinkNew()
 {
-    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_VIDEO_SINK, 0));
+    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_VIDEO_SINK, nullptr));
 }
 
 #endif // ENABLE(VIDEO) && USE(GSTREAMER)
index 1594aa1..a6f94b8 100644 (file)
@@ -55,7 +55,7 @@ void VideoTrackPrivateGStreamer::setSelected(bool selected)
     VideoTrackPrivate::setSelected(selected);
 
     if (selected && m_playbin)
-        g_object_set(m_playbin.get(), "current-video", m_index, NULL);
+        g_object_set(m_playbin.get(), "current-video", m_index, nullptr);
 }
 
 } // namespace WebCore
index c3bff9a..1c5c30f 100644 (file)
@@ -270,7 +270,7 @@ static void webkit_web_src_init(WebKitWebSrc* src)
 
     priv->createdInMainThread = isMainThread();
 
-    priv->appsrc = GST_APP_SRC(gst_element_factory_make("appsrc", 0));
+    priv->appsrc = GST_APP_SRC(gst_element_factory_make("appsrc", nullptr));
     if (!priv->appsrc) {
         GST_ERROR_OBJECT(src, "Failed to create appsrc");
         return;
@@ -287,7 +287,7 @@ static void webkit_web_src_init(WebKitWebSrc* src)
     GST_OBJECT_FLAG_SET(priv->srcpad, GST_PAD_FLAG_NEED_PARENT);
     gst_pad_set_query_function(priv->srcpad, webKitWebSrcQueryWithParent);
 
-    gst_app_src_set_callbacks(priv->appsrc, &appsrcCallbacks, src, 0);
+    gst_app_src_set_callbacks(priv->appsrc, &appsrcCallbacks, src, nullptr);
     gst_app_src_set_emit_signals(priv->appsrc, FALSE);
     gst_app_src_set_stream_type(priv->appsrc, GST_APP_STREAM_TYPE_SEEKABLE);
 
@@ -308,9 +308,9 @@ static void webkit_web_src_init(WebKitWebSrc* src)
     // likely that libsoup already provides new data before
     // the queue is really empty.
     // This might need tweaking for ports not using libsoup.
-    g_object_set(priv->appsrc, "min-percent", 20, NULL);
+    g_object_set(priv->appsrc, "min-percent", 20, nullptr);
 
-    gst_app_src_set_caps(priv->appsrc, 0);
+    gst_app_src_set_caps(priv->appsrc, nullptr);
     gst_app_src_set_size(priv->appsrc, -1);
 }
 
@@ -319,7 +319,7 @@ static void webKitWebSrcDispose(GObject* object)
     WebKitWebSrc* src = WEBKIT_WEB_SRC(object);
     WebKitWebSrcPrivate* priv = src->priv;
 
-    priv->player = 0;
+    priv->player = nullptr;
 
     GST_CALL_PARENT(G_OBJECT_CLASS, dispose, (object));
 }
@@ -339,7 +339,7 @@ static void webKitWebSrcSetProperty(GObject* object, guint propID, const GValue*
 
     switch (propID) {
     case PROP_LOCATION:
-        gst_uri_handler_set_uri(reinterpret_cast<GstURIHandler*>(src), g_value_get_string(value), 0);
+        gst_uri_handler_set_uri(reinterpret_cast<GstURIHandler*>(src), g_value_get_string(value), nullptr);
         break;
     case PROP_KEEP_ALIVE:
         src->priv->keepAlive = g_value_get_boolean(value);
@@ -433,13 +433,13 @@ static void webKitWebSrcStop(WebKitWebSrc* src)
     if (!wasSeeking) {
         priv->size = 0;
         priv->requestedOffset = 0;
-        priv->player = 0;
+        priv->player = nullptr;
     }
 
     locker.unlock();
 
     if (priv->appsrc) {
-        gst_app_src_set_caps(priv->appsrc, 0);
+        gst_app_src_set_caps(priv->appsrc, nullptr);
         if (!wasSeeking)
             gst_app_src_set_size(priv->appsrc, -1);
     }
@@ -615,7 +615,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat
         if (!priv->appsrc) {
             gst_element_post_message(element,
                                      gst_missing_element_message_new(element, "appsrc"));
-            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (0), ("no appsrc"));
+            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (nullptr), ("no appsrc"));
             return GST_STATE_CHANGE_FAILURE;
         }
         break;
@@ -658,7 +658,7 @@ static gboolean webKitWebSrcQueryWithParent(GstPad* pad, GstObject* parent, GstQ
     case GST_QUERY_DURATION: {
         GstFormat format;
 
-        gst_query_parse_duration(query, &format, NULL);
+        gst_query_parse_duration(query, &format, nullptr);
 
         GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format));
         WTF::GMutexLocker<GMutex> locker(*GST_OBJECT_GET_LOCK(src));
@@ -710,7 +710,7 @@ static GstURIType webKitWebSrcUriGetType(GType)
 
 const gchar* const* webKitWebSrcGetProtocols(GType)
 {
-    static const char* protocols[] = {"http", "https", "blob", 0 };
+    static const char* protocols[] = {"http", "https", "blob", nullptr };
     return protocols;
 }
 
@@ -936,7 +936,7 @@ void StreamingClient::handleResponseReceived(const ResourceResponse& response)
     } else
         gst_app_src_set_size(priv->appsrc, -1);
 
-    gst_app_src_set_caps(priv->appsrc, 0);
+    gst_app_src_set_caps(priv->appsrc, nullptr);
 }
 
 void StreamingClient::handleDataReceived(const char* data, int length)
@@ -1003,7 +1003,7 @@ void StreamingClient::handleDataReceived(const char* data, int length)
 
     GstFlowReturn ret = gst_app_src_push_buffer(priv->appsrc, priv->buffer.leakRef());
     if (ret != GST_FLOW_OK && ret != GST_FLOW_EOS)
-        GST_ELEMENT_ERROR(src, CORE, FAILED, (0), (0));
+        GST_ELEMENT_ERROR(src, CORE, FAILED, (nullptr), (nullptr));
 }
 
 void StreamingClient::handleNotifyFinished()
@@ -1182,7 +1182,7 @@ void ResourceHandleStreamingClient::didFail(ResourceHandle*, const ResourceError
     WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src);
 
     GST_ERROR_OBJECT(src, "Have failure: %s", error.localizedDescription().utf8().data());
-    GST_ELEMENT_ERROR(src, RESOURCE, FAILED, ("%s", error.localizedDescription().utf8().data()), (0));
+    GST_ELEMENT_ERROR(src, RESOURCE, FAILED, ("%s", error.localizedDescription().utf8().data()), (nullptr));
     gst_app_src_end_of_stream(src->priv->appsrc);
 }
 
@@ -1197,7 +1197,7 @@ void ResourceHandleStreamingClient::wasBlocked(ResourceHandle*)
     uri.reset(g_strdup(src->priv->originalURI.data()));
     locker.unlock();
 
-    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Access to \"%s\" was blocked", uri.get()), (0));
+    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Access to \"%s\" was blocked", uri.get()), (nullptr));
 }
 
 void ResourceHandleStreamingClient::cannotShowURL(ResourceHandle*)
@@ -1211,7 +1211,7 @@ void ResourceHandleStreamingClient::cannotShowURL(ResourceHandle*)
     uri.reset(g_strdup(src->priv->originalURI.data()));
     locker.unlock();
 
-    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", uri.get()), (0));
+    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", uri.get()), (nullptr));
 }
 
 #endif // USE(GSTREAMER)
index 107deda..52ca668 100644 (file)
@@ -593,7 +593,7 @@ GstURIType webKitMediaSrcUriGetType(GType)
 
 const gchar* const* webKitMediaSrcGetProtocols(GType)
 {
-    static const char* protocols[] = {"mediasourceblob", 0 };
+    static const char* protocols[] = {"mediasourceblob", nullptr };
     return protocols;
 }