Changeset 238396 in webkit
- Timestamp:
- Nov 20, 2018 7:30:22 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r238395 r238396 1 2018-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 1 45 2018-11-20 Manuel Rego Casasnovas <rego@igalia.com> 2 46 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r238131 r238396 109 109 gst_structure_free(structure); 110 110 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()); 112 112 } 113 113 … … 174 174 MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer() 175 175 { 176 GST_DEBUG ("Disposing player");176 GST_DEBUG_OBJECT(pipeline(), "Disposing player"); 177 177 178 178 #if ENABLE(VIDEO_TRACK) … … 240 240 convertToInternalProtocol(m_url); 241 241 242 GST_INFO ("Load %s", m_url.string().utf8().data());242 GST_INFO_OBJECT(pipeline(), "Load %s", m_url.string().utf8().data()); 243 243 g_object_set(m_pipeline.get(), "uri", m_url.string().utf8().data(), nullptr); 244 244 } … … 296 296 setPlaybinURL(url); 297 297 298 GST_DEBUG ("preload: %s", convertEnumerationToString(m_preload).utf8().data());298 GST_DEBUG_OBJECT(pipeline(), "preload: %s", convertEnumerationToString(m_preload).utf8().data()); 299 299 if (m_preload == MediaPlayer::None) { 300 GST_INFO ("Delaying load.");300 GST_INFO_OBJECT(pipeline(), "Delaying load."); 301 301 m_delayingLoad = true; 302 302 } … … 352 352 { 353 353 ASSERT(!m_delayingLoad); 354 GST_DEBUG ("Committing load.");354 GST_DEBUG_OBJECT(pipeline(), "Committing load."); 355 355 356 356 // GStreamer needs to have the pipeline set to a paused state to … … 397 397 void MediaPlayerPrivateGStreamer::readyTimerFired() 398 398 { 399 GST_DEBUG ("In READY for too long. Releasing pipeline resources.");399 GST_DEBUG_OBJECT(pipeline(), "In READY for too long. Releasing pipeline resources."); 400 400 changePipelineState(GST_STATE_NULL); 401 401 } … … 410 410 gst_element_get_state(m_pipeline.get(), ¤tState, &pending, 0); 411 411 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), 413 413 gst_element_state_get_name(currentState), gst_element_state_get_name(pending)); 414 414 return true; 415 415 } 416 416 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), 418 418 gst_element_state_get_name(currentState), gst_element_state_get_name(pending)); 419 419 … … 445 445 void MediaPlayerPrivateGStreamer::prepareToPlay() 446 446 { 447 GST_DEBUG ("Prepare to play");447 GST_DEBUG_OBJECT(pipeline(), "Prepare to play"); 448 448 m_preload = MediaPlayer::Auto; 449 449 if (m_delayingLoad) { … … 465 465 m_preload = MediaPlayer::Auto; 466 466 setDownloadBuffering(); 467 GST_INFO ("Play");467 GST_INFO_OBJECT(pipeline(), "Play"); 468 468 } else 469 469 loadingFailed(MediaPlayer::Empty); … … 479 479 480 480 if (changePipelineState(GST_STATE_PAUSED)) 481 GST_INFO ("Pause");481 GST_INFO_OBJECT(pipeline(), "Pause"); 482 482 else 483 483 loadingFailed(MediaPlayer::Empty); … … 499 499 500 500 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()); 502 502 return MediaTime::positiveInfiniteTime(); 503 503 } … … 528 528 return; 529 529 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()); 531 531 532 532 // Avoid useless seeking. … … 539 539 return; 540 540 541 GST_INFO ("[Seek] seeking to %s", toString(time).utf8().data());541 GST_INFO_OBJECT(pipeline(), "[Seek] seeking to %s", toString(time).utf8().data()); 542 542 543 543 if (m_seeking) { … … 552 552 GstStateChangeReturn getStateResult = gst_element_get_state(m_pipeline.get(), &state, nullptr, 0); 553 553 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)); 555 555 return; 556 556 } … … 558 558 m_seekIsPending = true; 559 559 if (m_isEndReached) { 560 GST_DEBUG ("[Seek] reset pipeline");560 GST_DEBUG_OBJECT(pipeline(), "[Seek] reset pipeline"); 561 561 m_resetPipeline = true; 562 562 if (!changePipelineState(GST_STATE_PAUSED)) … … 566 566 // We can seek now. 567 567 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()); 569 569 return; 570 570 } … … 608 608 return; 609 609 610 GST_INFO ("Set Rate to %f", m_playbackRate);610 GST_INFO_OBJECT(pipeline(), "Set Rate to %f", m_playbackRate); 611 611 612 612 // Mute the sound if the playback rate is negative or too extreme and audio pitch is not adjusted. 613 613 bool mute = m_playbackRate <= 0 || (!m_preservesPitch && (m_playbackRate < 0.8 || m_playbackRate > 2)); 614 614 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"); 616 616 617 617 if (doSeek(playbackPosition(), m_playbackRate, static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH))) { … … 640 640 { 641 641 if (m_isEndReached) { 642 GST_DEBUG ("Ignoring pause at EOS");642 GST_DEBUG_OBJECT(pipeline(), "Ignoring pause at EOS"); 643 643 return true; 644 644 } 645 645 646 646 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"); 648 648 return false; 649 649 } … … 652 652 gst_element_get_state(m_pipeline.get(), &state, nullptr, 0); 653 653 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()); 655 655 return paused; 656 656 } … … 825 825 } 826 826 827 GST_INFO ("Enabling %s track with index: %u", trackTypeAsString, index);827 GST_INFO_OBJECT(pipeline(), "Enabling %s track with index: %u", trackTypeAsString, index); 828 828 if (m_isLegacyPlaybin) 829 829 g_object_set(m_pipeline.get(), propertyName, index, nullptr); … … 861 861 g_object_get(element, "n-video", &numTracks, nullptr); 862 862 863 GST_INFO ("Media has %d video tracks", numTracks);863 GST_INFO_OBJECT(pipeline(), "Media has %d video tracks", numTracks); 864 864 865 865 bool oldHasVideo = m_hasVideo; … … 872 872 873 873 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."); 875 875 m_player->client().mediaPlayerEngineUpdated(m_player); 876 876 return; … … 939 939 g_object_get(element, "n-audio", &numTracks, nullptr); 940 940 941 GST_INFO ("Media has %d audio tracks", numTracks);941 GST_INFO_OBJECT(pipeline(), "Media has %d audio tracks", numTracks); 942 942 bool oldHasAudio = m_hasAudio; 943 943 m_hasAudio = numTracks > 0; … … 946 946 947 947 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."); 949 949 m_player->client().mediaPlayerEngineUpdated(m_player); 950 950 return; … … 1001 1001 g_object_get(element, "n-text", &numTracks, nullptr); 1002 1002 1003 GST_INFO ("Media has %d text tracks", numTracks);1003 GST_INFO_OBJECT(pipeline(), "Media has %d text tracks", numTracks); 1004 1004 1005 1005 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."); 1007 1007 return; 1008 1008 } … … 1268 1268 gst_element_get_state(m_pipeline.get(), ¤tState, nullptr, 250 * GST_NSECOND); 1269 1269 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), 1271 1271 gst_element_state_get_name(requestedState)); 1272 1272 m_requestedState = requestedState; … … 1328 1328 #if ENABLE(ENCRYPTED_MEDIA) 1329 1329 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)); 1331 1331 setWaitingForKey(true); 1332 1332 } 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)); 1334 1334 setWaitingForKey(false); 1335 1335 } 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)); 1337 1337 dispatchCDMInstance(); 1338 1338 } … … 1342 1342 if (gst_structure_get(structure, "response-headers", GST_TYPE_STRUCTURE, &responseHeaders, nullptr)) { 1343 1343 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"); 1345 1345 m_isStreaming = true; 1346 1346 setDownloadBuffering(); … … 1353 1353 m_hasTaintedOrigin = webKitSrcWouldTaintOrigin(WEBKIT_WEB_SRC(m_source.get()), SecurityOrigin::create(URL(URL(), uri))); 1354 1354 } else 1355 GST_DEBUG ("Unhandled element message: %" GST_PTR_FORMAT, structure);1355 GST_DEBUG_OBJECT(pipeline(), "Unhandled element message: %" GST_PTR_FORMAT, structure); 1356 1356 break; 1357 1357 #if ENABLE(VIDEO_TRACK) … … 1397 1397 String streamId(gst_stream_get_stream_id(stream.get())); 1398 1398 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()); 1400 1400 // Playbin3 can send more than one selected stream of the same type 1401 1401 // but there's no priority or ordering system in place, so we assume … … 1420 1420 #endif 1421 1421 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)); 1423 1423 break; 1424 1424 } … … 1430 1430 gst_message_parse_buffering(message, &m_bufferingPercentage); 1431 1431 1432 GST_DEBUG ("[Buffering] Buffering: %d%%.", m_bufferingPercentage);1432 GST_DEBUG_OBJECT(pipeline(), "[Buffering] Buffering: %d%%.", m_bufferingPercentage); 1433 1433 1434 1434 if (m_bufferingPercentage == 100) … … 1615 1615 fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX; 1616 1616 1617 GST_DEBUG ("[Buffering] Download buffer filled up to %f%%", fillStatus);1617 GST_DEBUG_OBJECT(pipeline(), "[Buffering] Download buffer filled up to %f%%", fillStatus); 1618 1618 1619 1619 MediaTime mediaDuration = durationMediaTime(); … … 1626 1626 else 1627 1627 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()); 1629 1629 } 1630 1630 … … 1648 1648 1649 1649 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()); 1651 1651 // infinite duration means live stream 1652 1652 if (duration.isPositiveInfinite()) … … 1703 1703 gint64 length = 0; 1704 1704 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); 1706 1706 m_totalBytes = static_cast<unsigned long long>(length); 1707 1707 m_isStreaming = !length; … … 1738 1738 gst_iterator_free(iter); 1739 1739 1740 GST_INFO ("totalBytes %" G_GINT64_FORMAT, length);1740 GST_INFO_OBJECT(pipeline(), "totalBytes %" G_GINT64_FORMAT, length); 1741 1741 m_totalBytes = static_cast<unsigned long long>(length); 1742 1742 m_isStreaming = !length; … … 1763 1763 GUniquePtr<char> newDownloadTemplate(g_build_filename(G_DIR_SEPARATOR_S, "var", "tmp", "WebKit-Media-XXXXXX", nullptr)); 1764 1764 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()); 1766 1766 1767 1767 player->purgeOldDownloadFiles(oldDownloadTemplate.get()); … … 1783 1783 } 1784 1784 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()); 1786 1786 } 1787 1787 … … 1807 1807 void MediaPlayerPrivateGStreamer::sourceSetup(GstElement* sourceElement) 1808 1808 { 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)); 1810 1810 1811 1811 if (WEBKIT_IS_WEB_SRC(m_source.get()) && GST_OBJECT_PARENT(m_source.get())) … … 1864 1864 updateStates(); 1865 1865 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()); 1867 1867 m_seeking = false; 1868 1868 m_cachedPosition = MediaTime::invalidTime(); … … 1907 1907 switch (getStateResult) { 1908 1908 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)); 1910 1910 1911 1911 // Do nothing if on EOS and state changed to READY to avoid recreating the player … … 1932 1932 if (m_buffering) { 1933 1933 if (m_bufferingPercentage == 100) { 1934 GST_DEBUG ("[Buffering] Complete.");1934 GST_DEBUG_OBJECT(pipeline(), "[Buffering] Complete."); 1935 1935 m_buffering = false; 1936 1936 m_readyState = MediaPlayer::HaveEnoughData; … … 1963 1963 1964 1964 if (didBuffering && !m_buffering && !m_paused && m_playbackRate) { 1965 GST_DEBUG ("[Buffering] Restarting playback.");1965 GST_DEBUG_OBJECT(pipeline(), "[Buffering] Restarting playback."); 1966 1966 changePipelineState(GST_STATE_PLAYING); 1967 1967 } … … 1970 1970 1971 1971 if ((m_buffering && !isLiveStream()) || !m_playbackRate) { 1972 GST_DEBUG ("[Buffering] Pausing stream for buffering.");1972 GST_DEBUG_OBJECT(pipeline(), "[Buffering] Pausing stream for buffering."); 1973 1973 changePipelineState(GST_STATE_PAUSED); 1974 1974 } … … 1976 1976 m_paused = true; 1977 1977 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)); 1979 1979 if (m_requestedState == GST_STATE_PAUSED && m_currentState == GST_STATE_PAUSED) { 1980 1980 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)); 1982 1982 } 1983 1983 … … 1987 1987 // and test timeouts. 1988 1988 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)); 1990 1990 shouldUpdatePlaybackState = true; 1991 1991 } … … 1994 1994 } 1995 1995 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)); 1997 1997 // Change in progress. 1998 1998 break; 1999 1999 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)); 2001 2001 // Change failed 2002 2002 return; 2003 2003 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)); 2005 2005 2006 2006 // Live pipelines go in PAUSED without prerolling. … … 2022 2022 break; 2023 2023 default: 2024 GST_DEBUG ("Else : %d", getStateResult);2024 GST_DEBUG_OBJECT(pipeline(), "Else : %d", getStateResult); 2025 2025 break; 2026 2026 } … … 2032 2032 2033 2033 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()); 2035 2035 m_player->networkStateChanged(); 2036 2036 } 2037 2037 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()); 2039 2039 m_player->readyStateChanged(); 2040 2040 } … … 2043 2043 updatePlaybackRate(); 2044 2044 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()); 2046 2046 m_seekIsPending = false; 2047 2047 m_seeking = doSeek(m_seekTime, m_player->rate(), static_cast<GstSeekFlags>(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE)); 2048 2048 if (!m_seeking) { 2049 2049 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()); 2051 2051 } 2052 2052 } … … 2135 2135 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url); 2136 2136 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()); 2138 2138 2139 2139 // Reset player states. … … 2156 2156 } 2157 2157 } 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()); 2159 2159 } 2160 2160 m_mediaLocationCurrentIndex--; … … 2175 2175 void MediaPlayerPrivateGStreamer::didEnd() 2176 2176 { 2177 GST_INFO ("Playback ended");2177 GST_INFO_OBJECT(pipeline(), "Playback ended"); 2178 2178 2179 2179 // Synchronize position and duration values to not confuse the … … 2416 2416 // We don't want to stop downloading if we already started it. 2417 2417 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"); 2419 2419 return; 2420 2420 } … … 2422 2422 bool shouldDownload = !isLiveStream() && m_preload == MediaPlayer::Auto; 2423 2423 if (shouldDownload) { 2424 GST_INFO ("Enabling on-disk buffering");2424 GST_INFO_OBJECT(pipeline(), "Enabling on-disk buffering"); 2425 2425 g_object_set(m_pipeline.get(), "flags", flags | flagDownload, nullptr); 2426 2426 m_fillTimer.startRepeating(200_ms); 2427 2427 } else { 2428 GST_INFO ("Disabling on-disk buffering");2428 GST_INFO_OBJECT(pipeline(), "Disabling on-disk buffering"); 2429 2429 g_object_set(m_pipeline.get(), "flags", flags & ~flagDownload, nullptr); 2430 2430 m_fillTimer.stop(); … … 2434 2434 void MediaPlayerPrivateGStreamer::setPreload(MediaPlayer::Preload preload) 2435 2435 { 2436 GST_DEBUG ("Setting preload to %s", convertEnumerationToString(preload).utf8().data());2436 GST_DEBUG_OBJECT(pipeline(), "Setting preload to %s", convertEnumerationToString(preload).utf8().data()); 2437 2437 if (preload == MediaPlayer::Auto && isLiveStream()) 2438 2438 return; … … 2572 2572 setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get())); 2573 2573 2574 GST_INFO ("Using legacy playbin element: %s", boolForPrinting(m_isLegacyPlaybin));2574 GST_INFO_OBJECT(pipeline(), "Using legacy playbin element: %s", boolForPrinting(m_isLegacyPlaybin)); 2575 2575 2576 2576 // Let also other listeners subscribe to (application) messages in this bus.
Note: See TracChangeset
for help on using the changeset viewer.