]> git.tdb.fi Git - xinema.git/blobdiff - source/xinema.cpp
Export some simple playback information to clients
[xinema.git] / source / xinema.cpp
index 025ec562ad85fff87c414f5b023ceeb6cec62eb8..267f6a4eeb42b1dbebce1d71e67fc106133fe397 100644 (file)
@@ -36,6 +36,8 @@ int Xinema::main()
 
 void Xinema::tick()
 {
+       bool new_stream = false;
+
        {
                MutexLock lock(command_mutex);
                if(!pending_mrl.empty())
@@ -44,9 +46,13 @@ void Xinema::tick()
                        stream = new XineStream(*engine, pending_mrl);
                        stream->play();
                        pending_mrl.clear();
+                       new_stream = true;
                }
        }
 
+       if(new_stream)
+               signal_stream_created.emit(*stream);
+
        {
                MutexLock lock(display_mutex);
                display.tick();