#define _VLM_DIALOG_H_
#include <vlc/vlc.h>
+#include <vlc_vlm.h>
#include "ui/vlm.h"
#include "util/qvlcframe.hpp"
QVLM_VOD
};
+enum{
+ ControlBroadcastPlay,
+ ControlBroadcastPause,
+ ControlBroadcastStop,
+ ControlBroadcastSeek
+};
+
class QComboBox;
class QVBoxLayout;
class QStackedWidget;
class QDateTimeEdit;
class QSpinBox;
class VLMAWidget;
+class VLMWrapper;
+
+#define THEVLM parent->vlmWrapper->GetVLM()
class VLMDialog : public QVLCFrame
{
};
virtual ~VLMDialog();
+ VLMWrapper *vlmWrapper;
+
private:
VLMDialog( intf_thread_t * );
static VLMDialog *instance;
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
{
Q_OBJECT
friend class VLMDialog;
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:
QLabel *nameLabel;
QString name;
class VLMBroadcast : public VLMAWidget
{
Q_OBJECT
+ friend class VLMDialog;
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:
bool b_looped;
+ bool b_playing;
+ QToolButton *loopButton, *playButton;
private slots:
void stop();
void togglePlayPause();
class VLMVod : public VLMAWidget
{
+ Q_OBJECT
+ friend class VLMDialog;
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:
QString mux;
+ QLabel *muxLabel;
};
class VLMSchedule : public VLMAWidget
{
+ friend class VLMDialog;
public:
VLMSchedule( QString name, QString input, QString output, bool _enable, VLMDialog *parent );
+ void update();
private:
};