#include <pthread.h>
#include <sigc++/trackable.h>
#include <xine.h>
-#include <msp/core/mutex.h>
#include <msp/graphics/window.h>
class XineStream;
{
private:
Msp::Graphics::Window &window;
- Msp::Mutex *display_mutex;
- pthread_t locked_thread;
- unsigned lock_count;
xine_t *engine;
xine_audio_port_t *audio_driver;
x11_visual_t visual;
xine_video_port_t *video_driver;
Msp::Graphics::Window::Event *pending_expose;
+ std::list<XineStream *> streams;
public:
- XineEngine(Msp::Graphics::Window &, Msp::Mutex * = 0);
+ XineEngine(Msp::Graphics::Window &);
~XineEngine();
xine_t *get_engine() { return engine; }
xine_audio_port_t *get_audio_driver() { return audio_driver; }
xine_video_port_t *get_video_driver() { return video_driver; }
+ void add_stream(XineStream &);
+ void remove_stream(XineStream &);
+
void tick();
private:
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 *);
- static void lock_cb(void *);
- static void unlock_cb(void *);
};
#endif