reading module parameters

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
yairko
Blank Cone
Blank Cone
Posts: 16
Joined: 06 Dec 2016 12:25

reading module parameters

Postby yairko » 29 May 2017 16:01

Hello,

I having difficulties passing arguments to a video filter module and read them successfully. This is the module descriptor:

Code: Select all

vlc_module_begin () set_description( N_("viva video filter") ) set_shortname( N_("viva" )) set_category( CAT_VIDEO ) set_subcategory( SUBCAT_VIDEO_VFILTER ) set_capability( "video filter", 0 ) add_integer(FILTER_PREFIX "Wvp",640,P1_TEXT, P1_LONGTEXT,false) add_integer(FILTER_PREFIX "Hvp",380,P2_TEXT, P2_LONGTEXT,false) add_integer(FILTER_PREFIX "Fh",90,P3_TEXT, P3_LONGTEXT,false) add_integer(FILTER_PREFIX "Fv",50,P4_TEXT, P4_LONGTEXT,false) add_integer(FILTER_PREFIX "delay",5,P5_TEXT, P5_LONGTEXT,false) add_shortcut( "viva" ) set_callbacks( Create, Destroy ) vlc_module_end ()
and this is how I read the arguments \ parameters:

Code: Select all

a1 = var_CreateGetIntegerCommand(p_filter,FILTER_PREFIX "Wvp"); a2 = var_CreateGetIntegerCommand(p_filter,FILTER_PREFIX "Hvp"); a3 = var_CreateGetIntegerCommand(p_filter,FILTER_PREFIX "Fh"); a4 = var_CreateGetIntegerCommand(p_filter,FILTER_PREFIX "Fv"); a5 = var_CreateGetIntegerCommand(p_filter,FILTER_PREFIX "delay");
As I said this doesn't work for me. I ALWAYS get the default values. Am I doing something wrong ?
Thank you

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: reading module parameters

Postby Jean-Baptiste Kempf » 29 May 2017 16:50

Use var_InheritInteger
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 39 guests