Commit d1686938 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

qt: remove postproc menus

Postproc is almost always useless nowadays and does not work in most
cases.
parent 8728715d
......@@ -209,15 +209,6 @@ void ActionsManager::skipBackward()
THEMIM->getIM()->jumpBwd();
}
void ActionsManager::PPaction( QAction *a )
{
int i_q = -1;
if( a != NULL )
i_q = a->data().toInt();
ExtVideo::setPostprocessing( p_intf, i_q );
}
bool ActionsManager::isItemSout( QVariant & m_obj, const char *psz_sout, bool as_output )
{
if ( psz_sout == NULL )
......
......@@ -91,7 +91,6 @@ public slots:
void record();
void skipForward();
void skipBackward();
void PPaction( QAction * );
void ScanRendererAction( bool );
void RendererSelected( QAction * );
......
......@@ -620,33 +620,6 @@ void ExtVideo::updateFilterOptions()
setFilterOption( p_intf, qtu( module ), qtu( option ), i_int, f_float, val);
}
int ExtVideo::getPostprocessing( struct intf_thread_t *p_intf)
{
char *psz_config = config_GetPsz(p_intf, "video-filter");
int i_q = -1;
if (psz_config) {
if (strstr(psz_config, "postproc"))
i_q = config_GetInt(p_intf, "postproc-q");
free(psz_config);
}
return i_q;
}
void ExtVideo::setPostprocessing( struct intf_thread_t *p_intf, int q)
{
const char *psz_name = "postproc";
if( q == -1 )
{
ChangeVFiltersString( p_intf, psz_name, false );
}
else
{
ChangeVFiltersString( p_intf, psz_name, false );
setFilterOption( p_intf, "postproc", "postproc-q", q, -1, QString() );
}
}
/**********************************************************************
* v4l2 controls
**********************************************************************/
......
......@@ -47,8 +47,6 @@ class ExtVideo: public QObject
friend class ExtendedDialog;
public:
ExtVideo( struct intf_thread_t *, QTabWidget * );
static void setPostprocessing( struct intf_thread_t *, int q);
static int getPostprocessing( struct intf_thread_t *p_intf);
private:
Ui::ExtVideoWidget ui;
QSignalMapper* filterMapper;
......
......@@ -81,7 +81,6 @@ static QActionGroup *currentGroup;
QMenu *VLCMenuBar::recentsMenu = NULL;
QMenu *VLCMenuBar::audioDeviceMenu = NULL;
QMenu *VLCMenuBar::ppMenu = NULL;
QMenu *VLCMenuBar::rendererMenu = NULL;
QActionGroup *VLCMenuBar::rendererGroup = NULL;
......@@ -249,8 +248,6 @@ static int VideoAutoMenuBuilder( playlist_t *pl, input_thread_t *p_input,
PUSH_VAR( "deinterlace" );
PUSH_VAR( "deinterlace-mode" );
VLCMenuBar::ppMenu->setEnabled( p_object != NULL );
if( p_object )
vlc_object_release( p_object );
return VLC_SUCCESS;
......@@ -690,8 +687,6 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current )
/* Rendering modifiers */
addActionWithSubmenu( current, "deinterlace", qtr( "&Deinterlace" ) );
addActionWithSubmenu( current, "deinterlace-mode", qtr( "&Deinterlace mode" ) );
ppMenu = PPMenu( p_intf );
current->addMenu( ppMenu );
current->addSeparator();
/* Other actions */
......@@ -1655,30 +1650,3 @@ QMenu *VLCMenuBar::RendererMenu( intf_thread_t *p_intf )
return submenu;
}
QMenu *VLCMenuBar::PPMenu( intf_thread_t *p_intf )
{
int i_q = ExtVideo::getPostprocessing( p_intf );
QMenu *submenu = new QMenu( qtr("&Post processing") );
QActionGroup *actionGroup = new QActionGroup(submenu);
QAction *action;
#define ADD_PP_ACTION( text, value ) \
action = new QAction( qtr(text), submenu ); \
action->setData( value ); \
action->setCheckable(true); \
if( value == i_q ) action->setChecked( true ); \
submenu->addAction( action ); \
actionGroup->addAction( action );
ADD_PP_ACTION( "Disable", -1 );
submenu->addSeparator();
ADD_PP_ACTION( "Lowest", 1 );
ADD_PP_ACTION( "Middle", 3 );
ADD_PP_ACTION( "Highest", 6 );
CONNECT( actionGroup, triggered( QAction *), ActionsManager::getInstance( p_intf ), PPaction( QAction * ) );
return submenu;
}
......@@ -94,7 +94,6 @@ public:
};
Q_DECLARE_FLAGS(actionflags, actionflag)
static QMenu *ppMenu;
static QMenu *rendererMenu;
static QActionGroup *rendererGroup;
......@@ -132,7 +131,6 @@ private:
}
static QMenu *HelpMenu( QWidget * );
static QMenu *PPMenu( intf_thread_t *p_intf );
static QMenu *RendererMenu( intf_thread_t *p_intf );
/* Popups Menus */
......
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