X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=remote%2Fsource%2Fxinemacontrol.h;h=fb62bab51be97583c2d37cc4d6910664e9a20b3f;hb=e8267964c38be06de35c94470daaa9233983371d;hp=5693554836b88f7e0639810ea57f08f272affe7d;hpb=4dd3070fa50882b7ec7a26f7d0994c064c6b29d6;p=xinema.git diff --git a/remote/source/xinemacontrol.h b/remote/source/xinemacontrol.h index 5693554..fb62bab 100644 --- a/remote/source/xinemacontrol.h +++ b/remote/source/xinemacontrol.h @@ -2,6 +2,7 @@ #define XINEMACONTROL_H_ #include +#include #include class XinemaControl: public QObject @@ -16,6 +17,11 @@ public: PLAYING }; + enum + { + OFF = -1 + }; + private: QTcpSocket socket; QByteArray buffer; @@ -23,6 +29,14 @@ private: QString title; float duration; float position; + QSize video_size; + float framerate; + QString video_codec; + QString audio_codec; + QStringList audio_channels; + QStringList spu_channels; + int current_audio_channel; + int current_spu_channel; public: XinemaControl(); @@ -37,12 +51,23 @@ public: const QString &get_title() const { return title; } float get_duration() const { return duration; } float get_position() const { return position; } + const QSize &get_video_size() const { return video_size; } + float get_framerate() const { return framerate; } + const QString &get_video_codec() const { return video_codec; } + const QString &get_audio_codec() const { return audio_codec; } void play(); void seek(float); void pause(); void stop(); + const QStringList &get_audio_channels() const { return audio_channels; } + const QStringList &get_spu_channels() const { return spu_channels; } + void select_audio_channel(int); + void select_spu_channel(int); + int get_current_audio_channel() const { return current_audio_channel; } + int get_current_spu_channel() const { return current_spu_channel; } + signals: void connected(); void disconnected(); @@ -53,6 +78,12 @@ signals: void title_changed(const QString &); void duration_changed(float); void position_changed(float); + void size_changed(const QSize &); + void framerate_changed(float); + void codecs_changed(const QString &, const QString &); + void channels_changed(); + void current_audio_channel_changed(int); + void current_spu_channel_changed(int); private: void send_request(const QString &); @@ -60,6 +91,8 @@ private: private slots: void data_available(); void process_reply(const QString &); + static int convert_channel(const QString &); + static void resize_list(QStringList &, int); }; #endif