Audio and Video file doesn't work when preload attribute is none
authorJiyeon Kim <jiyeon0402.kim@samsung.com>
Wed, 3 Apr 2013 02:08:10 +0000 (11:08 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 3 Apr 2013 09:56:54 +0000 (18:56 +0900)
[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

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index ccb2212..b37f3ee 100755 (executable)
@@ -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