00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _EQUALIZER_H_
00026 #define _EQUALIZER_H_
00027
00028 #ifdef HAVE_CONFIG_H
00029 # include "config.h"
00030 #endif
00031
00032 #include <vlc_common.h>
00033 #include <vlc_aout.h>
00034 #include "../../audio_filter/equalizer_presets.h"
00035
00036 #include "ui/equalizer.h"
00037 #include "ui/video_effects.h"
00038 #include "ui/v4l2.h"
00039
00040
00041 #include <QTabWidget>
00042
00043 #define BANDS EQZ_BANDS_MAX
00044 #define NUM_SP_CTRL 5
00045
00046 class QSignalMapper;
00047
00048 class ExtVideo: public QObject
00049 {
00050 Q_OBJECT
00051 public:
00052 ExtVideo( intf_thread_t *, QTabWidget * );
00053 virtual ~ExtVideo();
00054
00055 private:
00056 Ui::ExtVideoWidget ui;
00057 QSignalMapper* filterMapper;
00058 intf_thread_t *p_intf;
00059 vout_thread_t *p_vout;
00060 void initComboBoxItems( QObject* );
00061 void setWidgetValue( QObject* );
00062 void ChangeVFiltersString( char *psz_name, bool b_add );
00063 private slots:
00064 void updateFilters();
00065 void updateFilterOptions();
00066 void cropChange();
00067 };
00068
00069 class ExtV4l2 : public QWidget
00070 {
00071 Q_OBJECT
00072 public:
00073 ExtV4l2( intf_thread_t *, QWidget * );
00074 virtual ~ExtV4l2();
00075
00076 virtual void showEvent( QShowEvent *event );
00077
00078 private:
00079 intf_thread_t *p_intf;
00080 Ui::ExtV4l2Widget ui;
00081 QGroupBox *box;
00082
00083 private slots:
00084 void Refresh( void );
00085 void ValueChange( int value );
00086 void ValueChange( bool value );
00087 };
00088
00089 class Equalizer: public QWidget
00090 {
00091 Q_OBJECT
00092 public:
00093 Equalizer( intf_thread_t *, QWidget * );
00094 virtual ~Equalizer();
00095 QComboBox *presetsComboBox;
00096
00097 char * createValuesFromPreset( int i_preset );
00098 void updateUIFromCore();
00099 private:
00100 Ui::EqualizerWidget ui;
00101 QSlider *bands[BANDS];
00102 QLabel *band_texts[BANDS];
00103
00104 void delCallbacks( aout_instance_t * );
00105 void addCallbacks( aout_instance_t * );
00106
00107 intf_thread_t *p_intf;
00108 private slots:
00109 void enable(bool);
00110 void enable();
00111 void set2Pass();
00112 void setPreamp();
00113 void setCoreBands();
00114 void setCorePreset(int);
00115 void updateUISliderValues( int );
00116 };
00117
00118 class Spatializer: public QWidget
00119 {
00120 Q_OBJECT
00121 public:
00122 Spatializer( intf_thread_t *, QWidget * );
00123 virtual ~Spatializer();
00124
00125 private:
00126 QSlider *spatCtrl[NUM_SP_CTRL];
00127 QLabel *ctrl_texts[NUM_SP_CTRL];
00128 QLabel *ctrl_readout[NUM_SP_CTRL];
00129 float controlVars[5];
00130 float oldControlVars[5];
00131
00132 QCheckBox *enableCheck;
00133
00134 void delCallbacks( aout_instance_t * );
00135 void addCallbacks( aout_instance_t * );
00136 intf_thread_t *p_intf;
00137 private slots:
00138 void enable(bool);
00139 void enable();
00140 void setValues(float *);
00141 void setInitValues();
00142 };
00143
00144 class ExtendedControls: public QWidget
00145 {
00146 Q_OBJECT
00147 public:
00148 ExtendedControls( intf_thread_t *, QWidget * ) {};
00149 virtual ~ExtendedControls() {};
00150
00151 private:
00152 intf_thread_t *p_intf;
00153 private slots:
00154 void slower() {};
00155 void faster() {};
00156 void normal() {};
00157 void snapshot() {};
00158 };
00159
00160 class SyncControls : public QWidget
00161 {
00162 Q_OBJECT
00163 public:
00164 SyncControls( intf_thread_t *, QWidget * );
00165 virtual ~SyncControls() {};
00166 private:
00167 intf_thread_t *p_intf;
00168 QDoubleSpinBox *AVSpin;
00169 QDoubleSpinBox *subsSpin;
00170 QDoubleSpinBox *subSpeedSpin;
00171 public slots:
00172 void update();
00173 private slots:
00174 void advanceAudio( double );
00175 void advanceSubs( double );
00176 void adjustSubsSpeed( double );
00177 };
00178
00179 #endif