WebKit Bugzilla
Attachment 339990 Details for
Bug 185479
: [GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
GStreamer-Fix-style-issue-in-MediaPlayerPrivateGSt.patch (text/plain), 10.80 KB, created by
Thibault Saunier
on 2018-05-09 11:17:31 PDT
(
hide
)
Description:
[GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
Filename:
MIME Type:
Creator:
Thibault Saunier
Created:
2018-05-09 11:17:31 PDT
Size:
10.80 KB
patch
obsolete
>From 5fad9a73638a94e8b734b1c39617db62a81a0e8e Mon Sep 17 00:00:00 2001 >From: Thibault Saunier <tsaunier@igalia.com> >Date: Thu, 3 May 2018 12:05:14 +0200 >Subject: [PATCH xserver] [GStreamer] Fix style issue in > MediaPlayerPrivateGStreamer > >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:114: Multi line control clauses should use braces. [whitespace/braces] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:194: Multi line control clauses should use braces. [whitespace/braces] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:398: One line control clauses should not use braces. [whitespace/braces] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:440: One line control clauses should not use braces. [whitespace/braces] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:806: More than one command on the same line [whitespace/newline] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:869: More than one command on the same line [whitespace/newline] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:880: More than one command on the same line [whitespace/newline] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:940: More than one command on the same line [whitespace/newline] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1102: Multi line control clauses should use braces. [whitespace/braces] [4] >ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1109: Multi line control clauses should use braces. [whitespace/braces] [4] > >https://bugs.webkit.org/show_bug.cgi?id=185479 >--- > Source/WebCore/ChangeLog | 32 ++++++++++++++++ > .../gstreamer/MediaPlayerPrivateGStreamer.cpp | 37 ++++++++++++------- > 2 files changed, 55 insertions(+), 14 deletions(-) > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 980634c1a88..5aea2dd3296 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,35 @@ >+2018-05-09 Thibault Saunier <tsaunier@igalia.com> >+ >+ [GStreamer] Fix style issue in MediaPlayerPrivateGStreamer >+ https://bugs.webkit.org/show_bug.cgi?id=185479 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:114: Multi line control clauses should use braces. [whitespace/braces] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:194: Multi line control clauses should use braces. [whitespace/braces] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:398: One line control clauses should not use braces. [whitespace/braces] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:440: One line control clauses should not use braces. [whitespace/braces] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:806: More than one command on the same line [whitespace/newline] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:869: More than one command on the same line [whitespace/newline] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:880: More than one command on the same line [whitespace/newline] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:940: More than one command on the same line [whitespace/newline] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1102: Multi line control clauses should use braces. [whitespace/braces] [4] >+ ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1109: Multi line control clauses should use braces. [whitespace/braces] [4] >+ >+ Indentation and style issue fixed only. >+ >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: >+ (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): >+ (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): >+ (WebCore::MediaPlayerPrivateGStreamer::changePipelineState): >+ (WebCore::MediaPlayerPrivateGStreamer::play): >+ (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback): >+ (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback): >+ (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback): >+ (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback): >+ (WebCore::MediaPlayerPrivateGStreamer::buffered const): >+ (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): >+ > 2018-05-09 Yacine Bandou <yacine.bandou_ext@softathome.com> > > [EME][GStreamer] Crash when the mediaKeys are created before loading the media in debug conf >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 36a95262ef4..2d199b8eda8 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -108,9 +108,10 @@ void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object) > > void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar) > { >- if (isAvailable()) >+ if (isAvailable()) { > registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateGStreamer>(player); }, > getSupportedTypes, supportsType, nullptr, nullptr, nullptr, supportsKeySystem); >+ } > } > > bool MediaPlayerPrivateGStreamer::isAvailable() >@@ -188,9 +189,10 @@ MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() > if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get())) > g_signal_handlers_disconnect_by_func(GST_ELEMENT_PARENT(m_source.get()), reinterpret_cast<gpointer>(uriDecodeBinElementAddedCallback), this); > >- if (m_autoAudioSink) >+ if (m_autoAudioSink) { > g_signal_handlers_disconnect_by_func(G_OBJECT(m_autoAudioSink.get()), > reinterpret_cast<gpointer>(setAudioStreamPropertiesCallback), this); >+ } > > m_readyTimerHandler.stop(); > for (auto& missingPluginCallback : m_missingPluginCallbacks) { >@@ -375,9 +377,8 @@ bool MediaPlayerPrivateGStreamer::changePipelineState(GstState newState) > > GstStateChangeReturn setStateResult = gst_element_set_state(m_pipeline.get(), newState); > GstState pausedOrPlaying = newState == GST_STATE_PLAYING ? GST_STATE_PAUSED : GST_STATE_PLAYING; >- if (currentState != pausedOrPlaying && setStateResult == GST_STATE_CHANGE_FAILURE) { >+ if (currentState != pausedOrPlaying && setStateResult == GST_STATE_CHANGE_FAILURE) > return false; >- } > > // Create a timer when entering the READY state so that we can free resources > // if we stay for too long on READY. >@@ -417,9 +418,8 @@ void MediaPlayerPrivateGStreamer::play() > m_preload = MediaPlayer::Auto; > setDownloadBuffering(); > GST_INFO("Play"); >- } else { >+ } else > loadingFailed(MediaPlayer::Empty); >- } > } > > void MediaPlayerPrivateGStreamer::pause() >@@ -775,7 +775,9 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy > > void MediaPlayerPrivateGStreamer::videoChangedCallback(MediaPlayerPrivateGStreamer* player) > { >- player->m_notifier->notify(MainThreadNotification::VideoChanged, [player] { player->notifyPlayerOfVideo(); }); >+ player->m_notifier->notify(MainThreadNotification::VideoChanged, [player] { >+ player->notifyPlayerOfVideo(); >+ }); > } > > void MediaPlayerPrivateGStreamer::notifyPlayerOfVideo() >@@ -838,7 +840,9 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfVideo() > > void MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback(MediaPlayerPrivateGStreamer* player) > { >- player->m_notifier->notify(MainThreadNotification::VideoCapsChanged, [player] { player->notifyPlayerOfVideoCaps(); }); >+ player->m_notifier->notify(MainThreadNotification::VideoCapsChanged, [player] { >+ player->notifyPlayerOfVideoCaps(); >+ }); > } > > void MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps() >@@ -849,7 +853,9 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps() > > void MediaPlayerPrivateGStreamer::audioChangedCallback(MediaPlayerPrivateGStreamer* player) > { >- player->m_notifier->notify(MainThreadNotification::AudioChanged, [player] { player->notifyPlayerOfAudio(); }); >+ player->m_notifier->notify(MainThreadNotification::AudioChanged, [player] { >+ player->notifyPlayerOfAudio(); >+ }); > } > > void MediaPlayerPrivateGStreamer::notifyPlayerOfAudio() >@@ -909,7 +915,9 @@ void MediaPlayerPrivateGStreamer::notifyPlayerOfAudio() > #if ENABLE(VIDEO_TRACK) > void MediaPlayerPrivateGStreamer::textChangedCallback(MediaPlayerPrivateGStreamer* player) > { >- player->m_notifier->notify(MainThreadNotification::TextChanged, [player] { player->notifyPlayerOfText(); }); >+ player->m_notifier->notify(MainThreadNotification::TextChanged, [player] { >+ player->notifyPlayerOfText(); >+ }); > } > > void MediaPlayerPrivateGStreamer::notifyPlayerOfText() >@@ -1071,16 +1079,18 @@ std::unique_ptr<PlatformTimeRanges> MediaPlayerPrivateGStreamer::buffered() cons > guint numBufferingRanges = gst_query_get_n_buffering_ranges(query); > for (guint index = 0; index < numBufferingRanges; index++) { > gint64 rangeStart = 0, rangeStop = 0; >- if (gst_query_parse_nth_buffering_range(query, index, &rangeStart, &rangeStop)) >+ if (gst_query_parse_nth_buffering_range(query, index, &rangeStart, &rangeStop)) { > timeRanges->add(MediaTime(rangeStart * toGstUnsigned64Time(mediaDuration) / GST_FORMAT_PERCENT_MAX, GST_SECOND), > MediaTime(rangeStop * toGstUnsigned64Time(mediaDuration) / GST_FORMAT_PERCENT_MAX, GST_SECOND)); >+ } > } > > // Fallback to the more general maxTimeLoaded() if no range has > // been found. >- if (!timeRanges->length()) >+ if (!timeRanges->length()) { > if (MediaTime loaded = maxTimeLoaded()) > timeRanges->add(MediaTime::zeroTime(), loaded); >+ } > > gst_query_unref(query); > >@@ -2004,8 +2014,7 @@ bool MediaPlayerPrivateGStreamer::loadNextLocation() > return false; > } > >- const GValue* location = gst_value_list_get_value(locations, >- m_mediaLocationCurrentIndex); >+ const GValue* location = gst_value_list_get_value(locations, m_mediaLocationCurrentIndex); > const GstStructure* structure = gst_value_get_structure(location); > > if (!structure) { >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185479
: 339990