]> git.tdb.fi Git - xinema.git/blobdiff - source/xinema.h
Re-display the logo after the stream finishes
[xinema.git] / source / xinema.h
index ce9e92af666ab7f71c7c42e9f8e85fcfef5102b1..cdb1db8e0c3c52079869e2c537d29f556f010b0a 100644 (file)
@@ -2,9 +2,13 @@
 #define XINEMA_H_
 
 #include <msp/core/application.h>
+#include <msp/fs/path.h>
 #include <msp/graphics/display.h>
 #include <msp/graphics/window.h>
-#include <xine.h>
+#include "networkinterface.h"
+
+class XineEngine;
+class XineStream;
 
 class Xinema: public Msp::RegisteredApplication<Xinema>
 {
@@ -14,27 +18,36 @@ private:
                EarlyInit();
        };
 
+public:
+       sigc::signal<void, XineStream &> signal_stream_created;
+       sigc::signal<void> signal_stream_destroyed;
+
+private:
        EarlyInit early_init;
-       std::string filename;
        Msp::Graphics::Display display;
        Msp::Graphics::Window window;
-       xine_t *xine;
-       xine_audio_port_t *xine_audio;
-       x11_visual_t xine_visual;
-       xine_video_port_t *xine_video;
-       xine_stream_t *xine_stream;
-       xine_event_queue_t *xine_queue;
+       NetworkInterface network;
+       XineEngine *engine;
+       XineStream *stream;
+       bool logo_mode;
+
+       Msp::Mutex command_mutex;
+       std::string pending_mrl;
+       bool pending_logo;
 
 public:
        Xinema(int, char **);
 
        virtual int main();
-
 private:
        virtual void tick();
 
-       static void dest_size_cb(void *, int, int, double, int *, int *, double *);
-       static void frame_output_cb(void *, int, int, double, int *, int *, int *, int *, double *, int *, int *);
+public:
+       void play_file(const Msp::FS::Path &);
+       XineStream *get_stream() const { return logo_mode ? 0 : stream; }
+
+private:
+       void show_logo();
 };
 
 #endif