RESULT eServiceMP3::start()
{
- assert(m_state == stIdle);
+ ASSERT(m_state == stIdle);
m_state = stRunning;
if (m_gst_playbin)
RESULT eServiceMP3::stop()
{
- assert(m_state != stIdle);
+ ASSERT(m_state != stIdle);
if (m_state == stStopped)
return -1;
eDebug("eServiceMP3::stop %s", m_filename.c_str());
// iPausableService
RESULT eServiceMP3::pause()
{
- if (!m_gst_playbin)
+ if (!m_gst_playbin || m_state != stRunning)
return -1;
GstStateChangeReturn res = gst_element_set_state(m_gst_playbin, GST_STATE_PAUSED);
if (res == GST_STATE_CHANGE_ASYNC)
RESULT eServiceMP3::unpause()
{
- if (!m_gst_playbin)
+ if (!m_gst_playbin || m_state != stRunning)
return -1;
GstStateChangeReturn res;