update dvbapp.
[vuplus_openvuplus] / meta-openvuplus / recipes-vuplus / enigma2 / enigma2 / enigma2_vuplus_mediaplayer.patch
index 813687c..b0d7ed0 100644 (file)
@@ -129,86 +129,3 @@ index 80cc196..7abb2ee 100755
                        self.doSeekRelative(-1)
                elif self.isStateForward(seekstate):
                        speed = seekstate[1]
-diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
-index e79be09..ae4611c 100755
---- a/lib/service/servicemp3.cpp
-+++ b/lib/service/servicemp3.cpp
-@@ -245,6 +245,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref)
-       CONNECT(m_pump.recv_msg, eServiceMP3::gstPoll);
-       m_aspect = m_width = m_height = m_framerate = m_progressive = -1;
-+      m_cur_rate=1.0;
-       m_state = stIdle;
-       eDebug("eServiceMP3::construct!");
-@@ -540,6 +541,9 @@ RESULT eServiceMP3::unpause()
-       if (!m_gst_playbin || m_state != stRunning)
-               return -1;
-+      if(m_cur_rate!=1.0)
-+              trickSeek(1);
-+
-       gst_element_set_state(m_gst_playbin, GST_STATE_PLAYING);
-       return 0;
-@@ -575,7 +579,7 @@ RESULT eServiceMP3::seekToImpl(pts_t to)
- {
-               /* convert pts to nanoseconds */
-       gint64 time_nanoseconds = to * 11111LL;
--      if (!gst_element_seek (m_gst_playbin, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
-+      if (!gst_element_seek (m_gst_playbin, m_cur_rate, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
-               GST_SEEK_TYPE_SET, time_nanoseconds,
-               GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
-       {
-@@ -612,19 +616,23 @@ RESULT eServiceMP3::trickSeek(gdouble ratio)
-       if (!ratio)
-               return seekRelative(0, 0);
-+      eSingleLocker l(m_subs_to_pull_lock);
-+
-       GstEvent *s_event;
-       int flags;
-       flags = GST_SEEK_FLAG_NONE;
-       flags |= GST_SEEK_FLAG_FLUSH;
- //    flags |= GstSeekFlags (GST_SEEK_FLAG_ACCURATE);
--      flags |= GST_SEEK_FLAG_KEY_UNIT;
-+//    flags |= GST_SEEK_FLAG_KEY_UNIT;
- //    flags |= GstSeekFlags (GST_SEEK_FLAG_SEGMENT);
- //    flags |= GstSeekFlags (GST_SEEK_FLAG_SKIP);
-       GstFormat fmt = GST_FORMAT_TIME;
--      gint64 pos, len;
-+      pts_t pos;
-+      gint64 len;
-       gst_element_query_duration(m_gst_playbin, &fmt, &len);
--      gst_element_query_position(m_gst_playbin, &fmt, &pos);
-+      getPlayPosition(pos);
-+      pos=pos*11111;
-       if ( ratio >= 0 )
-       {
-@@ -642,7 +650,11 @@ RESULT eServiceMP3::trickSeek(gdouble ratio)
-               eDebug("eServiceMP3::trickSeek failed");
-               return -1;
-       }
--
-+      m_subtitle_pages.clear();
-+      m_prev_decoder_time = -1;
-+      m_decoder_time_valid_state = 0;
-+      m_subs_to_pull = 0;
-+      m_cur_rate=ratio;
-       return 0;
- }
-diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h
-index 41aec13..cb5b048 100644
---- a/lib/service/servicemp3.h
-+++ b/lib/service/servicemp3.h
-@@ -269,6 +269,7 @@ private:
-       gint m_aspect, m_width, m_height, m_framerate, m_progressive;
-       std::string m_useragent;
-       RESULT trickSeek(gdouble ratio);
-+      double m_cur_rate;
- };
- #endif