File indexing completed on 2024-05-05 04:55:51
0001 /* 0002 SPDX-FileCopyrightText: 2003 Koos Vriezen <koos.vriezen@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #ifndef _KXINEPLAYER_H_ 0008 #define _KXINEPLAYER_H_ 0009 0010 #include <QApplication> 0011 #include <QString> 0012 #include <QStringList> 0013 #include <QSessionManager> 0014 0015 struct XineMovieParamEvent : public QEvent { 0016 XineMovieParamEvent (int l, int w, int h, const QStringList & al, const QStringList & sl, bool ff=false); 0017 int length; 0018 int width; 0019 int height; 0020 QStringList alang; 0021 QStringList slang; 0022 bool first_frame; 0023 }; 0024 0025 struct XineURLEvent : public QEvent { 0026 XineURLEvent (const QString & u); 0027 QString url; 0028 }; 0029 0030 struct XineTitleEvent : public QEvent { 0031 XineTitleEvent (const char *); 0032 QString title; 0033 }; 0034 0035 struct XineProgressEvent : public QEvent { 0036 XineProgressEvent (int p); 0037 int progress; 0038 }; 0039 0040 class KXinePlayer : public QApplication { 0041 Q_OBJECT 0042 public: 0043 KXinePlayer (int argc, char ** argv); 0044 ~KXinePlayer (); 0045 0046 void init (); 0047 void finished (); 0048 void saturation (int val); 0049 void hue (int val); 0050 void contrast (int val); 0051 void brightness (int val); 0052 void volume (int val); 0053 void seek (int val); 0054 bool event (QEvent * e); 0055 void setAudioLang (int, const QString &); 0056 void setSubtitle (int, const QString &); 0057 public Q_SLOTS: 0058 void play (int repeat_count); 0059 void stop (); 0060 void pause (); 0061 void updatePosition (); 0062 void postFinished (); 0063 protected: 0064 void saveState (QSessionManager & sm); 0065 }; 0066 0067 #endif //_KXINEPLAYER_H_