Changeset 213445 in webkit


Ignore:
Timestamp:
Mar 6, 2017 2:32:57 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] Adopt nullptr
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):

Location:
trunk/Source/WebCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r213444 r213445  
     12017-03-06  Vanessa Chipirrás Navalón  <vchipirras@igalia.com>
     2
     3        [GStreamer] Adopt nullptr
     4        https://bugs.webkit.org/show_bug.cgi?id=123438
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        To adapt the code to the C++11 standard, all NULL or 0 pointers have been changed to nullptr.
     9
     10        * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
     11        (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
     12        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
     13        (WebCore::AudioFileReader::handleNewDeinterleavePad):
     14        (WebCore::AudioFileReader::plugDeinterleave):
     15        (WebCore::AudioFileReader::decodeAudioForBusCreation):
     16        * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
     17        (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
     18        (WebCore::AudioSourceProviderGStreamer::configureAudioBin):
     19        (WebCore::AudioSourceProviderGStreamer::setClient):
     20        (WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
     21        * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
     22        (webkit_web_audio_src_init):
     23        (webKitWebAudioSrcLoop):
     24        (webKitWebAudioSrcChangeState):
     25        * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
     26        (WebCore::AudioTrackPrivateGStreamer::setEnabled):
     27        * platform/graphics/gstreamer/GStreamerUtilities.cpp:
     28        (WebCore::initializeGStreamer):
     29        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     30        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
     31        (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
     32        (WebCore::initializeGStreamerAndRegisterWebKitElements):
     33        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
     34        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
     35        (WebCore::MediaPlayerPrivateGStreamer::newTextSample):
     36        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
     37        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
     38        Removed the unused second argument on processTableOfContentsEntry function.
     39        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
     40        Removed the unused second argument on this function.
     41        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
     42        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
     43        (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
     44        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
     45        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     46        Removed the unused second argument on processTableOfContentsEntry function.
     47        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
     48        (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
     49        (WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
     50        (WebCore::MediaPlayerPrivateGStreamerBase::muted):
     51        (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
     52        (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
     53        (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
     54        (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
     55        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
     56        (WebCore::MediaPlayerPrivateGStreamerOwr::registerMediaEngine):
     57        * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
     58        (webkit_text_combiner_init):
     59        (webkitTextCombinerPadEvent):
     60        (webkitTextCombinerRequestNewPad):
     61        (webkitTextCombinerNew):
     62        * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
     63        (webkitTextSinkNew):
     64        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
     65        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
     66        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
     67        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
     68        (webkit_video_sink_init):
     69        (webkitVideoSinkProposeAllocation):
     70        (webkitVideoSinkNew):
     71        * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
     72        (WebCore::VideoTrackPrivateGStreamer::setSelected):
     73        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     74        (webkit_web_src_init):
     75        (webKitWebSrcDispose):
     76        (webKitWebSrcSetProperty):
     77        (webKitWebSrcStop):
     78        (webKitWebSrcChangeState):
     79        (webKitWebSrcQueryWithParent):
     80        (webKitWebSrcGetProtocols):
     81        (StreamingClient::handleResponseReceived):
     82        (StreamingClient::handleDataReceived):
     83        (ResourceHandleStreamingClient::didFail):
     84        (ResourceHandleStreamingClient::wasBlocked):
     85        (ResourceHandleStreamingClient::cannotShowURL):
     86        * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
     87        (webKitMediaSrcGetProtocols):
     88
    1892017-03-06  Andreas Kling  <akling@apple.com>
    290
  • trunk/Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp

    r201077 r213445  
    9393                                                                            "bus", m_renderBus.get(),
    9494                                                                            "provider", &m_callback,
    95                                                                             "frames", framesToPull, NULL));
     95                                                                            "frames", framesToPull, nullptr));
    9696
    97     GRefPtr<GstElement> audioSink = gst_element_factory_make("autoaudiosink", 0);
     97    GRefPtr<GstElement> audioSink = gst_element_factory_make("autoaudiosink", nullptr);
    9898    m_audioSinkAvailable = audioSink;
    9999    if (!audioSink) {
     
    115115    }
    116116
    117     GstElement* audioConvert = gst_element_factory_make("audioconvert", 0);
    118     GstElement* audioResample = gst_element_factory_make("audioresample", 0);
    119     gst_bin_add_many(GST_BIN(m_pipeline), webkitAudioSrc, audioConvert, audioResample, audioSink.get(), NULL);
     117    GstElement* audioConvert = gst_element_factory_make("audioconvert", nullptr);
     118    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
     119    gst_bin_add_many(GST_BIN(m_pipeline), webkitAudioSrc, audioConvert, audioResample, audioSink.get(), nullptr);
    120120
    121121    // Link src pads from webkitAudioSrc to audioConvert ! audioResample ! autoaudiosink.
  • trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp

    r192511 r213445  
    214214    // channel. Pipeline looks like:
    215215    // ... deinterleave ! queue ! appsink.
    216     GstElement* queue = gst_element_factory_make("queue", 0);
    217     GstElement* sink = gst_element_factory_make("appsink", 0);
     216    GstElement* queue = gst_element_factory_make("queue", nullptr);
     217    GstElement* sink = gst_element_factory_make("appsink", nullptr);
    218218
    219219    static GstAppSinkCallbacks callbacks = {
     
    226226        { nullptr }
    227227    };
    228     gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, 0);
    229 
    230     g_object_set(sink, "sync", FALSE, NULL);
     228    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, nullptr);
     229
     230    g_object_set(sink, "sync", FALSE, nullptr);
    231231
    232232    gst_bin_add_many(GST_BIN(m_pipeline.get()), queue, sink, nullptr);
     
    257257    // separate each planar channel. Sub pipeline looks like
    258258    // ... decodebin2 ! audioconvert ! audioresample ! capsfilter ! deinterleave.
    259     GstElement* audioConvert  = gst_element_factory_make("audioconvert", 0);
    260     GstElement* audioResample = gst_element_factory_make("audioresample", 0);
    261     GstElement* capsFilter = gst_element_factory_make("capsfilter", 0);
     259    GstElement* audioConvert  = gst_element_factory_make("audioconvert", nullptr);
     260    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
     261    GstElement* capsFilter = gst_element_factory_make("capsfilter", nullptr);
    262262    m_deInterleave = gst_element_factory_make("deinterleave", "deinterleave");
    263263
    264     g_object_set(m_deInterleave.get(), "keep-positions", TRUE, NULL);
     264    g_object_set(m_deInterleave.get(), "keep-positions", TRUE, nullptr);
    265265    g_signal_connect_swapped(m_deInterleave.get(), "pad-added", G_CALLBACK(deinterleavePadAddedCallback), this);
    266266    g_signal_connect_swapped(m_deInterleave.get(), "no-more-pads", G_CALLBACK(deinterleaveReadyCallback), this);
     
    317317    if (m_data) {
    318318        ASSERT(m_dataSize);
    319         source = gst_element_factory_make("giostreamsrc", 0);
    320         GRefPtr<GInputStream> memoryStream = adoptGRef(g_memory_input_stream_new_from_data(m_data, m_dataSize, 0));
    321         g_object_set(source, "stream", memoryStream.get(), NULL);
     319        source = gst_element_factory_make("giostreamsrc", nullptr);
     320        GRefPtr<GInputStream> memoryStream = adoptGRef(g_memory_input_stream_new_from_data(m_data, m_dataSize, nullptr));
     321        g_object_set(source, "stream", memoryStream.get(), nullptr);
    322322    } else {
    323         source = gst_element_factory_make("filesrc", 0);
    324         g_object_set(source, "location", m_filePath, NULL);
     323        source = gst_element_factory_make("filesrc", nullptr);
     324        g_object_set(source, "location", m_filePath, nullptr);
    325325    }
    326326
     
    328328    g_signal_connect_swapped(m_decodebin.get(), "pad-added", G_CALLBACK(decodebinPadAddedCallback), this);
    329329
    330     gst_bin_add_many(GST_BIN(m_pipeline.get()), source, m_decodebin.get(), NULL);
     330    gst_bin_add_many(GST_BIN(m_pipeline.get()), source, m_decodebin.get(), nullptr);
    331331    gst_element_link_pads_full(source, "src", m_decodebin.get(), "sink", GST_PAD_LINK_CHECK_NOTHING);
    332332
  • trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp

    r185502 r213445  
    8484
    8585AudioSourceProviderGStreamer::AudioSourceProviderGStreamer()
    86     : m_client(0)
     86    : m_client(nullptr)
    8787    , m_deinterleaveSourcePads(0)
    8888    , m_deinterleavePadAddedHandlerId(0)
     
    114114
    115115    GstElement* audioTee = gst_element_factory_make("tee", "audioTee");
    116     GstElement* audioQueue = gst_element_factory_make("queue", 0);
    117     GstElement* audioConvert = gst_element_factory_make("audioconvert", 0);
    118     GstElement* audioConvert2 = gst_element_factory_make("audioconvert", 0);
    119     GstElement* audioResample = gst_element_factory_make("audioresample", 0);
    120     GstElement* audioResample2 = gst_element_factory_make("audioresample", 0);
     116    GstElement* audioQueue = gst_element_factory_make("queue", nullptr);
     117    GstElement* audioConvert = gst_element_factory_make("audioconvert", nullptr);
     118    GstElement* audioConvert2 = gst_element_factory_make("audioconvert", nullptr);
     119    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
     120    GstElement* audioResample2 = gst_element_factory_make("audioresample", nullptr);
    121121    GstElement* volumeElement = gst_element_factory_make("volume", "volume");
    122     GstElement* audioSink = gst_element_factory_make("autoaudiosink", 0);
     122    GstElement* audioSink = gst_element_factory_make("autoaudiosink", nullptr);
    123123
    124124    gst_bin_add_many(GST_BIN(m_audioSinkBin.get()), audioTee, audioQueue, audioConvert, audioResample, volumeElement, audioConvert2, audioResample2, audioSink, nullptr);
     
    212212    // ensure deinterleave and the sinks downstream receive buffers in
    213213    // the format specified by the capsfilter.
    214     GstElement* audioQueue = gst_element_factory_make("queue", 0);
    215     GstElement* audioConvert  = gst_element_factory_make("audioconvert", 0);
    216     GstElement* audioResample = gst_element_factory_make("audioresample", 0);
    217     GstElement* capsFilter = gst_element_factory_make("capsfilter", 0);
     214    GstElement* audioQueue = gst_element_factory_make("queue", nullptr);
     215    GstElement* audioConvert  = gst_element_factory_make("audioconvert", nullptr);
     216    GstElement* audioResample = gst_element_factory_make("audioresample", nullptr);
     217    GstElement* capsFilter = gst_element_factory_make("capsfilter", nullptr);
    218218    GstElement* deInterleave = gst_element_factory_make("deinterleave", "deinterleave");
    219219
     
    258258    if (m_deinterleaveSourcePads > 2) {
    259259        g_warning("The AudioSourceProvider supports only mono and stereo audio. Silencing out this new channel.");
    260         GstElement* queue = gst_element_factory_make("queue", 0);
    261         GstElement* sink = gst_element_factory_make("fakesink", 0);
     260        GstElement* queue = gst_element_factory_make("queue", nullptr);
     261        GstElement* sink = gst_element_factory_make("fakesink", nullptr);
    262262        g_object_set(sink, "async", FALSE, nullptr);
    263263        gst_bin_add_many(GST_BIN(m_audioSinkBin.get()), queue, sink, nullptr);
     
    278278    // channel. Pipeline looks like:
    279279    // ... deinterleave ! queue ! appsink.
    280     GstElement* queue = gst_element_factory_make("queue", 0);
    281     GstElement* sink = gst_element_factory_make("appsink", 0);
     280    GstElement* queue = gst_element_factory_make("queue", nullptr);
     281    GstElement* sink = gst_element_factory_make("appsink", nullptr);
    282282
    283283    GstAppSinkCallbacks callbacks;
    284     callbacks.eos = 0;
    285     callbacks.new_preroll = 0;
     284    callbacks.eos = nullptr;
     285    callbacks.new_preroll = nullptr;
    286286    callbacks.new_sample = onAppsinkNewBufferCallback;
    287     gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, 0);
     287    gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, this, nullptr);
    288288
    289289    g_object_set(sink, "async", FALSE, nullptr);
  • trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp

    r210584 r213445  
    185185    new (priv) WebKitWebAudioSourcePrivate();
    186186
    187     priv->sourcePad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", 0);
     187    priv->sourcePad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", nullptr);
    188188    gst_element_add_pad(GST_ELEMENT(src), priv->sourcePad);
    189189
    190     priv->provider = 0;
    191     priv->bus = 0;
     190    priv->provider = nullptr;
     191    priv->bus = nullptr;
    192192
    193193    g_rec_mutex_init(&priv->mutex);
    194     priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, 0));
     194    priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, nullptr));
    195195
    196196    gst_task_set_lock(priv->task.get(), &priv->mutex);
     
    345345
    346346    // FIXME: Add support for local/live audio input.
    347     priv->provider->render(0, priv->bus, priv->framesToPull);
     347    priv->provider->render(nullptr, priv->bus, priv->framesToPull);
    348348
    349349    ASSERT(channelBufferList.size() == priv->sources.size());
     
    379379        if (!src->priv->interleave) {
    380380            gst_element_post_message(element, gst_missing_element_message_new(element, "interleave"));
    381             GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (0), ("no interleave"));
     381            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (nullptr), ("no interleave"));
    382382            return GST_STATE_CHANGE_FAILURE;
    383383        }
  • trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp

    r207873 r213445  
    5656
    5757    if (enabled && m_playbin)
    58         g_object_set(m_playbin.get(), "current-audio", m_index, NULL);
     58        g_object_set(m_playbin.get(), "current-audio", m_index, nullptr);
    5959}
    6060
  • trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp

    r210584 r213445  
    153153    GUniqueOutPtr<GError> error;
    154154    // FIXME: We should probably pass the arguments from the command line.
    155     bool gstInitialized = gst_init_check(0, 0, &error.outPtr());
     155    bool gstInitialized = gst_init_check(nullptr, nullptr, &error.outPtr());
    156156    ASSERT_WITH_MESSAGE(gstInitialized, "GStreamer initialization failed: %s", error ? error->message : "unknown error occurred");
    157157
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r213224 r213445  
    9797
    9898    const char* role = m_player->client().mediaPlayerIsVideo() ? "video" : "music";
    99     GstStructure* structure = gst_structure_new("stream-properties", "media.role", G_TYPE_STRING, role, NULL);
    100     g_object_set(object, "stream-properties", structure, NULL);
     99    GstStructure* structure = gst_structure_new("stream-properties", "media.role", G_TYPE_STRING, role, nullptr);
     100    g_object_set(object, "stream-properties", structure, nullptr);
    101101    gst_structure_free(structure);
    102102    GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
     
    108108    if (isAvailable())
    109109        registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateGStreamer>(player); },
    110             getSupportedTypes, supportsType, 0, 0, 0, supportsKeySystem);
     110            getSupportedTypes, supportsType, nullptr, nullptr, nullptr, supportsKeySystem);
    111111}
    112112
     
    121121    if (!srcFactory) {
    122122        GST_DEBUG_CATEGORY_INIT(webkit_media_player_debug, "webkitmediaplayer", 0, "WebKit media player");
    123         gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
     123        gst_element_register(nullptr, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
    124124    }
    125125
     
    154154    , m_seekIsPending(false)
    155155    , m_seekTime(0)
    156     , m_source(0)
     156    , m_source(nullptr)
    157157    , m_volumeAndMuteInitialized(false)
    158158    , m_weakPtrFactory(this)
    159     , m_mediaLocations(0)
     159    , m_mediaLocations(nullptr)
    160160    , m_mediaLocationCurrentIndex(0)
    161161    , m_playbackRatePause(false)
     
    195195    if (m_mediaLocations) {
    196196        gst_structure_free(m_mediaLocations);
    197         m_mediaLocations = 0;
     197        m_mediaLocations = nullptr;
    198198    }
    199199
     
    797797
    798798    GRefPtr<GstSample> sample;
    799     g_signal_emit_by_name(m_textAppSink.get(), "pull-sample", &sample.outPtr(), NULL);
     799    g_signal_emit_by_name(m_textAppSink.get(), "pull-sample", &sample.outPtr(), nullptr);
    800800    ASSERT(sample);
    801801
     
    987987        // Construct a filename for the graphviz dot file output.
    988988        GstState newState;
    989         gst_message_parse_state_changed(message, &currentState, &newState, 0);
     989        gst_message_parse_state_changed(message, &currentState, &newState, nullptr);
    990990        CString dotFileName = String::format("webkit-video.%s_%s", gst_element_state_get_name(currentState), gst_element_state_get_name(newState)).utf8();
    991991        GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
     
    11741174
    11751175    for (GList* i = gst_toc_get_entries(toc.get()); i; i = i->next)
    1176         processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), 0);
    1177 }
    1178 
    1179 void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry, GstTocEntry* parent)
    1180 {
    1181     UNUSED_PARAM(parent);
     1176        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data));
     1177}
     1178
     1179void MediaPlayerPrivateGStreamer::processTableOfContentsEntry(GstTocEntry* entry)
     1180{
    11821181    ASSERT(entry);
    11831182
     
    11931192    GstTagList* tags = gst_toc_entry_get_tags(entry);
    11941193    if (tags) {
    1195         gchar* title =  0;
     1194        gchar* title =  nullptr;
    11961195        gst_tag_list_get_string(tags, GST_TAG_TITLE, &title);
    11971196        if (title) {
     
    12041203
    12051204    for (GList* i = gst_toc_entry_get_sub_entries(entry); i; i = i->next)
    1206         processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data), entry);
     1205        processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data));
    12071206}
    12081207#endif
     
    12201219    gdouble fillStatus = 100.0;
    12211220
    1222     gst_query_parse_buffering_range(query, 0, &start, &stop, 0);
     1221    gst_query_parse_buffering_range(query, nullptr, &start, &stop, nullptr);
    12231222    gst_query_unref(query);
    12241223
     
    16551654
    16561655    const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
    1657     const gchar* newLocation = 0;
     1656    const gchar* newLocation = nullptr;
    16581657
    16591658    if (!locations) {
     
    16661665    if (!newLocation) {
    16671666        if (m_mediaLocationCurrentIndex < 0) {
    1668             m_mediaLocations = 0;
     1667            m_mediaLocations = nullptr;
    16691668            return false;
    16701669        }
     
    19751974GstElement* MediaPlayerPrivateGStreamer::createAudioSink()
    19761975{
    1977     m_autoAudioSink = gst_element_factory_make("autoaudiosink", 0);
     1976    m_autoAudioSink = gst_element_factory_make("autoaudiosink", nullptr);
    19781977    if (!m_autoAudioSink) {
    19791978        GST_WARNING("GStreamer's autoaudiosink not found. Please check your gst-plugins-good installation");
     
    21162115    // the reason for using >= 1.4.2 instead of >= 1.4.0.
    21172116    if (m_preservesPitch && webkitGstCheckVersion(1, 4, 2)) {
    2118         GstElement* scale = gst_element_factory_make("scaletempo", 0);
     2117        GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
    21192118
    21202119        if (!scale)
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r212889 r213445  
    162162#if ENABLE(VIDEO_TRACK)
    163163    void processTableOfContents(GstMessage*);
    164     void processTableOfContentsEntry(GstTocEntry*, GstTocEntry* parent);
     164    void processTableOfContentsEntry(GstTocEntry*);
    165165#endif
    166166    virtual bool doSeek(gint64 position, float rate, GstSeekFlags seekType);
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp

    r213224 r213445  
    202202MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase(MediaPlayer* player)
    203203    : m_player(player)
    204     , m_fpsSink(0)
     204    , m_fpsSink(nullptr)
    205205    , m_readyState(MediaPlayer::HaveNothing)
    206206    , m_networkState(MediaPlayer::Empty)
     
    210210    , m_usingFallbackVideoSink(false)
    211211#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
    212     , m_cdmSession(0)
     212    , m_cdmSession(nullptr)
    213213#endif
    214214{
     
    596596        return;
    597597
    598     g_object_set(m_volumeElement.get(), "mute", muted, NULL);
     598    g_object_set(m_volumeElement.get(), "mute", muted, nullptr);
    599599}
    600600
     
    605605
    606606    bool muted;
    607     g_object_get(m_volumeElement.get(), "mute", &muted, NULL);
     607    g_object_get(m_volumeElement.get(), "mute", &muted, nullptr);
    608608    return muted;
    609609}
     
    615615
    616616    gboolean muted;
    617     g_object_get(m_volumeElement.get(), "mute", &muted, NULL);
     617    g_object_get(m_volumeElement.get(), "mute", &muted, nullptr);
    618618    m_player->muteChanged(static_cast<bool>(muted));
    619619}
     
    11801180    if (!m_player->platformVolumeConfigurationRequired()) {
    11811181        GST_DEBUG("Setting stream volume to %f", m_player->volume());
    1182         g_object_set(m_volumeElement.get(), "volume", m_player->volume(), NULL);
     1182        g_object_set(m_volumeElement.get(), "volume", m_player->volume(), nullptr);
    11831183    } else
    11841184        GST_DEBUG("Not setting stream volume, trusting system one");
    11851185
    11861186    GST_DEBUG("Setting stream muted %d",  m_player->muted());
    1187     g_object_set(m_volumeElement.get(), "mute", m_player->muted(), NULL);
     1187    g_object_set(m_volumeElement.get(), "mute", m_player->muted(), nullptr);
    11881188
    11891189    g_signal_connect_swapped(m_volumeElement.get(), "notify::volume", G_CALLBACK(volumeChangedCallback), this);
     
    11951195    guint64 decodedFrames = 0;
    11961196    if (m_fpsSink)
    1197         g_object_get(m_fpsSink.get(), "frames-rendered", &decodedFrames, NULL);
     1197        g_object_get(m_fpsSink.get(), "frames-rendered", &decodedFrames, nullptr);
    11981198    return static_cast<unsigned>(decodedFrames);
    11991199}
     
    12031203    guint64 framesDropped = 0;
    12041204    if (m_fpsSink)
    1205         g_object_get(m_fpsSink.get(), "frames-dropped", &framesDropped, NULL);
     1205        g_object_get(m_fpsSink.get(), "frames-dropped", &framesDropped, nullptr);
    12061206    return static_cast<unsigned>(framesDropped);
    12071207}
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp

    r210499 r213445  
    287287        registrar([](MediaPlayer* player) {
    288288            return std::make_unique<MediaPlayerPrivateGStreamerOwr>(player);
    289         }, getSupportedTypes, supportsType, 0, 0, 0, 0);
     289        }, getSupportedTypes, supportsType, nullptr, nullptr, nullptr, nullptr);
    290290    }
    291291}
  • trunk/Source/WebCore/platform/graphics/gstreamer/TextCombinerGStreamer.cpp

    r160375 r213445  
    7777static void webkit_text_combiner_init(WebKitTextCombiner* combiner)
    7878{
    79     combiner->funnel = gst_element_factory_make("funnel", NULL);
     79    combiner->funnel = gst_element_factory_make("funnel", nullptr);
    8080    ASSERT(combiner->funnel);
    8181
     
    148148            if (targetParent == combiner->funnel) {
    149149                /* Setup a WebVTT encoder */
    150                 GstElement* encoder = gst_element_factory_make("webvttenc", NULL);
     150                GstElement* encoder = gst_element_factory_make("webvttenc", nullptr);
    151151                ASSERT(encoder);
    152152
     
    233233    ASSERT(pad);
    234234
    235     GstPad* ghostPad = GST_PAD(g_object_new(WEBKIT_TYPE_TEXT_COMBINER_PAD, "direction", gst_pad_get_direction(pad), NULL));
     235    GstPad* ghostPad = GST_PAD(g_object_new(WEBKIT_TYPE_TEXT_COMBINER_PAD, "direction", gst_pad_get_direction(pad), nullptr));
    236236    ASSERT(ghostPad);
    237237
     
    296296GstElement* webkitTextCombinerNew()
    297297{
    298     return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_COMBINER, 0));
     298    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_COMBINER, nullptr));
    299299}
    300300
  • trunk/Source/WebCore/platform/graphics/gstreamer/TextSinkGStreamer.cpp

    r159730 r213445  
    9696GstElement* webkitTextSinkNew()
    9797{
    98     return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_SINK, 0));
     98    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_TEXT_SINK, nullptr));
    9999}
    100100
  • trunk/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp

    r210319 r213445  
    9090    GRefPtr<GstTagList> tags;
    9191    if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_pad.get()), "tags"))
    92         g_object_get(m_pad.get(), "tags", &tags.outPtr(), NULL);
     92        g_object_get(m_pad.get(), "tags", &tags.outPtr(), nullptr);
    9393    else
    9494        tags = adoptGRef(gst_tag_list_new_empty());
     
    109109    gboolean active = false;
    110110    if (m_pad && g_object_class_find_property(G_OBJECT_GET_CLASS(m_pad.get()), "active"))
    111         g_object_get(m_pad.get(), "active", &active, NULL);
     111        g_object_get(m_pad.get(), "active", &active, nullptr);
    112112
    113113    setActive(active);
  • trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp

    r213224 r213445  
    184184{
    185185    sink->priv = G_TYPE_INSTANCE_GET_PRIVATE(sink, WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkPrivate);
    186     g_object_set(GST_BASE_SINK(sink), "enable-last-sample", FALSE, NULL);
     186    g_object_set(GST_BASE_SINK(sink), "enable-last-sample", FALSE, nullptr);
    187187    new (sink->priv) WebKitVideoSinkPrivate();
    188188}
     
    342342{
    343343    GstCaps* caps;
    344     gst_query_parse_allocation(query, &caps, 0);
     344    gst_query_parse_allocation(query, &caps, nullptr);
    345345    if (!caps)
    346346        return FALSE;
     
    350350        return FALSE;
    351351
    352     gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, 0);
    353     gst_query_add_allocation_meta(query, GST_VIDEO_CROP_META_API_TYPE, 0);
    354     gst_query_add_allocation_meta(query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, 0);
     352    gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, nullptr);
     353    gst_query_add_allocation_meta(query, GST_VIDEO_CROP_META_API_TYPE, nullptr);
     354    gst_query_add_allocation_meta(query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, nullptr);
    355355    return TRUE;
    356356}
     
    409409GstElement* webkitVideoSinkNew()
    410410{
    411     return GST_ELEMENT(g_object_new(WEBKIT_TYPE_VIDEO_SINK, 0));
     411    return GST_ELEMENT(g_object_new(WEBKIT_TYPE_VIDEO_SINK, nullptr));
    412412}
    413413
  • trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp

    r207873 r213445  
    5656
    5757    if (selected && m_playbin)
    58         g_object_set(m_playbin.get(), "current-video", m_index, NULL);
     58        g_object_set(m_playbin.get(), "current-video", m_index, nullptr);
    5959}
    6060
  • trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r212993 r213445  
    271271    priv->createdInMainThread = isMainThread();
    272272
    273     priv->appsrc = GST_APP_SRC(gst_element_factory_make("appsrc", 0));
     273    priv->appsrc = GST_APP_SRC(gst_element_factory_make("appsrc", nullptr));
    274274    if (!priv->appsrc) {
    275275        GST_ERROR_OBJECT(src, "Failed to create appsrc");
     
    288288    gst_pad_set_query_function(priv->srcpad, webKitWebSrcQueryWithParent);
    289289
    290     gst_app_src_set_callbacks(priv->appsrc, &appsrcCallbacks, src, 0);
     290    gst_app_src_set_callbacks(priv->appsrc, &appsrcCallbacks, src, nullptr);
    291291    gst_app_src_set_emit_signals(priv->appsrc, FALSE);
    292292    gst_app_src_set_stream_type(priv->appsrc, GST_APP_STREAM_TYPE_SEEKABLE);
     
    309309    // the queue is really empty.
    310310    // This might need tweaking for ports not using libsoup.
    311     g_object_set(priv->appsrc, "min-percent", 20, NULL);
    312 
    313     gst_app_src_set_caps(priv->appsrc, 0);
     311    g_object_set(priv->appsrc, "min-percent", 20, nullptr);
     312
     313    gst_app_src_set_caps(priv->appsrc, nullptr);
    314314    gst_app_src_set_size(priv->appsrc, -1);
    315315}
     
    320320    WebKitWebSrcPrivate* priv = src->priv;
    321321
    322     priv->player = 0;
     322    priv->player = nullptr;
    323323
    324324    GST_CALL_PARENT(G_OBJECT_CLASS, dispose, (object));
     
    340340    switch (propID) {
    341341    case PROP_LOCATION:
    342         gst_uri_handler_set_uri(reinterpret_cast<GstURIHandler*>(src), g_value_get_string(value), 0);
     342        gst_uri_handler_set_uri(reinterpret_cast<GstURIHandler*>(src), g_value_get_string(value), nullptr);
    343343        break;
    344344    case PROP_KEEP_ALIVE:
     
    434434        priv->size = 0;
    435435        priv->requestedOffset = 0;
    436         priv->player = 0;
     436        priv->player = nullptr;
    437437    }
    438438
     
    440440
    441441    if (priv->appsrc) {
    442         gst_app_src_set_caps(priv->appsrc, 0);
     442        gst_app_src_set_caps(priv->appsrc, nullptr);
    443443        if (!wasSeeking)
    444444            gst_app_src_set_size(priv->appsrc, -1);
     
    616616            gst_element_post_message(element,
    617617                                     gst_missing_element_message_new(element, "appsrc"));
    618             GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (0), ("no appsrc"));
     618            GST_ELEMENT_ERROR(src, CORE, MISSING_PLUGIN, (nullptr), ("no appsrc"));
    619619            return GST_STATE_CHANGE_FAILURE;
    620620        }
     
    659659        GstFormat format;
    660660
    661         gst_query_parse_duration(query, &format, NULL);
     661        gst_query_parse_duration(query, &format, nullptr);
    662662
    663663        GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format));
     
    711711const gchar* const* webKitWebSrcGetProtocols(GType)
    712712{
    713     static const char* protocols[] = {"http", "https", "blob", 0 };
     713    static const char* protocols[] = {"http", "https", "blob", nullptr };
    714714    return protocols;
    715715}
     
    937937        gst_app_src_set_size(priv->appsrc, -1);
    938938
    939     gst_app_src_set_caps(priv->appsrc, 0);
     939    gst_app_src_set_caps(priv->appsrc, nullptr);
    940940}
    941941
     
    10041004    GstFlowReturn ret = gst_app_src_push_buffer(priv->appsrc, priv->buffer.leakRef());
    10051005    if (ret != GST_FLOW_OK && ret != GST_FLOW_EOS)
    1006         GST_ELEMENT_ERROR(src, CORE, FAILED, (0), (0));
     1006        GST_ELEMENT_ERROR(src, CORE, FAILED, (nullptr), (nullptr));
    10071007}
    10081008
     
    11831183
    11841184    GST_ERROR_OBJECT(src, "Have failure: %s", error.localizedDescription().utf8().data());
    1185     GST_ELEMENT_ERROR(src, RESOURCE, FAILED, ("%s", error.localizedDescription().utf8().data()), (0));
     1185    GST_ELEMENT_ERROR(src, RESOURCE, FAILED, ("%s", error.localizedDescription().utf8().data()), (nullptr));
    11861186    gst_app_src_end_of_stream(src->priv->appsrc);
    11871187}
     
    11981198    locker.unlock();
    11991199
    1200     GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Access to \"%s\" was blocked", uri.get()), (0));
     1200    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Access to \"%s\" was blocked", uri.get()), (nullptr));
    12011201}
    12021202
     
    12121212    locker.unlock();
    12131213
    1214     GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", uri.get()), (0));
     1214    GST_ELEMENT_ERROR(src, RESOURCE, OPEN_READ, ("Can't show \"%s\"", uri.get()), (nullptr));
    12151215}
    12161216
  • trunk/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp

    r212285 r213445  
    594594const gchar* const* webKitMediaSrcGetProtocols(GType)
    595595{
    596     static const char* protocols[] = {"mediasourceblob", 0 };
     596    static const char* protocols[] = {"mediasourceblob", nullptr };
    597597    return protocols;
    598598}
Note: See TracChangeset for help on using the changeset viewer.