Commit 28ff8dc8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - VLM update. Add the actual vlm queries, the modifications and so on for VOD and Broadcast.

parent 84939716
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define _VLM_DIALOG_H_ #define _VLM_DIALOG_H_
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc_vlm.h>
#include "ui/vlm.h" #include "ui/vlm.h"
#include "util/qvlcframe.hpp" #include "util/qvlcframe.hpp"
...@@ -36,6 +37,13 @@ enum{ ...@@ -36,6 +37,13 @@ enum{
QVLM_VOD QVLM_VOD
}; };
enum{
ControlBroadcastPlay,
ControlBroadcastPause,
ControlBroadcastStop,
ControlBroadcastSeek
};
class QComboBox; class QComboBox;
class QVBoxLayout; class QVBoxLayout;
class QStackedWidget; class QStackedWidget;
...@@ -50,6 +58,9 @@ class QHBoxLayout; ...@@ -50,6 +58,9 @@ class QHBoxLayout;
class QDateTimeEdit; class QDateTimeEdit;
class QSpinBox; class QSpinBox;
class VLMAWidget; class VLMAWidget;
class VLMWrapper;
#define THEVLM parent->vlmWrapper->GetVLM()
class VLMDialog : public QVLCFrame class VLMDialog : public QVLCFrame
{ {
...@@ -63,6 +74,8 @@ public: ...@@ -63,6 +74,8 @@ public:
}; };
virtual ~VLMDialog(); virtual ~VLMDialog();
VLMWrapper *vlmWrapper;
private: private:
VLMDialog( intf_thread_t * ); VLMDialog( intf_thread_t * );
static VLMDialog *instance; static VLMDialog *instance;
...@@ -89,12 +102,46 @@ private slots: ...@@ -89,12 +102,46 @@ private slots:
void selectVLMItem( int ); void selectVLMItem( int );
}; };
class VLMWrapper
{
public:
VLMWrapper( intf_thread_t * );
virtual ~VLMWrapper();
bool AttachVLM();
static void AddBroadcast( vlm_t *, const QString, const QString, const QString,
bool b_enabled = true,
bool b_loop = false );
static void EditBroadcast( vlm_t *, const QString, const QString, const QString,
bool b_enabled = true,
bool b_loop = false );
static void AddVod( vlm_t *, const QString, const QString, const QString,
bool b_enabled = true, QString mux = "" );
static void EditVod( vlm_t *, const QString, const QString, const QString,
bool b_enabled = true, QString mux = "" );
static void ControlBroadcast( vlm_t *, const QString, int, unsigned int seek = 0 );
vlm_t * GetVLM(){ return p_vlm;}
/* We don't have yet the accessors in the core, so the following is commented */
//unsigned int NbMedia() { if( p_vlm ) return p_vlm->i_media; return 0; }
/* vlm_media_t *GetMedia( int i )
{ if( p_vlm ) return p_vlm->media[i]; return NULL; }*/
private:
vlm_t *p_vlm;
intf_thread_t *p_intf;
};
class VLMAWidget : public QGroupBox class VLMAWidget : public QGroupBox
{ {
Q_OBJECT Q_OBJECT
friend class VLMDialog; friend class VLMDialog;
public: public:
VLMAWidget( QString name, QString input, QString output, bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast ); VLMAWidget( QString name, QString input, QString output,
bool _enable, VLMDialog *parent, int _type = QVLM_Broadcast );
virtual void update() = 0;
protected: protected:
QLabel *nameLabel; QLabel *nameLabel;
QString name; QString name;
...@@ -113,10 +160,15 @@ private slots: ...@@ -113,10 +160,15 @@ private slots:
class VLMBroadcast : public VLMAWidget class VLMBroadcast : public VLMAWidget
{ {
Q_OBJECT Q_OBJECT
friend class VLMDialog;
public: public:
VLMBroadcast( QString name, QString input, QString output, bool _enable, VLMDialog *parent ); VLMBroadcast( QString name, QString input, QString output,
bool _enable, bool _loop, VLMDialog *parent );
void update();
private: private:
bool b_looped; bool b_looped;
bool b_playing;
QToolButton *loopButton, *playButton;
private slots: private slots:
void stop(); void stop();
void togglePlayPause(); void togglePlayPause();
...@@ -125,16 +177,23 @@ private slots: ...@@ -125,16 +177,23 @@ private slots:
class VLMVod : public VLMAWidget class VLMVod : public VLMAWidget
{ {
Q_OBJECT
friend class VLMDialog;
public: public:
VLMVod( QString name, QString input, QString output, bool _enable, VLMDialog *parent ); VLMVod( QString name, QString input, QString output,
bool _enable, QString _mux, VLMDialog *parent );
void update();
private: private:
QString mux; QString mux;
QLabel *muxLabel;
}; };
class VLMSchedule : public VLMAWidget class VLMSchedule : public VLMAWidget
{ {
friend class VLMDialog;
public: public:
VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent ); VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
void update();
private: private:
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment