[GStreamer] remove WEBKIT_DEBUG support
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2016 14:41:42 +0000 (14:41 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2016 14:41:42 +0000 (14:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159553

Reviewed by Xabier Rodriguez-Calvar.

Remove the *_MEDIA_MESSAGE macros specific to the GStreamer
platform code and replace them with standard GST_DEBUG macros. In
Debug builds the WEBKIT_DEBUG=Media logs now only contain logs
related with the cross-platform Media element code. If GStreamer
logs are needed, the GST_DEBUG=webkit*:5 environment variable can
be used.

* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::play):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::duration):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::paused):
(WebCore::MediaPlayerPrivateGStreamer::newTextSample):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
(WebCore::MediaPlayerPrivateGStreamer::totalBytes):
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume):
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
(WebCore::MediaPlayerPrivateGStreamerOwr::play):
(WebCore::MediaPlayerPrivateGStreamerOwr::pause):
(WebCore::MediaPlayerPrivateGStreamerOwr::currentTime):
(WebCore::MediaPlayerPrivateGStreamerOwr::load):
(WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad):
(WebCore::MediaPlayerPrivateGStreamerOwr::stop):
(WebCore::MediaPlayerPrivateGStreamerOwr::createGSTAudioSinkBin):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackSettingsChanged):
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
(WebCore::TrackPrivateBaseGStreamer::getTag):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h
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/MediaPlayerPrivateGStreamerOwr.cpp
Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp

index 5cfb814..c9f8b0b 100644 (file)
@@ -1,3 +1,71 @@
+2016-07-11  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] remove WEBKIT_DEBUG support
+        https://bugs.webkit.org/show_bug.cgi?id=159553
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Remove the *_MEDIA_MESSAGE macros specific to the GStreamer
+        platform code and replace them with standard GST_DEBUG macros. In
+        Debug builds the WEBKIT_DEBUG=Media logs now only contain logs
+        related with the cross-platform Media element code. If GStreamer
+        logs are needed, the GST_DEBUG=webkit*:5 environment variable can
+        be used.
+
+        * platform/graphics/gstreamer/GStreamerUtilities.h:
+        * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
+        (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
+        (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
+        (WebCore::MediaPlayerPrivateGStreamer::load):
+        (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
+        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
+        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
+        (WebCore::MediaPlayerPrivateGStreamer::play):
+        (WebCore::MediaPlayerPrivateGStreamer::pause):
+        (WebCore::MediaPlayerPrivateGStreamer::duration):
+        (WebCore::MediaPlayerPrivateGStreamer::seek):
+        (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
+        (WebCore::MediaPlayerPrivateGStreamer::paused):
+        (WebCore::MediaPlayerPrivateGStreamer::newTextSample):
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+        (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
+        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
+        (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
+        (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded):
+        (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
+        (WebCore::MediaPlayerPrivateGStreamer::totalBytes):
+        (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
+        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
+        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
+        (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
+        (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
+        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
+        (WebCore::MediaPlayerPrivateGStreamerBase::setVolume):
+        (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
+        (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
+        (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
+        (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::play):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::pause):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::currentTime):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::load):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::stop):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::createGSTAudioSinkBin):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackSettingsChanged):
+        (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
+        * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
+        (WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
+        (WebCore::TrackPrivateBaseGStreamer::getTag):
+
 2016-07-11  Eric Carlson  <eric.carlson@apple.com>
 
         Add a test for media control dropoff
index f55d0b5..b235172 100644 (file)
 #include <gst/video/video-format.h>
 #include <gst/video/video-info.h>
 
-#define LOG_MEDIA_MESSAGE(...) do { \
-    GST_DEBUG(__VA_ARGS__); \
-    LOG_VERBOSE(Media, __VA_ARGS__); } while (0)
-
-#define ERROR_MEDIA_MESSAGE(...) do { \
-    GST_ERROR(__VA_ARGS__); \
-    LOG_VERBOSE(Media, __VA_ARGS__); } while (0)
-
-#define INFO_MEDIA_MESSAGE(...) do { \
-    GST_INFO(__VA_ARGS__); \
-    LOG_VERBOSE(Media, __VA_ARGS__); } while (0)
-
-#define WARN_MEDIA_MESSAGE(...) do { \
-    GST_WARNING(__VA_ARGS__); \
-    LOG_VERBOSE(Media, __VA_ARGS__); } while (0)
-
 namespace WebCore {
 
 class IntSize;
index 684295b..6b1ffab 100644 (file)
@@ -100,18 +100,18 @@ void InbandTextTrackPrivateGStreamer::notifyTrackOfSample()
         GRefPtr<GstSample> sample = samples[i];
         GstBuffer* buffer = gst_sample_get_buffer(sample.get());
         if (!buffer) {
-            WARN_MEDIA_MESSAGE("Track %d got sample with no buffer.", m_index);
+            GST_WARNING("Track %d got sample with no buffer.", m_index);
             continue;
         }
         GstMapInfo info;
         gboolean ret = gst_buffer_map(buffer, &info, GST_MAP_READ);
         ASSERT(ret);
         if (!ret) {
-            WARN_MEDIA_MESSAGE("Track %d unable to map buffer.", m_index);
+            GST_WARNING("Track %d unable to map buffer.", m_index);
             continue;
         }
 
-        INFO_MEDIA_MESSAGE("Track %d parsing sample: %.*s", m_index, static_cast<int>(info.size),
+        GST_INFO("Track %d parsing sample: %.*s", m_index, static_cast<int>(info.size),
             reinterpret_cast<char*>(info.data));
         client()->parseWebVTTCueData(this, reinterpret_cast<char*>(info.data), info.size);
         gst_buffer_unmap(buffer, &info);
@@ -127,7 +127,7 @@ void InbandTextTrackPrivateGStreamer::notifyTrackOfStreamChanged()
 
     const gchar* streamId;
     gst_event_parse_stream_start(event.get(), &streamId);
-    INFO_MEDIA_MESSAGE("Track %d got stream start for stream %s.", m_index, streamId);
+    GST_INFO("Track %d got stream start for stream %s.", m_index, streamId);
     m_streamId = streamId;
 }
 
index ee0d299..ec1dec1 100644 (file)
@@ -92,7 +92,7 @@ void MediaPlayerPrivateGStreamer::setAudioStreamProperties(GObject* object)
     g_object_set(object, "stream-properties", structure, NULL);
     gst_structure_free(structure);
     GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
-    LOG_MEDIA_MESSAGE("Set media.role as %s at %s", role, elementName.get());
+    GST_DEBUG("Set media.role as %s at %s", role, elementName.get());
 }
 
 void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar)
@@ -243,10 +243,10 @@ void MediaPlayerPrivateGStreamer::load(const String& urlString)
     m_url = URL(URL(), cleanURL);
     g_object_set(m_pipeline.get(), "uri", cleanURL.utf8().data(), nullptr);
 
-    INFO_MEDIA_MESSAGE("Load %s", cleanURL.utf8().data());
+    GST_INFO("Load %s", cleanURL.utf8().data());
 
     if (m_preload == MediaPlayer::None) {
-        LOG_MEDIA_MESSAGE("Delaying load.");
+        GST_DEBUG("Delaying load.");
         m_delayingLoad = true;
     }
 
@@ -282,7 +282,7 @@ void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate&)
 void MediaPlayerPrivateGStreamer::commitLoad()
 {
     ASSERT(!m_delayingLoad);
-    LOG_MEDIA_MESSAGE("Committing load.");
+    GST_DEBUG("Committing load.");
 
     // GStreamer needs to have the pipeline set to a paused state to
     // start providing anything useful.
@@ -315,7 +315,7 @@ float MediaPlayerPrivateGStreamer::playbackPosition() const
         gst_query_parse_position(query, 0, &position);
     gst_query_unref(query);
 
-    LOG_MEDIA_MESSAGE("Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
+    GST_DEBUG("Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
 
     float result = 0.0f;
     if (static_cast<GstClockTime>(position) != GST_CLOCK_TIME_NONE) {
@@ -342,12 +342,12 @@ bool MediaPlayerPrivateGStreamer::changePipelineState(GstState newState)
 
     gst_element_get_state(m_pipeline.get(), &currentState, &pending, 0);
     if (currentState == newState || pending == newState) {
-        LOG_MEDIA_MESSAGE("Rejected state change to %s from %s with %s pending", gst_element_state_get_name(newState),
+        GST_DEBUG("Rejected state change to %s from %s with %s pending", gst_element_state_get_name(newState),
             gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
         return true;
     }
 
-    LOG_MEDIA_MESSAGE("Changing state change to %s from %s with %s pending", gst_element_state_get_name(newState),
+    GST_DEBUG("Changing state change to %s from %s with %s pending", gst_element_state_get_name(newState),
         gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
 
     GstStateChangeReturn setStateResult = gst_element_set_state(m_pipeline.get(), newState);
@@ -392,7 +392,7 @@ void MediaPlayerPrivateGStreamer::play()
         m_delayingLoad = false;
         m_preload = MediaPlayer::Auto;
         setDownloadBuffering();
-        LOG_MEDIA_MESSAGE("Play");
+        GST_DEBUG("Play");
     } else {
         loadingFailed(MediaPlayer::Empty);
     }
@@ -407,7 +407,7 @@ void MediaPlayerPrivateGStreamer::pause()
         return;
 
     if (changePipelineState(GST_STATE_PAUSED))
-        INFO_MEDIA_MESSAGE("Pause");
+        GST_INFO("Pause");
     else
         loadingFailed(MediaPlayer::Empty);
 }
@@ -432,11 +432,11 @@ float MediaPlayerPrivateGStreamer::duration() const
 
     bool failure = !gst_element_query_duration(m_pipeline.get(), timeFormat, &timeLength) || static_cast<guint64>(timeLength) == GST_CLOCK_TIME_NONE;
     if (failure) {
-        LOG_MEDIA_MESSAGE("Time duration query failed for %s", m_url.string().utf8().data());
+        GST_DEBUG("Time duration query failed for %s", m_url.string().utf8().data());
         return numeric_limits<float>::infinity();
     }
 
-    LOG_MEDIA_MESSAGE("Duration: %" GST_TIME_FORMAT, GST_TIME_ARGS(timeLength));
+    GST_DEBUG("Duration: %" GST_TIME_FORMAT, GST_TIME_ARGS(timeLength));
 
     return static_cast<double>(timeLength) / GST_SECOND;
     // FIXME: handle 3.14.9.5 properly
@@ -472,7 +472,7 @@ void MediaPlayerPrivateGStreamer::seek(float time)
     if (m_errorOccured)
         return;
 
-    INFO_MEDIA_MESSAGE("[Seek] seek attempt to %f secs", time);
+    GST_INFO("[Seek] seek attempt to %f secs", time);
 
     // Avoid useless seeking.
     if (time == currentTime())
@@ -482,7 +482,7 @@ void MediaPlayerPrivateGStreamer::seek(float time)
         return;
 
     GstClockTime clockTime = toGstClockTime(time);
-    INFO_MEDIA_MESSAGE("[Seek] seeking to %" GST_TIME_FORMAT " (%f)", GST_TIME_ARGS(clockTime), time);
+    GST_INFO("[Seek] seeking to %" GST_TIME_FORMAT " (%f)", GST_TIME_ARGS(clockTime), time);
 
     if (m_seeking) {
         m_timeOfOverlappingSeek = time;
@@ -495,13 +495,13 @@ void MediaPlayerPrivateGStreamer::seek(float time)
     GstState state;
     GstStateChangeReturn getStateResult = gst_element_get_state(m_pipeline.get(), &state, nullptr, 0);
     if (getStateResult == GST_STATE_CHANGE_FAILURE || getStateResult == GST_STATE_CHANGE_NO_PREROLL) {
-        LOG_MEDIA_MESSAGE("[Seek] cannot seek, current state change is %s", gst_element_state_change_return_get_name(getStateResult));
+        GST_DEBUG("[Seek] cannot seek, current state change is %s", gst_element_state_change_return_get_name(getStateResult));
         return;
     }
     if (getStateResult == GST_STATE_CHANGE_ASYNC || state < GST_STATE_PAUSED || m_isEndReached) {
         m_seekIsPending = true;
         if (m_isEndReached) {
-            LOG_MEDIA_MESSAGE("[Seek] reset pipeline");
+            GST_DEBUG("[Seek] reset pipeline");
             m_resetPipeline = true;
             if (!changePipelineState(GST_STATE_PAUSED))
                 loadingFailed(MediaPlayer::Empty);
@@ -509,7 +509,7 @@ void MediaPlayerPrivateGStreamer::seek(float time)
     } else {
         // We can seek now.
         if (!doSeek(clockTime, m_player->rate(), static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE))) {
-            LOG_MEDIA_MESSAGE("[Seek] seeking to %f failed", time);
+            GST_DEBUG("[Seek] seeking to %f failed", time);
             return;
         }
     }
@@ -556,7 +556,7 @@ void MediaPlayerPrivateGStreamer::updatePlaybackRate()
     float currentPosition = static_cast<float>(playbackPosition() * GST_SECOND);
     bool mute = false;
 
-    INFO_MEDIA_MESSAGE("Set Rate to %f", m_playbackRate);
+    GST_INFO("Set Rate to %f", m_playbackRate);
 
     if (m_playbackRate > 0) {
         // Mute the sound if the playback rate is too extreme and
@@ -568,13 +568,13 @@ void MediaPlayerPrivateGStreamer::updatePlaybackRate()
         mute = true;
     }
 
-    INFO_MEDIA_MESSAGE("Need to mute audio?: %d", (int) mute);
+    GST_INFO("Need to mute audio?: %d", (int) mute);
     if (doSeek(currentPosition, m_playbackRate, static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH))) {
         g_object_set(m_pipeline.get(), "mute", mute, nullptr);
         m_lastPlaybackRate = m_playbackRate;
     } else {
         m_playbackRate = m_lastPlaybackRate;
-        ERROR_MEDIA_MESSAGE("Set rate to %f failed", m_playbackRate);
+        GST_ERROR("Set rate to %f failed", m_playbackRate);
     }
 
     if (m_playbackRatePause) {
@@ -594,7 +594,7 @@ void MediaPlayerPrivateGStreamer::updatePlaybackRate()
 bool MediaPlayerPrivateGStreamer::paused() const
 {
     if (m_isEndReached) {
-        LOG_MEDIA_MESSAGE("Ignoring pause at EOS");
+        GST_DEBUG("Ignoring pause at EOS");
         return true;
     }
 
@@ -774,9 +774,9 @@ void MediaPlayerPrivateGStreamer::newTextSample()
             }
         }
         if (!found)
-            WARN_MEDIA_MESSAGE("Got sample with unknown stream ID.");
+            GST_WARNING("Got sample with unknown stream ID.");
     } else
-        WARN_MEDIA_MESSAGE("Unable to handle sample with no stream start event.");
+        GST_WARNING("Unable to handle sample with no stream start event.");
 }
 #endif
 
@@ -896,7 +896,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
     // We ignore state changes from internal elements. They are forwarded to playbin2 anyway.
     bool messageSourceIsPlaybin = GST_MESSAGE_SRC(message) == reinterpret_cast<GstObject*>(m_pipeline.get());
 
-    LOG_MEDIA_MESSAGE("Message %s received from element %s", GST_MESSAGE_TYPE_NAME(message), GST_MESSAGE_SRC_NAME(message));
+    GST_DEBUG("Message %s received from element %s", GST_MESSAGE_TYPE_NAME(message), GST_MESSAGE_SRC_NAME(message));
     switch (GST_MESSAGE_TYPE(message)) {
     case GST_MESSAGE_ERROR:
         if (m_resetPipeline)
@@ -904,7 +904,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
         if (m_missingPluginsCallback)
             break;
         gst_message_parse_error(message, &err.outPtr(), &debug.outPtr());
-        ERROR_MEDIA_MESSAGE("Error %d: %s (url=%s)", err->code, err->message, m_url.string().utf8().data());
+        GST_ERROR("Error %d: %s (url=%s)", err->code, err->message, m_url.string().utf8().data());
 
         GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, "webkit-video.error");
 
@@ -920,7 +920,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
             // this case the HTMLMediaElement will emit a stalled
             // event.
             if (err->code == GST_STREAM_ERROR_TYPE_NOT_FOUND) {
-                ERROR_MEDIA_MESSAGE("Decode error, let the Media element emit a stalled event.");
+                GST_ERROR("Decode error, let the Media element emit a stalled event.");
                 break;
             }
             error = MediaPlayer::DecodeError;
@@ -966,7 +966,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
         gst_element_get_state(m_pipeline.get(), &currentState, nullptr, 250 * GST_NSECOND);
         if (requestedState < currentState) {
             GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(message)));
-            INFO_MEDIA_MESSAGE("Element %s requested state change to %s", elementName.get(),
+            GST_INFO("Element %s requested state change to %s", elementName.get(),
                 gst_element_state_get_name(requestedState));
             m_requestedState = requestedState;
             if (!changePipelineState(requestedState))
@@ -1041,7 +1041,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
         break;
     }
     default:
-        LOG_MEDIA_MESSAGE("Unhandled GStreamer message type: %s",
+        GST_DEBUG("Unhandled GStreamer message type: %s",
                     GST_MESSAGE_TYPE_NAME(message));
         break;
     }
@@ -1053,7 +1053,7 @@ void MediaPlayerPrivateGStreamer::processBufferingStats(GstMessage* message)
     m_buffering = true;
     gst_message_parse_buffering(message, &m_bufferingPercentage);
 
-    LOG_MEDIA_MESSAGE("[Buffering] Buffering: %d%%.", m_bufferingPercentage);
+    GST_DEBUG("[Buffering] Buffering: %d%%.", m_bufferingPercentage);
 
     updateStates();
 }
@@ -1178,7 +1178,7 @@ void MediaPlayerPrivateGStreamer::fillTimerFired()
     if (stop != -1)
         fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX;
 
-    LOG_MEDIA_MESSAGE("[Buffering] Download buffer filled up to %f%%", fillStatus);
+    GST_DEBUG("[Buffering] Download buffer filled up to %f%%", fillStatus);
 
     float mediaDuration = duration();
 
@@ -1189,7 +1189,7 @@ void MediaPlayerPrivateGStreamer::fillTimerFired()
             m_maxTimeLoaded = mediaDuration;
         else
             m_maxTimeLoaded = static_cast<float>((fillStatus * mediaDuration) / 100.0);
-        LOG_MEDIA_MESSAGE("[Buffering] Updated maxTimeLoaded: %f", m_maxTimeLoaded);
+        GST_DEBUG("[Buffering] Updated maxTimeLoaded: %f", m_maxTimeLoaded);
     }
 
     m_downloadFinished = fillStatus == 100.0;
@@ -1211,7 +1211,7 @@ float MediaPlayerPrivateGStreamer::maxTimeSeekable() const
         return 0.0f;
 
     float mediaDuration = duration();
-    LOG_MEDIA_MESSAGE("maxTimeSeekable, duration: %f", mediaDuration);
+    GST_DEBUG("maxTimeSeekable, duration: %f", mediaDuration);
     // infinite duration means live stream
     if (std::isinf(mediaDuration))
         return 0.0f;
@@ -1227,7 +1227,7 @@ float MediaPlayerPrivateGStreamer::maxTimeLoaded() const
     float loaded = m_maxTimeLoaded;
     if (m_isEndReached)
         loaded = duration();
-    LOG_MEDIA_MESSAGE("maxTimeLoaded: %f", loaded);
+    GST_DEBUG("maxTimeLoaded: %f", loaded);
     return loaded;
 }
 
@@ -1238,7 +1238,7 @@ bool MediaPlayerPrivateGStreamer::didLoadingProgress() const
     float currentMaxTimeLoaded = maxTimeLoaded();
     bool didLoadingProgress = currentMaxTimeLoaded != m_maxTimeLoadedAtLastDidLoadingProgress;
     m_maxTimeLoadedAtLastDidLoadingProgress = currentMaxTimeLoaded;
-    LOG_MEDIA_MESSAGE("didLoadingProgress: %d", didLoadingProgress);
+    GST_DEBUG("didLoadingProgress: %d", didLoadingProgress);
     return didLoadingProgress;
 }
 
@@ -1256,7 +1256,7 @@ unsigned long long MediaPlayerPrivateGStreamer::totalBytes() const
     GstFormat fmt = GST_FORMAT_BYTES;
     gint64 length = 0;
     if (gst_element_query_duration(m_source.get(), fmt, &length)) {
-        INFO_MEDIA_MESSAGE("totalBytes %" G_GINT64_FORMAT, length);
+        GST_INFO("totalBytes %" G_GINT64_FORMAT, length);
         m_totalBytes = static_cast<unsigned long long>(length);
         m_isStreaming = !length;
         return m_totalBytes;
@@ -1291,7 +1291,7 @@ unsigned long long MediaPlayerPrivateGStreamer::totalBytes() const
 
     gst_iterator_free(iter);
 
-    INFO_MEDIA_MESSAGE("totalBytes %" G_GINT64_FORMAT, length);
+    GST_INFO("totalBytes %" G_GINT64_FORMAT, length);
     m_totalBytes = static_cast<unsigned long long>(length);
     m_isStreaming = !length;
     return m_totalBytes;
@@ -1334,7 +1334,7 @@ void MediaPlayerPrivateGStreamer::asyncStateChangeDone()
         if (m_seekIsPending)
             updateStates();
         else {
-            LOG_MEDIA_MESSAGE("[Seek] seeked to %f", m_seekTime);
+            GST_DEBUG("[Seek] seeked to %f", m_seekTime);
             m_seeking = false;
             if (m_timeOfOverlappingSeek != m_seekTime && m_timeOfOverlappingSeek != -1) {
                 seek(m_timeOfOverlappingSeek);
@@ -1370,7 +1370,7 @@ void MediaPlayerPrivateGStreamer::updateStates()
     bool shouldUpdatePlaybackState = false;
     switch (getStateResult) {
     case GST_STATE_CHANGE_SUCCESS: {
-        LOG_MEDIA_MESSAGE("State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
+        GST_DEBUG("State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
 
         // Do nothing if on EOS and state changed to READY to avoid recreating the player
         // on HTMLMediaElement and properly generate the video 'ended' event.
@@ -1395,7 +1395,7 @@ void MediaPlayerPrivateGStreamer::updateStates()
         case GST_STATE_PLAYING:
             if (m_buffering) {
                 if (m_bufferingPercentage == 100) {
-                    LOG_MEDIA_MESSAGE("[Buffering] Complete.");
+                    GST_DEBUG("[Buffering] Complete.");
                     m_buffering = false;
                     m_readyState = MediaPlayer::HaveEnoughData;
                     m_networkState = m_downloadFinished ? MediaPlayer::Idle : MediaPlayer::Loading;
@@ -1426,14 +1426,14 @@ void MediaPlayerPrivateGStreamer::updateStates()
             }
 
             if (didBuffering && !m_buffering && !m_paused && m_playbackRate) {
-                LOG_MEDIA_MESSAGE("[Buffering] Restarting playback.");
+                GST_DEBUG("[Buffering] Restarting playback.");
                 changePipelineState(GST_STATE_PLAYING);
             }
         } else if (state == GST_STATE_PLAYING) {
             m_paused = false;
 
             if ((m_buffering && !isLiveStream()) || !m_playbackRate) {
-                LOG_MEDIA_MESSAGE("[Buffering] Pausing stream for buffering.");
+                GST_DEBUG("[Buffering] Pausing stream for buffering.");
                 changePipelineState(GST_STATE_PAUSED);
             }
         } else
@@ -1441,21 +1441,21 @@ void MediaPlayerPrivateGStreamer::updateStates()
 
         if (m_requestedState == GST_STATE_PAUSED && state == GST_STATE_PAUSED) {
             shouldUpdatePlaybackState = true;
-            LOG_MEDIA_MESSAGE("Requested state change to %s was completed", gst_element_state_get_name(state));
+            GST_DEBUG("Requested state change to %s was completed", gst_element_state_get_name(state));
         }
 
         break;
     }
     case GST_STATE_CHANGE_ASYNC:
-        LOG_MEDIA_MESSAGE("Async: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
+        GST_DEBUG("Async: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
         // Change in progress.
         break;
     case GST_STATE_CHANGE_FAILURE:
-        LOG_MEDIA_MESSAGE("Failure: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
+        GST_DEBUG("Failure: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
         // Change failed
         return;
     case GST_STATE_CHANGE_NO_PREROLL:
-        LOG_MEDIA_MESSAGE("No preroll: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
+        GST_DEBUG("No preroll: State: %s, pending: %s", gst_element_state_get_name(state), gst_element_state_get_name(pending));
 
         // Live pipelines go in PAUSED without prerolling.
         m_isStreaming = true;
@@ -1475,7 +1475,7 @@ void MediaPlayerPrivateGStreamer::updateStates()
         m_networkState = MediaPlayer::Loading;
         break;
     default:
-        LOG_MEDIA_MESSAGE("Else : %d", getStateResult);
+        GST_DEBUG("Else : %d", getStateResult);
         break;
     }
 
@@ -1485,22 +1485,22 @@ void MediaPlayerPrivateGStreamer::updateStates()
         m_player->playbackStateChanged();
 
     if (m_networkState != oldNetworkState) {
-        LOG_MEDIA_MESSAGE("Network State Changed from %u to %u", oldNetworkState, m_networkState);
+        GST_DEBUG("Network State Changed from %u to %u", oldNetworkState, m_networkState);
         m_player->networkStateChanged();
     }
     if (m_readyState != oldReadyState) {
-        LOG_MEDIA_MESSAGE("Ready State Changed from %u to %u", oldReadyState, m_readyState);
+        GST_DEBUG("Ready State Changed from %u to %u", oldReadyState, m_readyState);
         m_player->readyStateChanged();
     }
 
     if (getStateResult == GST_STATE_CHANGE_SUCCESS && state >= GST_STATE_PAUSED) {
         updatePlaybackRate();
         if (m_seekIsPending) {
-            LOG_MEDIA_MESSAGE("[Seek] committing pending seek to %f", m_seekTime);
+            GST_DEBUG("[Seek] committing pending seek to %f", m_seekTime);
             m_seekIsPending = false;
             m_seeking = doSeek(toGstClockTime(m_seekTime), m_player->rate(), static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE));
             if (!m_seeking)
-                LOG_MEDIA_MESSAGE("[Seek] seeking to %f failed", m_seekTime);
+                GST_DEBUG("[Seek] seeking to %f failed", m_seekTime);
         }
     }
 }
@@ -1567,7 +1567,7 @@ bool MediaPlayerPrivateGStreamer::loadNextLocation()
 
         RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
         if (securityOrigin->canRequest(newUrl)) {
-            INFO_MEDIA_MESSAGE("New media url: %s", newUrl.string().utf8().data());
+            GST_INFO("New media url: %s", newUrl.string().utf8().data());
 
             // Reset player states.
             m_networkState = MediaPlayer::Loading;
@@ -1589,7 +1589,7 @@ bool MediaPlayerPrivateGStreamer::loadNextLocation()
                 return true;
             }
         } else
-            INFO_MEDIA_MESSAGE("Not allowed to load new media location: %s", newUrl.string().utf8().data());
+            GST_INFO("Not allowed to load new media location: %s", newUrl.string().utf8().data());
     }
     m_mediaLocationCurrentIndex--;
     return false;
@@ -1818,11 +1818,11 @@ void MediaPlayerPrivateGStreamer::setDownloadBuffering()
 
     bool shouldDownload = !isLiveStream() && m_preload == MediaPlayer::Auto;
     if (shouldDownload) {
-        LOG_MEDIA_MESSAGE("Enabling on-disk buffering");
+        GST_DEBUG("Enabling on-disk buffering");
         g_object_set(m_pipeline.get(), "flags", flags | flagDownload, nullptr);
         m_fillTimer.startRepeating(0.2);
     } else {
-        LOG_MEDIA_MESSAGE("Disabling on-disk buffering");
+        GST_DEBUG("Disabling on-disk buffering");
         g_object_set(m_pipeline.get(), "flags", flags & ~flagDownload, nullptr);
         m_fillTimer.stop();
     }
@@ -1846,7 +1846,7 @@ GstElement* MediaPlayerPrivateGStreamer::createAudioSink()
 {
     m_autoAudioSink = gst_element_factory_make("autoaudiosink", 0);
     if (!m_autoAudioSink) {
-        WARN_MEDIA_MESSAGE("GStreamer's autoaudiosink not found. Please check your gst-plugins-good installation");
+        GST_WARNING("GStreamer's autoaudiosink not found. Please check your gst-plugins-good installation");
         return nullptr;
     }
 
@@ -1869,7 +1869,7 @@ GstElement* MediaPlayerPrivateGStreamer::createAudioSink()
     if (m_preservesPitch) {
         GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
         if (!scale) {
-            WARN_MEDIA_MESSAGE("Failed to create scaletempo");
+            GST_WARNING("Failed to create scaletempo");
             return m_autoAudioSink.get();
         }
 
@@ -1887,7 +1887,7 @@ GstElement* MediaPlayerPrivateGStreamer::createAudioSink()
         gst_bin_add_many(GST_BIN(audioSinkBin), convert, resample, m_autoAudioSink.get(), nullptr);
 
         if (!gst_element_link_many(scale, convert, resample, m_autoAudioSink.get(), nullptr)) {
-            WARN_MEDIA_MESSAGE("Failed to link audio sink elements");
+            GST_WARNING("Failed to link audio sink elements");
             gst_object_unref(audioSinkBin);
             return m_autoAudioSink.get();
         }
@@ -1973,7 +1973,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
         GstElement* scale = gst_element_factory_make("scaletempo", 0);
 
         if (!scale)
-            WARN_MEDIA_MESSAGE("Failed to create scaletempo");
+            GST_WARNING("Failed to create scaletempo");
         else
             g_object_set(m_pipeline.get(), "audio-filter", scale, nullptr);
     }
index 07830c7..f7979b4 100644 (file)
@@ -306,8 +306,8 @@ FloatSize MediaPlayerPrivateGStreamerBase::naturalSize() const
     }
 #endif
 
-    LOG_MEDIA_MESSAGE("Original video size: %dx%d", originalSize.width(), originalSize.height());
-    LOG_MEDIA_MESSAGE("Pixel aspect ratio: %d/%d", pixelAspectRatioNumerator, pixelAspectRatioDenominator);
+    GST_DEBUG("Original video size: %dx%d", originalSize.width(), originalSize.height());
+    GST_DEBUG("Pixel aspect ratio: %d/%d", pixelAspectRatioNumerator, pixelAspectRatioDenominator);
 
     // Calculate DAR based on PAR and video size.
     int displayWidth = originalSize.width() * pixelAspectRatioNumerator;
@@ -321,20 +321,20 @@ FloatSize MediaPlayerPrivateGStreamerBase::naturalSize() const
     // Apply DAR to original video size. This is the same behavior as in xvimagesink's setcaps function.
     guint64 width = 0, height = 0;
     if (!(originalSize.height() % displayHeight)) {
-        LOG_MEDIA_MESSAGE("Keeping video original height");
+        GST_DEBUG("Keeping video original height");
         width = gst_util_uint64_scale_int(originalSize.height(), displayWidth, displayHeight);
         height = static_cast<guint64>(originalSize.height());
     } else if (!(originalSize.width() % displayWidth)) {
-        LOG_MEDIA_MESSAGE("Keeping video original width");
+        GST_DEBUG("Keeping video original width");
         height = gst_util_uint64_scale_int(originalSize.width(), displayHeight, displayWidth);
         width = static_cast<guint64>(originalSize.width());
     } else {
-        LOG_MEDIA_MESSAGE("Approximating while keeping original video height");
+        GST_DEBUG("Approximating while keeping original video height");
         width = gst_util_uint64_scale_int(originalSize.height(), displayWidth, displayHeight);
         height = static_cast<guint64>(originalSize.height());
     }
 
-    LOG_MEDIA_MESSAGE("Natural size: %" G_GUINT64_FORMAT "x%" G_GUINT64_FORMAT, width, height);
+    GST_DEBUG("Natural size: %" G_GUINT64_FORMAT "x%" G_GUINT64_FORMAT, width, height);
     m_videoSize = FloatSize(static_cast<int>(width), static_cast<int>(height));
     return m_videoSize;
 }
@@ -344,7 +344,7 @@ void MediaPlayerPrivateGStreamerBase::setVolume(float volume)
     if (!m_volumeElement)
         return;
 
-    LOG_MEDIA_MESSAGE("Setting volume: %f", volume);
+    GST_DEBUG("Setting volume: %f", volume);
     gst_stream_volume_set_volume(m_volumeElement.get(), GST_STREAM_VOLUME_FORMAT_CUBIC, static_cast<double>(volume));
 }
 
@@ -373,7 +373,7 @@ void MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange()
 void MediaPlayerPrivateGStreamerBase::volumeChangedCallback(MediaPlayerPrivateGStreamerBase* player)
 {
     // This is called when m_volumeElement receives the notify::volume signal.
-    LOG_MEDIA_MESSAGE("Volume changed to: %f", player->volume());
+    GST_DEBUG("Volume changed to: %f", player->volume());
 
     player->m_notifier.notify(MainThreadNotification::VolumeChanged, [player] { player->notifyPlayerOfVolumeChange(); });
 }
@@ -550,7 +550,7 @@ void MediaPlayerPrivateGStreamerBase::triggerRepaint(GstSample* sample)
     }
 
     if (triggerResize) {
-        LOG_MEDIA_MESSAGE("First sample reached the sink, triggering video dimensions update");
+        GST_DEBUG("First sample reached the sink, triggering video dimensions update");
         if (isMainThread())
             m_player->sizeChanged();
         else {
@@ -821,7 +821,7 @@ GstElement* MediaPlayerPrivateGStreamerBase::createVideoSinkGL()
     GstElement* colorconvert = gst_element_factory_make("glcolorconvert", nullptr);
 
     if (!upload || !colorconvert) {
-        WARN_MEDIA_MESSAGE("Failed to create GstGL elements");
+        GST_WARNING("Failed to create GstGL elements");
         gst_object_unref(videoSink);
 
         if (upload)
@@ -850,7 +850,7 @@ GstElement* MediaPlayerPrivateGStreamerBase::createVideoSinkGL()
         g_signal_connect(appsink, "new-sample", G_CALLBACK(newSampleCallback), this);
         g_signal_connect(appsink, "new-preroll", G_CALLBACK(newPrerollCallback), this);
     } else {
-        WARN_MEDIA_MESSAGE("Failed to link GstGL elements");
+        GST_WARNING("Failed to link GstGL elements");
         gst_object_unref(videoSink);
         videoSink = nullptr;
     }
@@ -906,12 +906,12 @@ void MediaPlayerPrivateGStreamerBase::setStreamVolumeElement(GstStreamVolume* vo
     // We don't set the initial volume because we trust the sink to keep it for us. See
     // https://bugs.webkit.org/show_bug.cgi?id=118974 for more information.
     if (!m_player->platformVolumeConfigurationRequired()) {
-        LOG_MEDIA_MESSAGE("Setting stream volume to %f", m_player->volume());
+        GST_DEBUG("Setting stream volume to %f", m_player->volume());
         g_object_set(m_volumeElement.get(), "volume", m_player->volume(), NULL);
     } else
-        LOG_MEDIA_MESSAGE("Not setting stream volume, trusting system one");
+        GST_DEBUG("Not setting stream volume, trusting system one");
 
-    LOG_MEDIA_MESSAGE("Setting stream muted %d",  m_player->muted());
+    GST_DEBUG("Setting stream muted %d",  m_player->muted());
     g_object_set(m_volumeElement.get(), "mute", m_player->muted(), NULL);
 
     g_signal_connect_swapped(m_volumeElement.get(), "notify::volume", G_CALLBACK(volumeChangedCallback), this);
index ba72c54..155ee36 100644 (file)
@@ -50,7 +50,7 @@ MediaPlayerPrivateGStreamerOwr::MediaPlayerPrivateGStreamerOwr(MediaPlayer* play
 
 MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr()
 {
-    LOG_MEDIA_MESSAGE("Destroying");
+    GST_TRACE("Destroying");
 
     if (hasAudio())
         m_audioTrack->removeObserver(*this);
@@ -62,7 +62,7 @@ MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr()
 
 void MediaPlayerPrivateGStreamerOwr::play()
 {
-    LOG_MEDIA_MESSAGE("Play");
+    GST_DEBUG("Play");
 
     if (!m_streamPrivate || !m_streamPrivate->active()) {
         m_readyState = MediaPlayer::HaveNothing;
@@ -76,7 +76,7 @@ void MediaPlayerPrivateGStreamerOwr::play()
 
 void MediaPlayerPrivateGStreamerOwr::pause()
 {
-    LOG_MEDIA_MESSAGE("Pause");
+    GST_DEBUG("Pause");
     m_paused = true;
     stop();
 }
@@ -105,7 +105,7 @@ float MediaPlayerPrivateGStreamerOwr::currentTime() const
     if (static_cast<GstClockTime>(position) != GST_CLOCK_TIME_NONE)
         result = static_cast<double>(position) / GST_SECOND;
 
-    LOG_MEDIA_MESSAGE("Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
+    GST_DEBUG("Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
     gst_query_unref(query);
 
     return result;
@@ -138,7 +138,7 @@ void MediaPlayerPrivateGStreamerOwr::load(MediaStreamPrivate& streamPrivate)
     if (!m_audioSink)
         createGSTAudioSinkBin();
 
-    LOG_MEDIA_MESSAGE("Loading MediaStreamPrivate %p", &streamPrivate);
+    GST_DEBUG("Loading MediaStreamPrivate %p", &streamPrivate);
 
     m_streamPrivate = &streamPrivate;
     if (!m_streamPrivate->active()) {
@@ -191,11 +191,11 @@ bool MediaPlayerPrivateGStreamerOwr::internalLoad()
         return false;
     }
 
-    LOG_MEDIA_MESSAGE("Connecting to live stream, descriptor: %p", m_streamPrivate.get());
+    GST_DEBUG("Connecting to live stream, descriptor: %p", m_streamPrivate.get());
 
     for (auto track : m_streamPrivate->tracks()) {
         if (!track->enabled()) {
-            LOG_MEDIA_MESSAGE("Track %s disabled", track->label().ascii().data());
+            GST_DEBUG("Track %s disabled", track->label().ascii().data());
             continue;
         }
 
@@ -222,7 +222,7 @@ bool MediaPlayerPrivateGStreamerOwr::internalLoad()
             track->addObserver(*this);
             break;
         case RealtimeMediaSource::None:
-            WARN_MEDIA_MESSAGE("Loading a track with None type");
+            GST_WARNING("Loading a track with None type");
         }
     }
 
@@ -238,11 +238,11 @@ void MediaPlayerPrivateGStreamerOwr::stop()
 
     m_stopped = true;
     if (m_audioTrack) {
-        LOG_MEDIA_MESSAGE("Stop: disconnecting audio");
+        GST_DEBUG("Stop: disconnecting audio");
         g_object_set(m_audioRenderer.get(), "disabled", TRUE, nullptr);
     }
     if (m_videoTrack) {
-        LOG_MEDIA_MESSAGE("Stop: disconnecting video");
+        GST_DEBUG("Stop: disconnecting video");
         g_object_set(m_videoRenderer.get(), "disabled", TRUE, nullptr);
     }
 }
@@ -286,7 +286,7 @@ bool MediaPlayerPrivateGStreamerOwr::initializeGStreamerAndGStreamerDebugging()
 void MediaPlayerPrivateGStreamerOwr::createGSTAudioSinkBin()
 {
     ASSERT(!m_audioSink);
-    LOG_MEDIA_MESSAGE("Creating audio sink");
+    GST_DEBUG("Creating audio sink");
     // FIXME: volume/mute support: https://webkit.org/b/153828.
 
     GRefPtr<GstElement> sink = gst_element_factory_make("autoaudiosink", 0);
@@ -299,7 +299,7 @@ void MediaPlayerPrivateGStreamerOwr::createGSTAudioSinkBin()
 
 void MediaPlayerPrivateGStreamerOwr::trackEnded(MediaStreamTrackPrivate& track)
 {
-    LOG_MEDIA_MESSAGE("Track ended");
+    GST_DEBUG("Track ended");
 
     if (!m_streamPrivate || !m_streamPrivate->active()) {
         stop();
@@ -314,17 +314,17 @@ void MediaPlayerPrivateGStreamerOwr::trackEnded(MediaStreamTrackPrivate& track)
 
 void MediaPlayerPrivateGStreamerOwr::trackMutedChanged(MediaStreamTrackPrivate&)
 {
-    LOG_MEDIA_MESSAGE("Track muted state changed");
+    GST_DEBUG("Track muted state changed");
 }
 
 void MediaPlayerPrivateGStreamerOwr::trackSettingsChanged(MediaStreamTrackPrivate&)
 {
-    LOG_MEDIA_MESSAGE("Track settings changed");
+    GST_DEBUG("Track settings changed");
 }
 
 void MediaPlayerPrivateGStreamerOwr::trackEnabledChanged(MediaStreamTrackPrivate&)
 {
-    LOG_MEDIA_MESSAGE("Track enabled changed");
+    GST_DEBUG("Track enabled changed");
 }
 
 GstElement* MediaPlayerPrivateGStreamerOwr::createVideoSink()
index 5684b9c..7f75988 100644 (file)
@@ -114,7 +114,7 @@ bool TrackPrivateBaseGStreamer::getLanguageCode(GstTagList* tags, AtomicString&
     String language;
     if (getTag(tags, GST_TAG_LANGUAGE_CODE, language)) {
         language = gst_tag_get_language_code_iso_639_1(language.utf8().data());
-        INFO_MEDIA_MESSAGE("Converted track %d's language code to %s.", m_index, language.utf8().data());
+        GST_INFO("Converted track %d's language code to %s.", m_index, language.utf8().data());
         if (language != value) {
             value = language;
             return true;
@@ -128,7 +128,7 @@ bool TrackPrivateBaseGStreamer::getTag(GstTagList* tags, const gchar* tagName, S
 {
     GUniqueOutPtr<gchar> tagValue;
     if (gst_tag_list_get_string(tags, tagName, &tagValue.outPtr())) {
-        INFO_MEDIA_MESSAGE("Track %d got %s %s.", m_index, tagName, tagValue.get());
+        GST_INFO("Track %d got %s %s.", m_index, tagName, tagValue.get());
         value = tagValue.get();
         return true;
     }