]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/input_manager.hpp
Qt4: messages. Small commit to fix two forgottten qfu() and to add whitespaces where...
[vlc] / modules / gui / qt4 / input_manager.hpp
index 02accf96004acf28f8edce1d826de096555ae787..2905f35859a24d07da2c2c145acb5c399330ed36 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <QObject>
 #include <vlc/vlc.h>
+#include <vlc_input.h>
 
 class InputManager : public QObject
 {
@@ -34,20 +35,37 @@ public:
     InputManager( QObject *, intf_thread_t *);
     virtual ~InputManager();
 
+    void delInput();
+    bool hasInput() { return p_input && !p_input->b_dead && !p_input->b_die; }
+    bool hasAudio() { return b_has_audio; }
+    bool hasVideo() { return b_has_video; }
+    bool b_has_audio, b_has_video, b_had_audio, b_had_video;
 private:
     intf_thread_t *p_intf;
     input_thread_t *p_input;
+    int i_old_playing_status;
 
 public slots:
+    void togglePlayPause();
     void update(); ///< Periodic updates
     void setInput( input_thread_t * ); ///< Our controlled input changed
     void sliderUpdate( float ); ///< User dragged the slider. We get new pos
+    void slower();
+    void faster();
+    void normalRate();
+    void sectionNext();
+    void sectionPrev();
+    void sectionMenu();
 signals:
     /// Send new position, new time and new length
     void positionUpdated( float , int, int );
     void nameChanged( QString );
+    /// Used to signal whether we should show navigation buttons
     void navigationChanged( int );
+    /// Play/pause status
     void statusChanged( int );
+    void audioStarted();
+    void videoStarted();
 };
 
 class MainInputManager : public QObject
@@ -60,7 +78,11 @@ public:
             instance = new MainInputManager( _p_intf );
         return instance;
     }
-
+    static void killInstance()
+    {
+        if( instance ) delete instance;
+    }
+    virtual ~MainInputManager();
     input_thread_t *getInput() { return p_input; };
     InputManager *getIM() { return im; };
 
@@ -70,6 +92,8 @@ private:
     input_thread_t *p_input;
     static MainInputManager *instance;
     MainInputManager( intf_thread_t *);
+public slots:
+    void togglePlayPause();
 private slots:
     void updateInput();
 signals: