Changeset 238396 in webkit


Ignore:
Timestamp:
Nov 20, 2018 7:30:22 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] Enhance debugging by making sure to print the pipeline in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=191586

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-11-20
Reviewed by Xabier Rodriguez-Calvar.

This is minor changes that do not require tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::commitLoad):
(WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
(WebCore::MediaPlayerPrivateGStreamer::play):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::paused const):
(WebCore::MediaPlayerPrivateGStreamer::enableTrack):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
(WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
(WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback):
(WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
(WebCore::MediaPlayerPrivateGStreamer::setPreload):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r238395 r238396  
     12018-11-20  Thibault Saunier  <tsaunier@igalia.com>
     2
     3        [GStreamer] Enhance debugging by making sure to print the pipeline in MediaPlayerPrivateGStreamer
     4        https://bugs.webkit.org/show_bug.cgi?id=191586
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        This is minor changes that do not require tests.
     9
     10        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     11        (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
     12        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
     13        (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
     14        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
     15        (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
     16        (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
     17        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
     18        (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
     19        (WebCore::MediaPlayerPrivateGStreamer::play):
     20        (WebCore::MediaPlayerPrivateGStreamer::pause):
     21        (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
     22        (WebCore::MediaPlayerPrivateGStreamer::seek):
     23        (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
     24        (WebCore::MediaPlayerPrivateGStreamer::paused const):
     25        (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
     26        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
     27        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
     28        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
     29        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
     30        (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
     31        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
     32        (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
     33        (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
     34        (WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
     35        (WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback):
     36        (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
     37        (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
     38        (WebCore::MediaPlayerPrivateGStreamer::updateStates):
     39        (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
     40        (WebCore::MediaPlayerPrivateGStreamer::didEnd):
     41        (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
     42        (WebCore::MediaPlayerPrivateGStreamer::setPreload):
     43        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
     44
    1452018-11-20  Manuel Rego Casasnovas  <rego@igalia.com>
    246
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r238131 r238396  
    109109    gst_structure_free(structure);
    110110    GUniquePtr<gchar> elementName(gst_element_get_name(GST_ELEMENT(object)));
    111     GST_DEBUG("Set media.role as %s at %s", role, elementName.get());
     111    GST_DEBUG_OBJECT(pipeline(), "Set media.role as %s at %s", role, elementName.get());
    112112}
    113113
     
    174174MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer()
    175175{
    176     GST_DEBUG("Disposing player");
     176    GST_DEBUG_OBJECT(pipeline(), "Disposing player");
    177177
    178178#if ENABLE(VIDEO_TRACK)
     
    240240    convertToInternalProtocol(m_url);
    241241
    242     GST_INFO("Load %s", m_url.string().utf8().data());
     242    GST_INFO_OBJECT(pipeline(), "Load %s", m_url.string().utf8().data());
    243243    g_object_set(m_pipeline.get(), "uri", m_url.string().utf8().data(), nullptr);
    244244}
     
    296296    setPlaybinURL(url);
    297297
    298     GST_DEBUG("preload: %s", convertEnumerationToString(m_preload).utf8().data());
     298    GST_DEBUG_OBJECT(pipeline(), "preload: %s", convertEnumerationToString(m_preload).utf8().data());
    299299    if (m_preload == MediaPlayer::None) {
    300         GST_INFO("Delaying load.");
     300        GST_INFO_OBJECT(pipeline(), "Delaying load.");
    301301        m_delayingLoad = true;
    302302    }
     
    352352{
    353353    ASSERT(!m_delayingLoad);
    354     GST_DEBUG("Committing load.");
     354    GST_DEBUG_OBJECT(pipeline(), "Committing load.");
    355355
    356356    // GStreamer needs to have the pipeline set to a paused state to
     
    397397void MediaPlayerPrivateGStreamer::readyTimerFired()
    398398{
    399     GST_DEBUG("In READY for too long. Releasing pipeline resources.");
     399    GST_DEBUG_OBJECT(pipeline(), "In READY for too long. Releasing pipeline resources.");
    400400    changePipelineState(GST_STATE_NULL);
    401401}
     
    410410    gst_element_get_state(m_pipeline.get(), &currentState, &pending, 0);
    411411    if (currentState == newState || pending == newState) {
    412         GST_DEBUG("Rejected state change to %s from %s with %s pending", gst_element_state_get_name(newState),
     412        GST_DEBUG_OBJECT(pipeline(), "Rejected state change to %s from %s with %s pending", gst_element_state_get_name(newState),
    413413            gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
    414414        return true;
    415415    }
    416416
    417     GST_DEBUG("Changing state change to %s from %s with %s pending", gst_element_state_get_name(newState),
     417    GST_DEBUG_OBJECT(pipeline(), "Changing state change to %s from %s with %s pending", gst_element_state_get_name(newState),
    418418        gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
    419419
     
    445445void MediaPlayerPrivateGStreamer::prepareToPlay()
    446446{
    447     GST_DEBUG("Prepare to play");
     447    GST_DEBUG_OBJECT(pipeline(), "Prepare to play");
    448448    m_preload = MediaPlayer::Auto;
    449449    if (m_delayingLoad) {
     
    465465        m_preload = MediaPlayer::Auto;
    466466        setDownloadBuffering();
    467         GST_INFO("Play");
     467        GST_INFO_OBJECT(pipeline(), "Play");
    468468    } else
    469469        loadingFailed(MediaPlayer::Empty);
     
    479479
    480480    if (changePipelineState(GST_STATE_PAUSED))
    481         GST_INFO("Pause");
     481        GST_INFO_OBJECT(pipeline(), "Pause");
    482482    else
    483483        loadingFailed(MediaPlayer::Empty);
     
    499499
    500500    if (!gst_element_query_duration(m_pipeline.get(), GST_FORMAT_TIME, &timeLength) || !GST_CLOCK_TIME_IS_VALID(timeLength)) {
    501         GST_DEBUG("Time duration query failed for %s", m_url.string().utf8().data());
     501        GST_DEBUG_OBJECT(pipeline(), "Time duration query failed for %s", m_url.string().utf8().data());
    502502        return MediaTime::positiveInfiniteTime();
    503503    }
     
    528528        return;
    529529
    530     GST_INFO("[Seek] seek attempt to %s", toString(mediaTime).utf8().data());
     530    GST_INFO_OBJECT(pipeline(), "[Seek] seek attempt to %s", toString(mediaTime).utf8().data());
    531531
    532532    // Avoid useless seeking.
     
    539539        return;
    540540
    541     GST_INFO("[Seek] seeking to %s", toString(time).utf8().data());
     541    GST_INFO_OBJECT(pipeline(), "[Seek] seeking to %s", toString(time).utf8().data());
    542542
    543543    if (m_seeking) {
     
    552552    GstStateChangeReturn getStateResult = gst_element_get_state(m_pipeline.get(), &state, nullptr, 0);
    553553    if (getStateResult == GST_STATE_CHANGE_FAILURE || getStateResult == GST_STATE_CHANGE_NO_PREROLL) {
    554         GST_DEBUG("[Seek] cannot seek, current state change is %s", gst_element_state_change_return_get_name(getStateResult));
     554        GST_DEBUG_OBJECT(pipeline(), "[Seek] cannot seek, current state change is %s", gst_element_state_change_return_get_name(getStateResult));
    555555        return;
    556556    }
     
    558558        m_seekIsPending = true;
    559559        if (m_isEndReached) {
    560             GST_DEBUG("[Seek] reset pipeline");
     560            GST_DEBUG_OBJECT(pipeline(), "[Seek] reset pipeline");
    561561            m_resetPipeline = true;
    562562            if (!changePipelineState(GST_STATE_PAUSED))
     
    566566        // We can seek now.
    567567        if (!doSeek(time, m_player->rate(), static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE))) {
    568             GST_DEBUG("[Seek] seeking to %s failed", toString(time).utf8().data());
     568            GST_DEBUG_OBJECT(pipeline(), "[Seek] seeking to %s failed", toString(time).utf8().data());
    569569            return;
    570570        }
     
    608608        return;
    609609
    610     GST_INFO("Set Rate to %f", m_playbackRate);
     610    GST_INFO_OBJECT(pipeline(), "Set Rate to %f", m_playbackRate);
    611611
    612612    // Mute the sound if the playback rate is negative or too extreme and audio pitch is not adjusted.
    613613    bool mute = m_playbackRate <= 0 || (!m_preservesPitch && (m_playbackRate < 0.8 || m_playbackRate > 2));
    614614
    615     GST_INFO(mute ? "Need to mute audio" : "Do not need to mute audio");
     615    GST_INFO_OBJECT(pipeline(), mute ? "Need to mute audio" : "Do not need to mute audio");
    616616
    617617    if (doSeek(playbackPosition(), m_playbackRate, static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH))) {
     
    640640{
    641641    if (m_isEndReached) {
    642         GST_DEBUG("Ignoring pause at EOS");
     642        GST_DEBUG_OBJECT(pipeline(), "Ignoring pause at EOS");
    643643        return true;
    644644    }
    645645
    646646    if (m_playbackRatePause) {
    647         GST_DEBUG("Playback rate is 0, simulating PAUSED state");
     647        GST_DEBUG_OBJECT(pipeline(), "Playback rate is 0, simulating PAUSED state");
    648648        return false;
    649649    }
     
    652652    gst_element_get_state(m_pipeline.get(), &state, nullptr, 0);
    653653    bool paused = state <= GST_STATE_PAUSED;
    654     GST_DEBUG("Paused: %s", toString(paused).utf8().data());
     654    GST_DEBUG_OBJECT(pipeline(), "Paused: %s", toString(paused).utf8().data());
    655655    return paused;
    656656}
     
    825825    }
    826826
    827     GST_INFO("Enabling %s track with index: %u", trackTypeAsString, index);
     827    GST_INFO_OBJECT(pipeline(), "Enabling %s track with index: %u", trackTypeAsString, index);
    828828    if (m_isLegacyPlaybin)
    829829        g_object_set(m_pipeline.get(), propertyName, index, nullptr);
     
    861861    g_object_get(element, "n-video", &numTracks, nullptr);
    862862
    863     GST_INFO("Media has %d video tracks", numTracks);
     863    GST_INFO_OBJECT(pipeline(), "Media has %d video tracks", numTracks);
    864864
    865865    bool oldHasVideo = m_hasVideo;
     
    872872
    873873    if (useMediaSource) {
    874         GST_DEBUG("Tracks managed by source element. Bailing out now.");
     874        GST_DEBUG_OBJECT(pipeline(), "Tracks managed by source element. Bailing out now.");
    875875        m_player->client().mediaPlayerEngineUpdated(m_player);
    876876        return;
     
    939939    g_object_get(element, "n-audio", &numTracks, nullptr);
    940940
    941     GST_INFO("Media has %d audio tracks", numTracks);
     941    GST_INFO_OBJECT(pipeline(), "Media has %d audio tracks", numTracks);
    942942    bool oldHasAudio = m_hasAudio;
    943943    m_hasAudio = numTracks > 0;
     
    946946
    947947    if (useMediaSource) {
    948         GST_DEBUG("Tracks managed by source element. Bailing out now.");
     948        GST_DEBUG_OBJECT(pipeline(), "Tracks managed by source element. Bailing out now.");
    949949        m_player->client().mediaPlayerEngineUpdated(m_player);
    950950        return;
     
    10011001    g_object_get(element, "n-text", &numTracks, nullptr);
    10021002
    1003     GST_INFO("Media has %d text tracks", numTracks);
     1003    GST_INFO_OBJECT(pipeline(), "Media has %d text tracks", numTracks);
    10041004
    10051005    if (useMediaSource) {
    1006         GST_DEBUG("Tracks managed by source element. Bailing out now.");
     1006        GST_DEBUG_OBJECT(pipeline(), "Tracks managed by source element. Bailing out now.");
    10071007        return;
    10081008    }
     
    12681268        gst_element_get_state(m_pipeline.get(), &currentState, nullptr, 250 * GST_NSECOND);
    12691269        if (requestedState < currentState) {
    1270             GST_INFO("Element %s requested state change to %s", GST_MESSAGE_SRC_NAME(message),
     1270            GST_INFO_OBJECT(pipeline(), "Element %s requested state change to %s", GST_MESSAGE_SRC_NAME(message),
    12711271                gst_element_state_get_name(requestedState));
    12721272            m_requestedState = requestedState;
     
    13281328#if ENABLE(ENCRYPTED_MEDIA)
    13291329        else if (gst_structure_has_name(structure, "drm-waiting-for-key")) {
    1330             GST_DEBUG("drm-waiting-for-key message from %s", GST_MESSAGE_SRC_NAME(message));
     1330            GST_DEBUG_OBJECT(pipeline(), "drm-waiting-for-key message from %s", GST_MESSAGE_SRC_NAME(message));
    13311331            setWaitingForKey(true);
    13321332        } else if (gst_structure_has_name(structure, "drm-key-received")) {
    1333             GST_DEBUG("drm-key-received message from %s", GST_MESSAGE_SRC_NAME(message));
     1333            GST_DEBUG_OBJECT(pipeline(), "drm-key-received message from %s", GST_MESSAGE_SRC_NAME(message));
    13341334            setWaitingForKey(false);
    13351335        } else if (gst_structure_has_name(structure, "drm-cdm-instance-needed")) {
    1336             GST_DEBUG("drm-cdm-instance-needed message from %s", GST_MESSAGE_SRC_NAME(message));
     1336            GST_DEBUG_OBJECT(pipeline(), "drm-cdm-instance-needed message from %s", GST_MESSAGE_SRC_NAME(message));
    13371337            dispatchCDMInstance();
    13381338        }
     
    13421342            if (gst_structure_get(structure, "response-headers", GST_TYPE_STRUCTURE, &responseHeaders, nullptr)) {
    13431343                if (!gst_structure_has_field(responseHeaders, httpHeaderNameString(HTTPHeaderName::ContentLength).utf8().data())) {
    1344                     GST_INFO("Live stream detected. Disabling on-disk buffering");
     1344                    GST_INFO_OBJECT(pipeline(), "Live stream detected. Disabling on-disk buffering");
    13451345                    m_isStreaming = true;
    13461346                    setDownloadBuffering();
     
    13531353                    m_hasTaintedOrigin = webKitSrcWouldTaintOrigin(WEBKIT_WEB_SRC(m_source.get()), SecurityOrigin::create(URL(URL(), uri)));
    13541354        } else
    1355             GST_DEBUG("Unhandled element message: %" GST_PTR_FORMAT, structure);
     1355            GST_DEBUG_OBJECT(pipeline(), "Unhandled element message: %" GST_PTR_FORMAT, structure);
    13561356        break;
    13571357#if ENABLE(VIDEO_TRACK)
     
    13971397            String streamId(gst_stream_get_stream_id(stream.get()));
    13981398
    1399             GST_DEBUG("Selecting %s track with ID: %s", gst_stream_type_get_name(type), streamId.utf8().data());
     1399            GST_DEBUG_OBJECT(pipeline(), "Selecting %s track with ID: %s", gst_stream_type_get_name(type), streamId.utf8().data());
    14001400            // Playbin3 can send more than one selected stream of the same type
    14011401            // but there's no priority or ordering system in place, so we assume
     
    14201420#endif
    14211421    default:
    1422         GST_DEBUG("Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message));
     1422        GST_DEBUG_OBJECT(pipeline(), "Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message));
    14231423        break;
    14241424    }
     
    14301430    gst_message_parse_buffering(message, &m_bufferingPercentage);
    14311431
    1432     GST_DEBUG("[Buffering] Buffering: %d%%.", m_bufferingPercentage);
     1432    GST_DEBUG_OBJECT(pipeline(), "[Buffering] Buffering: %d%%.", m_bufferingPercentage);
    14331433
    14341434    if (m_bufferingPercentage == 100)
     
    16151615        fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX;
    16161616
    1617     GST_DEBUG("[Buffering] Download buffer filled up to %f%%", fillStatus);
     1617    GST_DEBUG_OBJECT(pipeline(), "[Buffering] Download buffer filled up to %f%%", fillStatus);
    16181618
    16191619    MediaTime mediaDuration = durationMediaTime();
     
    16261626        else
    16271627            m_maxTimeLoaded = MediaTime(fillStatus * static_cast<double>(toGstUnsigned64Time(mediaDuration)) / 100, GST_SECOND);
    1628         GST_DEBUG("[Buffering] Updated maxTimeLoaded: %s", toString(m_maxTimeLoaded).utf8().data());
     1628        GST_DEBUG_OBJECT(pipeline(), "[Buffering] Updated maxTimeLoaded: %s", toString(m_maxTimeLoaded).utf8().data());
    16291629    }
    16301630
     
    16481648
    16491649    MediaTime duration = durationMediaTime();
    1650     GST_DEBUG("maxMediaTimeSeekable, duration: %s", toString(duration).utf8().data());
     1650    GST_DEBUG_OBJECT(pipeline(), "maxMediaTimeSeekable, duration: %s", toString(duration).utf8().data());
    16511651    // infinite duration means live stream
    16521652    if (duration.isPositiveInfinite())
     
    17031703    gint64 length = 0;
    17041704    if (gst_element_query_duration(m_source.get(), fmt, &length)) {
    1705         GST_INFO("totalBytes %" G_GINT64_FORMAT, length);
     1705        GST_INFO_OBJECT(pipeline(), "totalBytes %" G_GINT64_FORMAT, length);
    17061706        m_totalBytes = static_cast<unsigned long long>(length);
    17071707        m_isStreaming = !length;
     
    17381738    gst_iterator_free(iter);
    17391739
    1740     GST_INFO("totalBytes %" G_GINT64_FORMAT, length);
     1740    GST_INFO_OBJECT(pipeline(), "totalBytes %" G_GINT64_FORMAT, length);
    17411741    m_totalBytes = static_cast<unsigned long long>(length);
    17421742    m_isStreaming = !length;
     
    17631763    GUniquePtr<char> newDownloadTemplate(g_build_filename(G_DIR_SEPARATOR_S, "var", "tmp", "WebKit-Media-XXXXXX", nullptr));
    17641764    g_object_set(element, "temp-template", newDownloadTemplate.get(), nullptr);
    1765     GST_DEBUG("Reconfigured file download template from '%s' to '%s'", oldDownloadTemplate.get(), newDownloadTemplate.get());
     1765    GST_DEBUG_OBJECT(player->pipeline(), "Reconfigured file download template from '%s' to '%s'", oldDownloadTemplate.get(), newDownloadTemplate.get());
    17661766
    17671767    player->purgeOldDownloadFiles(oldDownloadTemplate.get());
     
    17831783    }
    17841784
    1785     GST_DEBUG("Unlinked media temporary file %s after creation", downloadFile.get());
     1785    GST_DEBUG_OBJECT(player->pipeline(), "Unlinked media temporary file %s after creation", downloadFile.get());
    17861786}
    17871787
     
    18071807void MediaPlayerPrivateGStreamer::sourceSetup(GstElement* sourceElement)
    18081808{
    1809     GST_DEBUG("Source element set-up for %s", GST_ELEMENT_NAME(sourceElement));
     1809    GST_DEBUG_OBJECT(pipeline(), "Source element set-up for %s", GST_ELEMENT_NAME(sourceElement));
    18101810
    18111811    if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get()))
     
    18641864            updateStates();
    18651865        else {
    1866             GST_DEBUG("[Seek] seeked to %s", toString(m_seekTime).utf8().data());
     1866            GST_DEBUG_OBJECT(pipeline(), "[Seek] seeked to %s", toString(m_seekTime).utf8().data());
    18671867            m_seeking = false;
    18681868            m_cachedPosition = MediaTime::invalidTime();
     
    19071907    switch (getStateResult) {
    19081908    case GST_STATE_CHANGE_SUCCESS: {
    1909         GST_DEBUG("State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
     1909        GST_DEBUG_OBJECT(pipeline(), "State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
    19101910
    19111911        // Do nothing if on EOS and state changed to READY to avoid recreating the player
     
    19321932            if (m_buffering) {
    19331933                if (m_bufferingPercentage == 100) {
    1934                     GST_DEBUG("[Buffering] Complete.");
     1934                    GST_DEBUG_OBJECT(pipeline(), "[Buffering] Complete.");
    19351935                    m_buffering = false;
    19361936                    m_readyState = MediaPlayer::HaveEnoughData;
     
    19631963
    19641964            if (didBuffering && !m_buffering && !m_paused && m_playbackRate) {
    1965                 GST_DEBUG("[Buffering] Restarting playback.");
     1965                GST_DEBUG_OBJECT(pipeline(), "[Buffering] Restarting playback.");
    19661966                changePipelineState(GST_STATE_PLAYING);
    19671967            }
     
    19701970
    19711971            if ((m_buffering && !isLiveStream()) || !m_playbackRate) {
    1972                 GST_DEBUG("[Buffering] Pausing stream for buffering.");
     1972                GST_DEBUG_OBJECT(pipeline(), "[Buffering] Pausing stream for buffering.");
    19731973                changePipelineState(GST_STATE_PAUSED);
    19741974            }
     
    19761976            m_paused = true;
    19771977
    1978         GST_DEBUG("Old state: %s, new state: %s (requested: %s)", gst_element_state_get_name(m_oldState), gst_element_state_get_name(m_currentState), gst_element_state_get_name(m_requestedState));
     1978        GST_DEBUG_OBJECT(pipeline(), "Old state: %s, new state: %s (requested: %s)", gst_element_state_get_name(m_oldState), gst_element_state_get_name(m_currentState), gst_element_state_get_name(m_requestedState));
    19791979        if (m_requestedState == GST_STATE_PAUSED && m_currentState == GST_STATE_PAUSED) {
    19801980            shouldUpdatePlaybackState = true;
    1981             GST_INFO("Requested state change to %s was completed", gst_element_state_get_name(m_currentState));
     1981            GST_INFO_OBJECT(pipeline(), "Requested state change to %s was completed", gst_element_state_get_name(m_currentState));
    19821982        }
    19831983
     
    19871987        // and test timeouts.
    19881988        if (stateReallyChanged && (m_oldState != m_currentState) && (m_oldState == GST_STATE_PAUSED && m_currentState == GST_STATE_PLAYING)) {
    1989             GST_INFO("Playback state changed from %s to %s. Notifying the media player client", gst_element_state_get_name(m_oldState), gst_element_state_get_name(m_currentState));
     1989            GST_INFO_OBJECT(pipeline(), "Playback state changed from %s to %s. Notifying the media player client", gst_element_state_get_name(m_oldState), gst_element_state_get_name(m_currentState));
    19901990            shouldUpdatePlaybackState = true;
    19911991        }
     
    19941994    }
    19951995    case GST_STATE_CHANGE_ASYNC:
    1996         GST_DEBUG("Async: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
     1996        GST_DEBUG_OBJECT(pipeline(), "Async: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
    19971997        // Change in progress.
    19981998        break;
    19991999    case GST_STATE_CHANGE_FAILURE:
    2000         GST_DEBUG("Failure: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
     2000        GST_DEBUG_OBJECT(pipeline(), "Failure: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
    20012001        // Change failed
    20022002        return;
    20032003    case GST_STATE_CHANGE_NO_PREROLL:
    2004         GST_DEBUG("No preroll: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
     2004        GST_DEBUG_OBJECT(pipeline(), "No preroll: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
    20052005
    20062006        // Live pipelines go in PAUSED without prerolling.
     
    20222022        break;
    20232023    default:
    2024         GST_DEBUG("Else : %d", getStateResult);
     2024        GST_DEBUG_OBJECT(pipeline(), "Else : %d", getStateResult);
    20252025        break;
    20262026    }
     
    20322032
    20332033    if (m_networkState != oldNetworkState) {
    2034         GST_DEBUG("Network State Changed from %s to %s", convertEnumerationToString(oldNetworkState).utf8().data(), convertEnumerationToString(m_networkState).utf8().data());
     2034        GST_DEBUG_OBJECT(pipeline(), "Network State Changed from %s to %s", convertEnumerationToString(oldNetworkState).utf8().data(), convertEnumerationToString(m_networkState).utf8().data());
    20352035        m_player->networkStateChanged();
    20362036    }
    20372037    if (m_readyState != oldReadyState) {
    2038         GST_DEBUG("Ready State Changed from %s to %s", convertEnumerationToString(oldReadyState).utf8().data(), convertEnumerationToString(m_readyState).utf8().data());
     2038        GST_DEBUG_OBJECT(pipeline(), "Ready State Changed from %s to %s", convertEnumerationToString(oldReadyState).utf8().data(), convertEnumerationToString(m_readyState).utf8().data());
    20392039        m_player->readyStateChanged();
    20402040    }
     
    20432043        updatePlaybackRate();
    20442044        if (m_seekIsPending) {
    2045             GST_DEBUG("[Seek] committing pending seek to %s", toString(m_seekTime).utf8().data());
     2045            GST_DEBUG_OBJECT(pipeline(), "[Seek] committing pending seek to %s", toString(m_seekTime).utf8().data());
    20462046            m_seekIsPending = false;
    20472047            m_seeking = doSeek(m_seekTime, m_player->rate(), static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE));
    20482048            if (!m_seeking) {
    20492049                m_cachedPosition = MediaTime::invalidTime();
    2050                 GST_DEBUG("[Seek] seeking to %s failed", toString(m_seekTime).utf8().data());
     2050                GST_DEBUG_OBJECT(pipeline(), "[Seek] seeking to %s failed", toString(m_seekTime).utf8().data());
    20512051            }
    20522052        }
     
    21352135        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
    21362136        if (securityOrigin->canRequest(newUrl)) {
    2137             GST_INFO("New media url: %s", newUrl.string().utf8().data());
     2137            GST_INFO_OBJECT(pipeline(), "New media url: %s", newUrl.string().utf8().data());
    21382138
    21392139            // Reset player states.
     
    21562156            }
    21572157        } else
    2158             GST_INFO("Not allowed to load new media location: %s", newUrl.string().utf8().data());
     2158            GST_INFO_OBJECT(pipeline(), "Not allowed to load new media location: %s", newUrl.string().utf8().data());
    21592159    }
    21602160    m_mediaLocationCurrentIndex--;
     
    21752175void MediaPlayerPrivateGStreamer::didEnd()
    21762176{
    2177     GST_INFO("Playback ended");
     2177    GST_INFO_OBJECT(pipeline(), "Playback ended");
    21782178
    21792179    // Synchronize position and duration values to not confuse the
     
    24162416    // We don't want to stop downloading if we already started it.
    24172417    if (flags & flagDownload && m_readyState > MediaPlayer::HaveNothing && !m_resetPipeline) {
    2418         GST_DEBUG("Download already started, not starting again");
     2418        GST_DEBUG_OBJECT(pipeline(), "Download already started, not starting again");
    24192419        return;
    24202420    }
     
    24222422    bool shouldDownload = !isLiveStream() && m_preload == MediaPlayer::Auto;
    24232423    if (shouldDownload) {
    2424         GST_INFO("Enabling on-disk buffering");
     2424        GST_INFO_OBJECT(pipeline(), "Enabling on-disk buffering");
    24252425        g_object_set(m_pipeline.get(), "flags", flags | flagDownload, nullptr);
    24262426        m_fillTimer.startRepeating(200_ms);
    24272427    } else {
    2428         GST_INFO("Disabling on-disk buffering");
     2428        GST_INFO_OBJECT(pipeline(), "Disabling on-disk buffering");
    24292429        g_object_set(m_pipeline.get(), "flags", flags & ~flagDownload, nullptr);
    24302430        m_fillTimer.stop();
     
    24342434void MediaPlayerPrivateGStreamer::setPreload(MediaPlayer::Preload preload)
    24352435{
    2436     GST_DEBUG("Setting preload to %s", convertEnumerationToString(preload).utf8().data());
     2436    GST_DEBUG_OBJECT(pipeline(), "Setting preload to %s", convertEnumerationToString(preload).utf8().data());
    24372437    if (preload == MediaPlayer::Auto && isLiveStream())
    24382438        return;
     
    25722572    setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get()));
    25732573
    2574     GST_INFO("Using legacy playbin element: %s", boolForPrinting(m_isLegacyPlaybin));
     2574    GST_INFO_OBJECT(pipeline(), "Using legacy playbin element: %s", boolForPrinting(m_isLegacyPlaybin));
    25752575
    25762576    // Let also other listeners subscribe to (application) messages in this bus.
Note: See TracChangeset for help on using the changeset viewer.