]> git.tdb.fi Git - xinema.git/blobdiff - remote/source/streamcontrolitem.h
Display stream size and codecs on the playback page
[xinema.git] / remote / source / streamcontrolitem.h
index 5b9b2bc0bac7111ce66ef1802468e7edee4e16e4..be7bcc869c69256bfb7883e2c1b0ec35d71a8960 100644 (file)
@@ -2,6 +2,7 @@
 #define STREAMCONTROLITEM_H_
 
 #include <QQuickItem>
+#include "xinemacontrol.h"
 
 class XinemaControlItem;
 
@@ -10,9 +11,28 @@ class StreamControlItem: public QQuickItem
        Q_OBJECT
 
        Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed)
+       Q_PROPERTY(PlaybackState playbackState READ get_playback_state WRITE set_playback_state NOTIFY playback_state_changed)
        Q_PROPERTY(QString title READ get_title NOTIFY title_changed)
        Q_PROPERTY(float duration READ get_duration NOTIFY duration_changed)
-       Q_PROPERTY(float position READ get_position NOTIFY position_changed)
+       Q_PROPERTY(float position READ get_position WRITE set_position NOTIFY position_changed)
+       Q_PROPERTY(QSize videoSize READ get_video_size NOTIFY size_changed)
+       Q_PROPERTY(float framerate READ get_framerate NOTIFY framerate_changed)
+       Q_PROPERTY(QString videoCodec READ get_video_codec NOTIFY codecs_changed)
+       Q_PROPERTY(QString audioCodec READ get_audio_codec NOTIFY codecs_changed)
+       Q_PROPERTY(QStringList audioChannels READ get_audio_channels NOTIFY channels_changed)
+       Q_PROPERTY(QStringList spuChannels READ get_spu_channels NOTIFY channels_changed)
+       Q_PROPERTY(int currentAudioChannel READ get_current_audio_channel WRITE select_audio_channel NOTIFY current_audio_channel_changed)
+       Q_PROPERTY(int currentSpuChannel READ get_current_spu_channel WRITE select_spu_channel NOTIFY current_spu_channel_changed)
+
+       Q_ENUMS(PlaybackState)
+
+public:
+       enum PlaybackState
+       {
+               Stopped = XinemaControl::STOPPED,
+               Paused = XinemaControl::PAUSED,
+               Playing = XinemaControl::PLAYING
+       };
 
 private:
        XinemaControlItem *control;
@@ -23,15 +43,38 @@ public:
        void set_control(XinemaControlItem *);
        XinemaControlItem *get_control() const { return control; }
 
+       PlaybackState get_playback_state() const;
+       void set_playback_state(PlaybackState);
        QString get_title() const;
        float get_duration() const;
+       void set_position(float);
        float get_position() const;
+       QSize get_video_size() const;
+       float get_framerate() const;
+       QString get_video_codec() const;
+       QString get_audio_codec() const;
+       QStringList get_audio_channels() const;
+       QStringList get_spu_channels() const;
+       void select_audio_channel(int);
+       void select_spu_channel(int);
+       int get_current_audio_channel() const;
+       int get_current_spu_channel() const;
 
 signals:
        void control_changed();
+       void playback_state_changed();
        void title_changed();
        void duration_changed();
        void position_changed();
+       void size_changed();
+       void framerate_changed();
+       void codecs_changed();
+       void channels_changed();
+       void current_audio_channel_changed();
+       void current_spu_channel_changed();
+
+private slots:
+       void control_channels_changed();
 };
 
 #endif