From 3b6ad3f4f423993ac77cd20540e25f48d0140729 Mon Sep 17 00:00:00 2001 From: Jiyeon Kim Date: Wed, 3 Apr 2013 11:08:10 +0900 Subject: [PATCH] Audio and Video file doesn't work when preload attribute is none [Title] Audio and Video file doesn't work when preload attribute is none [Problem] Audio and Video file always loaded whole data even if preload attribute is none [Cause] Network state is loading and gstreamer state is GST_STATE_PAUSE [Solution] If preload attribute is none, network state is set to Idle and Gstreamer state is not changed Change-Id: I24505b8e80a46e5f6d00d52da175ab82c0f18ff1 --- .../graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index ccb2212..b37f3ee 100755 --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -461,7 +461,14 @@ void MediaPlayerPrivateGStreamer::load(const String& url) // Reset network and ready states. Those will be set properly once // the pipeline pre-rolled. +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + if (!m_delayingLoad) + m_networkState = MediaPlayer::Loading; + else + m_networkState = MediaPlayer::Idle; +#else m_networkState = MediaPlayer::Loading; +#endif m_player->networkStateChanged(); m_readyState = MediaPlayer::HaveNothing; m_player->readyStateChanged(); @@ -469,10 +476,13 @@ void MediaPlayerPrivateGStreamer::load(const String& url) // GStreamer needs to have the pipeline set to a paused state to // start providing anything useful. +#if ENABLE(TIZEN_GSTREAMER_VIDEO) + if (!m_delayingLoad) +#endif gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED); #if ENABLE(TIZEN_GSTREAMER_AUDIO) - if (m_audioSessionManager) + if (m_audioSessionManager && !m_delayingLoad) m_audioSessionManager->setSoundState(ASM_STATE_PAUSE); #endif -- 2.7.4