Commit da64a2af authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - VLM. enable/disable from the list controls the VLM. small fixes and...

Qt4 - VLM. enable/disable from the list controls the VLM. small fixes and correction of VLM requests.

parent 0ed17f99
......@@ -195,13 +195,13 @@ void VLMDialog::addVLMItem()
typeShortName = "Bcast";
vlmAwidget = new VLMBroadcast( name, inputText, outputText,
b_checked, b_looped, this );
//VLMWrapper::AddBroadcast( vlmWrapper->p_vlc, name, inputText, outputText, b_checked, b_looped );
VLMWrapper::AddBroadcast( name, inputText, outputText, b_checked, b_looped );
break;
case QVLM_VOD:
typeShortName = "VOD";
vlmAwidget = new VLMVod( name, inputText, outputText,
b_checked, ui.muxLedit->text(), this );
///VLMWrapper::AddVod( vlmWrapper->GetVLM(), name, inputText, outputText, b_checked );
VLMWrapper::AddVod( name, inputText, outputText, b_checked );
break;
case QVLM_Schedule:
typeShortName = "Sched";
......@@ -352,6 +352,7 @@ VLMAWidget::VLMAWidget( QString _name,
BUTTONACT( modifyButton, modify() );
BUTTONACT( deleteButton, del() );
CONNECT( this, clicked( bool ), this, toggleEnabled( bool ) );
}
void VLMAWidget::modify()
......@@ -370,6 +371,11 @@ void VLMAWidget::enterEvent( QEvent *event )
printf( "test" );
}
void VLMAWidget::toggleEnabled( bool b_enable )
{
VLMWrapper::EnableItem( name, b_enable );
}
/****************
* VLMBroadcast
****************/
......@@ -403,7 +409,7 @@ VLMBroadcast::VLMBroadcast( QString _name, QString _input, QString _output,
void VLMBroadcast::update()
{
//VLMWrapper::EditBroadcast( VLMWrapper::p_vlm, name, input, output, b_enabled, b_looped );
VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
if( b_looped )
loopButton->setIcon( QIcon( QPixmap( ":/pixmaps/playlist_repeat_all.png" ) ) );
else
......@@ -414,12 +420,12 @@ void VLMBroadcast::togglePlayPause()
{
if( b_playing = true )
{
// VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm, name, ControlBroadcastPause );
VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
playButton->setIcon( QIcon( QPixmap( ":/pixmaps/pause_16px.png" ) ) );
}
else
{
//VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm, name, ControlBroadcastPlay );
VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
}
b_playing = !b_playing;
......@@ -433,7 +439,7 @@ void VLMBroadcast::toggleLoop()
void VLMBroadcast::stop()
{
//VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm, name, ControlBroadcastStop );
VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
}
......@@ -470,7 +476,7 @@ VLMVod::VLMVod( QString name, QString input, QString output,
void VLMVod::update()
{
muxLabel->setText( mux );
//VLMWrapper::EditVod( p_vlm, name, input, output, b_enabled, mux );
VLMWrapper::EditVod( name, input, output, b_enabled, mux );
}
......@@ -531,12 +537,18 @@ void VLMWrapper::EditBroadcast( const QString name, const QString input,
}
}
void VLMWrapper::EnableItem( const QString name, bool b_enable )
{
vlm_message_t *message;
QString command = "setup \"" + name + ( b_enable ? " enable" : " disable" );
}
void VLMWrapper::ControlBroadcast( const QString name, int BroadcastStatus,
unsigned int seek )
{
vlm_message_t *message;
QString command = "setup \"" + name;
QString command = "control \"" + name;
switch( BroadcastStatus )
{
case ControlBroadcastPlay:
......
......@@ -119,6 +119,7 @@ public:
bool b_enabled = true, QString mux = "" );
static void ControlBroadcast( const QString, int, unsigned int seek = 0 );
static void EnableItem( const QString, bool );
/* 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; }
......@@ -150,6 +151,7 @@ protected:
private slots:
virtual void modify();
virtual void del();
virtual void toggleEnabled( bool );
};
class VLMBroadcast : public VLMAWidget
......
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