Log Message
[GStreamer] Fix style issue in MediaPlayerPrivateGStreamer https://bugs.webkit.org/show_bug.cgi?id=185479
Patch by Thibault Saunier <[email protected]> on 2018-05-09 Reviewed by Philippe Normand. 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231580 => 231581)
--- trunk/Source/WebCore/ChangeLog 2018-05-09 19:00:28 UTC (rev 231580)
+++ trunk/Source/WebCore/ChangeLog 2018-05-09 19:01:44 UTC (rev 231581)
@@ -1,3 +1,35 @@
+2018-05-09 Thibault Saunier <[email protected]>
+
+ [GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
+ https://bugs.webkit.org/show_bug.cgi?id=185479
+
+ Reviewed by Philippe Normand.
+
+ 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 Daniel Bates <[email protected]>
REGRESSION (r231479): com.apple.WebCore crash in WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied()
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (231580 => 231581)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-05-09 19:00:28 UTC (rev 231580)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-05-09 19:01:44 UTC (rev 231581)
@@ -108,9 +108,10 @@
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 @@
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 @@
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 @@
m_preload = MediaPlayer::Auto;
setDownloadBuffering();
GST_INFO("Play");
- } else {
+ } else
loadingFailed(MediaPlayer::Empty);
- }
}
void MediaPlayerPrivateGStreamer::pause()
@@ -775,7 +775,9 @@
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::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::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 @@
#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 @@
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);
@@ -2005,8 +2015,7 @@
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) {
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
