aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-06-11 16:57:41 +0200
committerghost <andreas.monzner@multimedia-labs.de>2009-06-11 16:57:41 +0200
commit5a9972a248f0a75bb131af270b62673a497ec551 (patch)
tree385e77eb1b02851445138089c5cb4f6d9a6cc1f7
parentcd9f6cc9a0b18aa62d88448d04e7a163606167c4 (diff)
downloadenigma2-5a9972a248f0a75bb131af270b62673a497ec551.tar.gz
enigma2-5a9972a248f0a75bb131af270b62673a497ec551.zip
servicedvd.h/cpp: small fixes
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp18
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h4
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
index cf26f35d..074b3185 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
+++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
@@ -51,7 +51,7 @@ DEFINE_REF(eServiceFactoryDVD)
RESULT eServiceFactoryDVD::play(const eServiceReference &ref, ePtr<iPlayableService> &ptr)
{
// check resources...
- ptr = new eServiceDVD(ref.path.c_str());
+ ptr = new eServiceDVD(ref);
return 0;
}
@@ -84,8 +84,8 @@ RESULT eServiceFactoryDVD::offlineOperations(const eServiceReference &, ePtr<iSe
DEFINE_REF(eServiceDVD);
-eServiceDVD::eServiceDVD(const char *filename):
- m_filename(filename),
+eServiceDVD::eServiceDVD(eServiceReference ref):
+ m_ref(ref),
m_ddvdconfig(ddvd_create()),
m_subtitle_widget(0),
m_state(stIdle),
@@ -101,7 +101,7 @@ eServiceDVD::eServiceDVD(const char *filename):
m_sn = eSocketNotifier::create(eApp, ddvd_get_messagepipe_fd(m_ddvdconfig), eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Error|eSocketNotifier::Hungup);
eDebug("SERVICEDVD construct!");
// create handle
- ddvd_set_dvd_path(m_ddvdconfig, filename);
+ ddvd_set_dvd_path(m_ddvdconfig, ref.path.c_str());
ddvd_set_ac3thru(m_ddvdconfig, 0);
std::string ddvd_language;
@@ -326,7 +326,7 @@ RESULT eServiceDVD::stop()
ASSERT(m_state != stIdle);
if (m_state == stStopped)
return -1;
- eDebug("DVD: stop %s", m_filename.c_str());
+ eDebug("DVD: stop %s", m_ref.path.c_str());
m_state = stStopped;
ddvd_send_key(m_ddvdconfig, DDVD_KEY_EXIT);
@@ -440,7 +440,7 @@ RESULT eServiceDVD::getName(std::string &name)
if ( m_ddvd_titlestring[0] != '\0' )
name = m_ddvd_titlestring;
else
- name = m_filename;
+ name = m_ref.path;
return 0;
}
@@ -493,7 +493,7 @@ std::string eServiceDVD::getInfoString(int w)
switch(w)
{
case sServiceref:
- break;
+ return m_ref.toString();
default:
eDebug("unhandled getInfoString(%d)", w);
}
@@ -769,7 +769,7 @@ void eServiceDVD::loadCuesheet()
if ( m_ddvd_titlestring[0] != '\0' )
snprintf(filename, 128, "/home/root/dvd-%s.cuts", m_ddvd_titlestring);
else
- snprintf(filename, 128, "%s/dvd.cuts", m_filename.c_str());
+ snprintf(filename, 128, "%s/dvd.cuts", m_ref.path.c_str());
eDebug("eServiceDVD::loadCuesheet() filename=%s",filename);
@@ -840,7 +840,7 @@ void eServiceDVD::saveCuesheet()
if ( m_ddvd_titlestring[0] != '\0' )
snprintf(filename, 128, "/home/root/dvd-%s.cuts", m_ddvd_titlestring);
else
- snprintf(filename, 128, "%s/dvd.cuts", m_filename.c_str());
+ snprintf(filename, 128, "%s/dvd.cuts", m_ref.path.c_str());
FILE *f = fopen(filename, "wb");
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h
index 94843a4e..c730d501 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h
+++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.h
@@ -92,7 +92,7 @@ public:
// iServiceKeys
RESULT keyPressed(int key);
private:
- eServiceDVD(const char *filename);
+ eServiceDVD(eServiceReference ref);
void gotMessage(int); // message from dvdlib
void gotThreadMessage(const int &); // message from dvd thread
@@ -101,7 +101,7 @@ private:
void thread();
void thread_finished();
- std::string m_filename;
+ eServiceReference m_ref;
Signal2<void,iPlayableService*,int> m_event;