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

Use FIND_CHILD when possible to look for the vout as suggested by dionoea and nefrir

parent b38e99dd
......@@ -94,6 +94,7 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) :
p_intf( _p_intf )
{
ui.setupUi( _parent );
p_vout = NULL;
#define SETUP_VFILTER( widget ) \
{ \
......@@ -221,8 +222,10 @@ ExtVideo::~ExtVideo()
void ExtVideo::cropChange()
{
p_vout = ( vout_thread_t * )vlc_object_find( p_intf,
VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( THEMIM->getInput() )
{
p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout )
{
var_SetInteger( p_vout, "crop-top", ui.cropTopPx->value() );
......@@ -230,6 +233,8 @@ void ExtVideo::cropChange()
var_SetInteger( p_vout, "crop-left", ui.cropLeftPx->value() );
var_SetInteger( p_vout, "crop-right", ui.cropRightPx->value() );
}
vlc_object_release( p_vout );
}
}
void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
......@@ -327,8 +332,9 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
ui.subpictureFilterText->setText( psz_string );
/* Try to set on the fly */
p_vout = ( vout_thread_t * )vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( THEMIM->getInput() )
p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout )
{
if( !strcmp( psz_filter_type, "sub-filter" ) )
......@@ -344,7 +350,6 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
void ExtVideo::updateFilters()
{
QString module = ModuleFromWidgetName( sender() );
//std::cout << "Module name: " << module.toStdString() << std::endl;
QCheckBox *checkbox = qobject_cast<QCheckBox*>( sender() );
QGroupBox *groupbox = qobject_cast<QGroupBox*>( sender() );
......
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