Unreviewed, followup to r190643.
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Oct 2015 11:24:40 +0000 (11:24 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Oct 2015 11:24:40 +0000 (11:24 +0000)
Inline the std::function<> constructor wrappings around lambdas
into a single line, instead of spanning it across four lines.

* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::handleSample):
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::videoChanged):
(WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::audioChanged):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::textChanged):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
(WebCore::MediaPlayerPrivateGStreamerBase::networkState):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::activeChanged):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcChangeState):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

index b8f4b63..140a2c1 100644 (file)
@@ -1,3 +1,40 @@
+2015-10-12  Zan Dobersek  <zdobersek@igalia.com>
+
+        Unreviewed, followup to r190643.
+
+        Inline the std::function<> constructor wrappings around lambdas
+        into a single line, instead of spanning it across four lines.
+
+        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
+        (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
+        (WebCore::InbandTextTrackPrivateGStreamer::streamChanged):
+        (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
+        (WebCore::MediaPlayerPrivateGStreamer::videoCapsChanged):
+        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
+        (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
+        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
+        (WebCore::MediaPlayerPrivateGStreamer::textChanged):
+        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
+        (WebCore::MediaPlayerPrivateGStreamerBase::networkState):
+        (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
+        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
+        (WebCore::TrackPrivateBaseGStreamer::activeChanged):
+        (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
+        (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged):
+        * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
+        (webkitVideoSinkRender):
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcChangeState):
+        (webKitWebSrcNeedDataCb):
+        (webKitWebSrcEnoughDataMainCb):
+        (webKitWebSrcEnoughDataCb):
+        (webKitWebSrcSeekMainCb):
+        (webKitWebSrcSeekDataCb):
+
 2015-10-11  Brian Burg  <bburg@apple.com>
 
         Add missing builtins files to the Xcode projects
index aad932e..1eeef69 100644 (file)
@@ -83,20 +83,14 @@ void InbandTextTrackPrivateGStreamer::handleSample(GRefPtr<GstSample> sample)
 
     RefPtr<InbandTextTrackPrivateGStreamer> protector(this);
     m_sampleTimerHandler.schedule("[WebKit] InbandTextTrackPrivateGStreamer::notifyTrackOfSample",
-        std::function<void()>(
-            [protector] {
-                protector->notifyTrackOfSample();
-            }));
+        std::function<void()>([protector] { protector->notifyTrackOfSample(); }));
 }
 
 void InbandTextTrackPrivateGStreamer::streamChanged()
 {
     RefPtr<InbandTextTrackPrivateGStreamer> protector(this);
     m_streamTimerHandler.schedule("[WebKit] InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged",
-        std::function<void()>(
-            [protector] {
-                protector->notifyTrackOfStreamChanged();
-            }));
+        std::function<void()>([protector] { protector->notifyTrackOfStreamChanged(); }));
 }
 
 void InbandTextTrackPrivateGStreamer::notifyTrackOfSample()
index 01b86cf..986d0fa 100644 (file)
@@ -651,19 +651,13 @@ bool MediaPlayerPrivateGStreamer::seeking() const
 void MediaPlayerPrivateGStreamer::videoChanged()
 {
     m_videoTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamer::videoChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfVideo();
-            }));
+        std::function<void()>([this] { notifyPlayerOfVideo(); }));
 }
 
 void MediaPlayerPrivateGStreamer::videoCapsChanged()
 {
     m_videoCapsTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamer::videoCapsChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfVideoCaps();
-            }));
+        std::function<void()>([this] { notifyPlayerOfVideoCaps(); }));
 }
 
 void MediaPlayerPrivateGStreamer::notifyPlayerOfVideo()
@@ -712,10 +706,7 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps()
 void MediaPlayerPrivateGStreamer::audioChanged()
 {
     m_audioTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamer::audioChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfAudio();
-            }));
+        std::function<void()>([this] { notifyPlayerOfAudio(); }));
 }
 
 void MediaPlayerPrivateGStreamer::notifyPlayerOfAudio()
@@ -759,10 +750,7 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfAudio()
 void MediaPlayerPrivateGStreamer::textChanged()
 {
     m_textTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamer::textChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfText();
-            }));
+        std::function<void()>([this] { notifyPlayerOfText(); }));
 }
 
 void MediaPlayerPrivateGStreamer::notifyPlayerOfText()
index 0017f39..c842e42 100644 (file)
@@ -362,10 +362,7 @@ void MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange()
 void MediaPlayerPrivateGStreamerBase::volumeChanged()
 {
     m_volumeTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamerBase::volumeChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfVolumeChange();
-            }));
+        std::function<void()>([this] { notifyPlayerOfVolumeChange(); }));
 }
 
 MediaPlayer::NetworkState MediaPlayerPrivateGStreamerBase::networkState() const
@@ -414,10 +411,7 @@ void MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute()
 void MediaPlayerPrivateGStreamerBase::muteChanged()
 {
     m_muteTimerHandler.schedule("[WebKit] MediaPlayerPrivateGStreamerBase::muteChanged",
-        std::function<void()>(
-            [this] {
-                notifyPlayerOfMute();
-            }));
+        std::function<void()>([this] { notifyPlayerOfMute(); }));
 }
 
 #if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS)
index ef311c5..9b8728a 100644 (file)
@@ -93,10 +93,7 @@ void TrackPrivateBaseGStreamer::disconnect()
 void TrackPrivateBaseGStreamer::activeChanged()
 {
     m_activeTimerHandler.schedule("[WebKit] TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged",
-        std::function<void()>(
-            [this] {
-                notifyTrackOfActiveChanged();
-            }));
+        std::function<void()>([this] { notifyTrackOfActiveChanged(); }));
 }
 
 void TrackPrivateBaseGStreamer::tagsChanged()
@@ -111,10 +108,7 @@ void TrackPrivateBaseGStreamer::tagsChanged()
     }
 
     m_tagTimerHandler.schedule("[WebKit] TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged",
-        std::function<void()>(
-            [this] {
-                notifyTrackOfTagsChanged();
-            }));
+        std::function<void()>([this] { notifyTrackOfTagsChanged(); }));
 }
 
 void TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged()
index 274b0d6..dfd2458 100644 (file)
@@ -219,10 +219,7 @@ static GstFlowReturn webkitVideoSinkRender(GstBaseSink* baseSink, GstBuffer* buf
     // See: https://bugzilla.gnome.org/show_bug.cgi?id=610830.
     GRefPtr<WebKitVideoSink> protector(sink);
     priv->timeoutSource.schedule("[WebKit] webkitVideoSinkTimeoutCallback",
-        std::function<void()>(
-            [protector] {
-                webkitVideoSinkTimeoutCallback(protector.get());
-            }));
+        std::function<void()>([protector] { webkitVideoSinkTimeoutCallback(protector.get()); }));
 
     g_cond_wait(&priv->dataCondition, &priv->sampleMutex);
     return GST_FLOW_OK;
index 72b8f68..c4ac943 100644 (file)
@@ -666,10 +666,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat
         priv->pendingStart = TRUE;
         GRefPtr<WebKitWebSrc> protector(src);
         priv->startSource.schedule("[WebKit] webKitWebSrcStart",
-            std::function<void()>(
-                [protector] {
-                    webKitWebSrcStart(protector.get());
-                }));
+            std::function<void()>([protector] { webKitWebSrcStart(protector.get()); }));
         break;
     }
     case GST_STATE_CHANGE_PAUSED_TO_READY:
@@ -680,10 +677,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat
         removeTimeoutSources(src);
         GRefPtr<WebKitWebSrc> protector(src);
         priv->stopSource.schedule("[WebKit] webKitWebSrcStop",
-            std::function<void()>(
-                [protector] {
-                    webKitWebSrcStop(protector.get());
-                }));
+            std::function<void()>([protector] { webKitWebSrcStop(protector.get()); }));
         break;
     }
     default:
@@ -839,10 +833,7 @@ static void webKitWebSrcNeedDataCb(GstAppSrc*, guint length, gpointer userData)
 
     GRefPtr<WebKitWebSrc> protector(src);
     priv->needDataSource.schedule("[WebKit] webKitWebSrcNeedDataMainCb",
-        std::function<void()>(
-            [protector] {
-                webKitWebSrcNeedDataMainCb(protector.get());
-            }));
+        std::function<void()>([protector] { webKitWebSrcNeedDataMainCb(protector.get()); }));
 }
 
 static void webKitWebSrcEnoughDataMainCb(WebKitWebSrc* src)
@@ -874,10 +865,7 @@ static void webKitWebSrcEnoughDataCb(GstAppSrc*, gpointer userData)
 
     GRefPtr<WebKitWebSrc> protector(src);
     priv->enoughDataSource.schedule("[WebKit] webKitWebSrcEnoughDataMainCb",
-        std::function<void()>(
-            [protector] {
-                webKitWebSrcEnoughDataMainCb(protector.get());
-            }));
+        std::function<void()>([protector] { webKitWebSrcEnoughDataMainCb(protector.get()); }));
 }
 
 static void webKitWebSrcSeekMainCb(WebKitWebSrc* src)
@@ -906,10 +894,7 @@ static gboolean webKitWebSrcSeekDataCb(GstAppSrc*, guint64 offset, gpointer user
 
     GRefPtr<WebKitWebSrc> protector(src);
     priv->seekSource.schedule("[WebKit] webKitWebSrcSeekMainCb",
-        std::function<void()>(
-            [protector] {
-                webKitWebSrcSeekMainCb(WEBKIT_WEB_SRC(protector.get()));
-            }));
+        std::function<void()>([protector] { webKitWebSrcSeekMainCb(WEBKIT_WEB_SRC(protector.get())); }));
     return TRUE;
 }