Commit 3e0615bb authored by luyikei's avatar luyikei

IInput, IOutput: Add errorEncountered()

parent ba5e7df4
...@@ -38,6 +38,7 @@ namespace Backend ...@@ -38,6 +38,7 @@ namespace Backend
virtual void onEndReached() = 0; virtual void onEndReached() = 0;
virtual void onPositionChanged( int64_t ) = 0; virtual void onPositionChanged( int64_t ) = 0;
virtual void onLengthChanged( int64_t ) = 0; virtual void onLengthChanged( int64_t ) = 0;
virtual void onErrorEncountered() = 0;
}; };
class IInput class IInput
......
...@@ -38,6 +38,7 @@ namespace Backend ...@@ -38,6 +38,7 @@ namespace Backend
virtual void onPlaying() = 0; virtual void onPlaying() = 0;
virtual void onStopped() = 0; virtual void onStopped() = 0;
virtual void onVolumeChanged() = 0; virtual void onVolumeChanged() = 0;
virtual void onErrorEncountered() = 0;
}; };
class IOutput class IOutput
......
...@@ -44,3 +44,9 @@ OutputEventWatcher::onVolumeChanged() ...@@ -44,3 +44,9 @@ OutputEventWatcher::onVolumeChanged()
{ {
emit volumeChanged(); emit volumeChanged();
} }
void
OutputEventWatcher::onErrorEncountered()
{
emit errorEncountered();
}
...@@ -37,11 +37,13 @@ private: ...@@ -37,11 +37,13 @@ private:
virtual void onPlaying(); virtual void onPlaying();
virtual void onStopped(); virtual void onStopped();
virtual void onVolumeChanged(); virtual void onVolumeChanged();
virtual void onErrorEncountered();
signals: signals:
void playing(); void playing();
void stopped(); void stopped();
void volumeChanged(); void volumeChanged();
void errorEncountered();
}; };
#endif // OUTPUTEVENTWATCHER_H #endif // OUTPUTEVENTWATCHER_H
...@@ -69,3 +69,9 @@ RendererEventWatcher::onLengthChanged( int64_t length ) ...@@ -69,3 +69,9 @@ RendererEventWatcher::onLengthChanged( int64_t length )
{ {
emit lengthChanged( length ); emit lengthChanged( length );
} }
void
RendererEventWatcher::onErrorEncountered()
{
emit errorEncountered();
}
...@@ -43,6 +43,7 @@ private: ...@@ -43,6 +43,7 @@ private:
virtual void onVolumeChanged(); virtual void onVolumeChanged();
virtual void onPositionChanged( int64_t ); virtual void onPositionChanged( int64_t );
virtual void onLengthChanged( int64_t ); virtual void onLengthChanged( int64_t );
virtual void onErrorEncountered();
signals: signals:
void playing(); void playing();
...@@ -52,6 +53,7 @@ signals: ...@@ -52,6 +53,7 @@ signals:
void volumeChanged(); void volumeChanged();
void positionChanged( qint64 ); void positionChanged( qint64 );
void lengthChanged( qint64 ); void lengthChanged( qint64 );
void errorEncountered();
}; };
#endif // RENDEREREVENTWATCHER_H #endif // RENDEREREVENTWATCHER_H
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