File indexing completed on 2024-05-05 04:55:45

0001 /*
0002     This file is part of the KMPlayer application
0003     SPDX-FileCopyrightText: 2004 Koos Vriezen <koos.vriezen@xs4all.nl>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef _K_GST_PLAYER_H_
0009 #define _K_GST_PLAYER_H_
0010 
0011 #include <QApplication>
0012 #include <QString>
0013 #include <QSessionManager>
0014 
0015 struct GstSizeEvent : public QEvent {
0016     GstSizeEvent (int l, int w, int h);
0017     int length;
0018     int width;
0019     int height;
0020 };
0021 
0022 struct GstProgressEvent : public QEvent {
0023     GstProgressEvent (int p);
0024     int progress;
0025 };
0026 
0027 class KGStreamerPlayer : public QApplication {
0028     Q_OBJECT
0029 public:
0030     KGStreamerPlayer (int argc, char ** argv);
0031     ~KGStreamerPlayer ();
0032 
0033     void init ();
0034     void finished ();
0035     void saturation (int val);
0036     void hue (int val);
0037     void contrast (int val);
0038     void brightness (int val);
0039     void volume (int val);
0040     void seek (int val);
0041     bool event (QEvent * e);
0042 public Q_SLOTS:
0043     void play (int repeat_count);
0044     void stop ();
0045     void pause ();
0046     void updatePosition ();
0047     //void postFinished ();
0048 protected:
0049     void saveState (QSessionManager & sm);
0050 };
0051 
0052 #endif //_K_GST_PLAYER_H_