diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-10-28 00:43:32 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-10-28 00:43:32 +0100 |
| commit | 64de540e03c8ab04712797079e5fc76eb0135baa (patch) | |
| tree | 8a413aeb542f9de28c7c44d11385753ca4506189 /lib/service | |
| parent | 516b6790c6d6deca3138f8352ceb63f122edddc1 (diff) | |
| download | enigma2-64de540e03c8ab04712797079e5fc76eb0135baa.tar.gz enigma2-64de540e03c8ab04712797079e5fc76eb0135baa.zip | |
servicemp3.cpp: dont start pipeline in constructor, small cleanup
Diffstat (limited to 'lib/service')
| -rw-r--r-- | lib/service/servicemp3.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 12959a0e..7701d4d5 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -335,7 +335,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) m_gst_playbin = 0; } - gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING); setBufferSize(m_buffer_size); } @@ -355,7 +354,7 @@ eServiceMP3::~eServiceMP3() } } -DEFINE_REF(eServiceMP3); +DEFINE_REF(eServiceMP3); RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection) { @@ -366,25 +365,30 @@ RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event, RESULT eServiceMP3::start() { ASSERT(m_state == stIdle); - + m_state = stRunning; if (m_gst_playbin) { eDebug("eServiceMP3::starting pipeline"); gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING); } + m_event(this, evStart); + return 0; } RESULT eServiceMP3::stop() { ASSERT(m_state != stIdle); + if (m_state == stStopped) return -1; + eDebug("eServiceMP3::stop %s", m_ref.path.c_str()); gst_element_set_state(m_gst_playbin, GST_STATE_NULL); m_state = stStopped; + return 0; } |
