better solution to add possibility to delete eSocketNotifiers,
[vuplus_dvbapp] / lib / python / Plugins / Extensions / DVDPlayer / src / servicedvd.cpp
index 7a73119..1add04a 100644 (file)
@@ -91,9 +91,9 @@ eServiceDVD::eServiceDVD(const char *filename):
        m_subtitle_widget(0),
        m_state(stIdle),
        m_current_trick(0),
-       m_sn(eApp, ddvd_get_messagepipe_fd(m_ddvdconfig), eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Error|eSocketNotifier::Hungup),
        m_pump(eApp, 1)
 {
+       m_sn = eSocketNotifier::create(eApp, ddvd_get_messagepipe_fd(m_ddvdconfig), eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Error|eSocketNotifier::Hungup);
        std::string aspect;
        eDebug("SERVICEDVD construct!");
        // create handle
@@ -111,7 +111,7 @@ eServiceDVD::eServiceDVD(const char *filename):
                ddvd_set_video(m_ddvdconfig, DDVD_16_9, DDVD_PAL);
 
        ddvd_set_lfb(m_ddvdconfig, (unsigned char *)m_pixmap->surface->data, 720, 576, 4, 720*4);
-       CONNECT(m_sn.activated, eServiceDVD::gotMessage);
+       CONNECT(m_sn->activated, eServiceDVD::gotMessage);
        CONNECT(m_pump.recv_msg, eServiceDVD::gotThreadMessage);
        strcpy(m_ddvd_titlestring,"");
        m_cue_pts = 0;
@@ -231,6 +231,8 @@ void eServiceDVD::gotMessage(int /*what*/)
                        ddvd_get_title_string(m_ddvdconfig, m_ddvd_titlestring);
                        eDebug("DDVD_SHOWOSD_TITLESTRING: %s",m_ddvd_titlestring);
                        loadCuesheet();
+                       if (!m_cue_pts)
+                               unpause();
                        m_event(this, evStart);
                        break;
                }
@@ -734,8 +736,6 @@ void eServiceDVD::loadCuesheet()
                m_event((iPlayableService*)this, evCuesheetChanged);
                eDebug("eServiceDVD::loadCuesheet() pts=%lld",m_cue_pts);
        }
-       else
-               unpause();
 }
 
 void eServiceDVD::saveCuesheet()