1 #ifndef STREAMCONTROLITEM_H_
2 #define STREAMCONTROLITEM_H_
5 #include "xinemacontrol.h"
7 class XinemaControlItem;
9 class StreamControlItem: public QQuickItem
13 Q_PROPERTY(XinemaControlItem *control READ get_control WRITE set_control NOTIFY control_changed)
14 Q_PROPERTY(PlaybackState playbackState READ get_playback_state WRITE set_playback_state NOTIFY playback_state_changed)
15 Q_PROPERTY(QString title READ get_title NOTIFY title_changed)
16 Q_PROPERTY(float duration READ get_duration NOTIFY duration_changed)
17 Q_PROPERTY(float position READ get_position WRITE set_position NOTIFY position_changed)
18 Q_PROPERTY(QSize videoSize READ get_video_size NOTIFY size_changed)
19 Q_PROPERTY(float framerate READ get_framerate NOTIFY framerate_changed)
20 Q_PROPERTY(QString videoCodec READ get_video_codec NOTIFY codecs_changed)
21 Q_PROPERTY(QString audioCodec READ get_audio_codec NOTIFY codecs_changed)
22 Q_PROPERTY(QStringList audioChannels READ get_audio_channels NOTIFY channels_changed)
23 Q_PROPERTY(QStringList spuChannels READ get_spu_channels NOTIFY channels_changed)
24 Q_PROPERTY(int currentAudioChannel READ get_current_audio_channel WRITE select_audio_channel NOTIFY current_audio_channel_changed)
25 Q_PROPERTY(int currentSpuChannel READ get_current_spu_channel WRITE select_spu_channel NOTIFY current_spu_channel_changed)
27 Q_ENUMS(PlaybackState)
32 Stopped = XinemaControl::STOPPED,
33 Paused = XinemaControl::PAUSED,
34 Playing = XinemaControl::PLAYING
38 XinemaControlItem *control;
43 void set_control(XinemaControlItem *);
44 XinemaControlItem *get_control() const { return control; }
46 PlaybackState get_playback_state() const;
47 void set_playback_state(PlaybackState);
48 QString get_title() const;
49 float get_duration() const;
50 void set_position(float);
51 float get_position() const;
52 QSize get_video_size() const;
53 float get_framerate() const;
54 QString get_video_codec() const;
55 QString get_audio_codec() const;
56 QStringList get_audio_channels() const;
57 QStringList get_spu_channels() const;
58 void select_audio_channel(int);
59 void select_spu_channel(int);
60 int get_current_audio_channel() const;
61 int get_current_spu_channel() const;
64 void control_changed();
65 void playback_state_changed();
67 void duration_changed();
68 void position_changed();
70 void framerate_changed();
71 void codecs_changed();
72 void channels_changed();
73 void current_audio_channel_changed();
74 void current_spu_channel_changed();
77 void control_channels_changed();