Commit 8f48a379 authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Emit stopped signal when EOS is reached.

parent 1096b18f
......@@ -58,6 +58,7 @@ public:
return;
}
m_backend = new QtGStreamerOutputBackend();
m_parent->connect(m_backend, SIGNAL(stateChanged()), m_parent, SLOT(emitChangedState()));
m_initialized = true;
}
......@@ -125,14 +126,20 @@ OutputDeviceController::State OutputDeviceController::state() const
return OutputDeviceController::StoppedState;
}
}
/*
QString OutputDeviceController::currentSource() const
{
return d->m_mediaObject->currentSource().fileName();
}*/
void OutputDeviceController::setVolume(int volumenDb)
{
d->m_volume = volumenDb;
}
void OutputDeviceController::emitChangedState()
{
if (state() == OutputDeviceController::StoppedState) {
emit stopped();
return;
}
if (state() == OutputDeviceController::PlayingState) {
emit started();
return;
}
}
......@@ -63,6 +63,7 @@ public:
void setVolume(int volumenDb);
public Q_SLOTS:
void emitChangedState();
Q_SIGNALS:
void started();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment