Extra correction for gst-1 start sequence.
authorchristophecvr <stefansat@telenet.be>
Sat, 25 Jul 2015 08:11:30 +0000 (10:11 +0200)
committerchristophecvr <stefansat@telenet.be>
Sat, 25 Jul 2015 08:11:30 +0000 (10:11 +0200)
After fresh reboot the movie went't sometimes to early to play state.
For gst-1 playbin may only go to playing after ,
all settings are done.

modified:   lib/service/servicemp3.cpp

lib/service/servicemp3.cpp

index f5528a9..38780d3 100644 (file)
@@ -735,7 +735,11 @@ RESULT eServiceMP3::start()
        if (m_gst_playbin)
        {
                eDebug("[eServiceMP3] starting pipeline");
+#if GST_VERSION_MAJOR < 1
                gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
+#else
+               gst_element_set_state (m_gst_playbin, GST_STATE_PAUSED);
+#endif
                updateEpgCacheNowNext();
        }
 
@@ -855,11 +859,19 @@ RESULT eServiceMP3::seekToImpl(pts_t to)
                return -1;
        }
 
+#if GST_VERSION_MAJOR < 1
        if (m_paused)
        {
                m_seek_paused = true;
                gst_element_set_state(m_gst_playbin, GST_STATE_PLAYING);
        }
+#else
+       if (m_user_paused)
+       {
+               m_seek_paused = true;
+               gst_element_set_state(m_gst_playbin, GST_STATE_PLAYING);
+       }
+#endif
 
        return 0;
 }