Commit e45f26dd authored by Clément Stenac's avatar Clément Stenac

Some cleanup, start integrating audio visualizations

parent 7df78c9f
...@@ -150,12 +150,13 @@ VisualSelector::VisualSelector( intf_thread_t *_p_i ) : ...@@ -150,12 +150,13 @@ VisualSelector::VisualSelector( intf_thread_t *_p_i ) :
{ {
setFrameStyle(QFrame::StyledPanel | QFrame::Raised); setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
QHBoxLayout *layout = new QHBoxLayout( this ); QHBoxLayout *layout = new QHBoxLayout( this );
layout->setMargin( 0 );
QPushButton *prevButton = new QPushButton( "Prev" ); QPushButton *prevButton = new QPushButton( "Prev" );
QPushButton *nextButton = new QPushButton( "Next"); QPushButton *nextButton = new QPushButton( "Next");
layout->addWidget( prevButton ); layout->addWidget( prevButton );
layout->addWidget( nextButton ); layout->addWidget( nextButton );
setLayout( layout ); setLayout( layout );
setMaximumHeight( 30 ); setMaximumHeight( 35 );
} }
VisualSelector::~VisualSelector() VisualSelector::~VisualSelector()
......
...@@ -35,6 +35,8 @@ public: ...@@ -35,6 +35,8 @@ public:
virtual ~InputManager(); virtual ~InputManager();
void delInput(); void delInput();
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; bool b_has_audio, b_has_video, b_had_audio, b_had_video;
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
......
This diff is collapsed.
...@@ -49,8 +49,6 @@ class MainInterface : public QVLCMW ...@@ -49,8 +49,6 @@ class MainInterface : public QVLCMW
public: public:
MainInterface( intf_thread_t *); MainInterface( intf_thread_t *);
virtual ~MainInterface(); virtual ~MainInterface();
void *requestVideo( vout_thread_t *p_nvout, int *pi_x, void *requestVideo( vout_thread_t *p_nvout, int *pi_x,
int *pi_y, unsigned int *pi_width, int *pi_y, unsigned int *pi_width,
unsigned int *pi_height ); unsigned int *pi_height );
...@@ -80,6 +78,7 @@ private: ...@@ -80,6 +78,7 @@ private:
bool playlistEmbeddedFlag; bool playlistEmbeddedFlag;
bool videoEmbeddedFlag; bool videoEmbeddedFlag;
bool alwaysVideoFlag;
InputManager *main_input_manager; InputManager *main_input_manager;
InputSlider *slider; InputSlider *slider;
...@@ -97,6 +96,7 @@ private slots: ...@@ -97,6 +96,7 @@ private slots:
void prev(); void prev();
void next(); void next();
void playlist(); void playlist();
void visual();
void updateVolume( int sliderVolume ); void updateVolume( int sliderVolume );
}; };
...@@ -104,24 +104,21 @@ private slots: ...@@ -104,24 +104,21 @@ private slots:
class VolumeClickHandler : public QObject class VolumeClickHandler : public QObject
{ {
public: public:
VolumeClickHandler( MainInterface *_m ) :QObject(_m) {m = _m; } VolumeClickHandler( intf_thread_t *_p_intf, MainInterface *_m ) :QObject(_m)
{m = _m; p_intf = _p_intf; }
virtual ~VolumeClickHandler() {}; virtual ~VolumeClickHandler() {};
bool eventFilter( QObject *obj, QEvent *e ) bool eventFilter( QObject *obj, QEvent *e )
{ {
if (e->type() == QEvent::MouseButtonPress ) if (e->type() == QEvent::MouseButtonPress )
{ {
if( obj->objectName() == "volLowLabel" ) aout_VolumeMute( p_intf, NULL );
{
m->ui.volumeSlider->setValue( 0 );
}
else
m->ui.volumeSlider->setValue( 100 );
return true; return true;
} }
return false; return false;
} }
private: private:
MainInterface *m; MainInterface *m;
intf_thread_t *p_intf;
}; };
#endif #endif
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="volLowLabel" > <widget class="QLabel" name="volMuteLabel" >
<property name="text" > <property name="text" >
<string/> <string/>
</property> </property>
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="volHighLabel" > <widget class="QPushButton" name="visualButton" >
<property name="text" > <property name="text" >
<string/> <string/>
</property> </property>
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
<item> <item>
<widget class="QPushButton" name="playlistButton" > <widget class="QPushButton" name="playlistButton" >
<property name="text" > <property name="text" >
<string> </string> <string/>
</property> </property>
</widget> </widget>
</item> </item>
......
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