Revert "Unpause gst after media settings are known."
authorlittlesat <littlesat99@yahoo.com>
Sun, 20 Dec 2015 13:45:27 +0000 (14:45 +0100)
committerlittlesat <littlesat99@yahoo.com>
Sun, 20 Dec 2015 13:45:27 +0000 (14:45 +0100)
This reverts commit 2fd4abeb19e42f6482577a27b2e4d13c5abb2a1f.

As it breakes playing of some streams via gstreamer

lib/service/servicemp3.cpp
lib/service/servicemp3.h

index d0c263f..5af48e8 100644 (file)
@@ -415,7 +415,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        m_paused = false;
        m_seek_paused = false;
        m_cuesheet_loaded = false; /* cuesheet CVR */
-       m_user_paused = false;
 #if GST_VERSION_MAJOR >= 1
        m_use_chapter_entries = false; /* TOC chapter support CVR */
        m_last_seek_pos = 0; /* CVR last seek position */
@@ -755,7 +754,7 @@ RESULT eServiceMP3::start()
        {
                eDebug("[eServiceMP3] starting pipeline");
                GstStateChangeReturn ret;
-               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PAUSED);
+               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
 
                switch(ret)
                {
@@ -1752,7 +1751,6 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                {
                                        if ( m_sourceinfo.is_streaming && m_streamingsrc_timeout )
                                                m_streamingsrc_timeout->stop();
-                                       m_user_paused = false;
                                        m_paused = false;
                                        if (m_seek_paused)
                                        {
@@ -1764,7 +1762,6 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                }       break;
                                case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
                                {
-                                       m_user_paused = true;
                                        m_paused = true;
                                }       break;
                                case GST_STATE_CHANGE_PAUSED_TO_READY:
@@ -2021,8 +2018,6 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                if (m_errorInfo.missing_codec.find("video/") == 0 || (m_errorInfo.missing_codec.find("audio/") == 0 && m_audioStreams.empty()))
                                        m_event((iPlayableService*)this, evUser+12);
                        }
-                       if(!m_user_paused)
-                               gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
                        break;
                }
                case GST_MESSAGE_ELEMENT:
index ef243bc..adf081a 100644 (file)
@@ -303,7 +303,6 @@ private:
        bool m_seek_paused;
        /* cuesheet load check */
        bool m_cuesheet_loaded;
-       bool m_user_paused;
        /* servicemMP3 chapter TOC support CVR */
 #if GST_VERSION_MAJOR >= 1
        bool m_use_chapter_entries;