better solution to add possibility to delete eSocketNotifiers,
[vuplus_dvbapp] / lib / python / Plugins / Extensions / DVDPlayer / src / servicedvd.cpp
index cdb01d3..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,10 +111,11 @@ 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;
+       pause();
 }
 
 void eServiceDVD::gotThreadMessage(const int &msg)
@@ -230,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;
                }