X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=remote%2Fsource%2Fstreamcontrolitem.h;h=be7bcc869c69256bfb7883e2c1b0ec35d71a8960;hb=9050978f3b1c47e5dd64380637eb3a430bbe7a4c;hp=5b9b2bc0bac7111ce66ef1802468e7edee4e16e4;hpb=6fd809bbdbfe628ef1e63b68665f374751838baf;p=xinema.git diff --git a/remote/source/streamcontrolitem.h b/remote/source/streamcontrolitem.h index 5b9b2bc..be7bcc8 100644 --- a/remote/source/streamcontrolitem.h +++ b/remote/source/streamcontrolitem.h @@ -2,6 +2,7 @@ #define STREAMCONTROLITEM_H_ #include +#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