]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/extract.c
Factorize picture dating and releasing code.
[vlc] / modules / video_filter / extract.c
index cc82d66e8e82d7dd8183d9969906f5c10fa7d687..0aae4f3f1d933a80aeeffe51ce753bec364de8bc 100644 (file)
  * Preamble
  *****************************************************************************/
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 
 #include "vlc_filter.h"
@@ -59,29 +64,29 @@ static void get_custom_from_packedyuv422( picture_t *, picture_t *, int * );
 #define COMPONENT_LONGTEXT N_("RGB component to extract. 0 for Red, 1 for Green and 2 for Blue.")
 #define FILTER_PREFIX "extract-"
 
-static int pi_component_values[] = { 0xFF0000, 0x00FF00, 0x0000FF };
-static const char *ppsz_component_descriptions[] = { "Red", "Green", "Blue" };
+static const int pi_component_values[] = { 0xFF0000, 0x00FF00, 0x0000FF };
+static const char *const ppsz_component_descriptions[] = {
+    "Red", "Green", "Blue" };
 
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("Extract RGB component video filter") );
-    set_shortname( _("Extract" ));
+    set_description( N_("Extract RGB component video filter") );
+    set_shortname( N_("Extract" ));
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
     set_capability( "video filter2", 0 );
     add_shortcut( "extract" );
 
     add_integer_with_range( FILTER_PREFIX "component", 0xFF0000, 1, 0xFFFFFF,
-                 NULL, COMPONENT_TEXT, COMPONENT_LONGTEXT, VLC_FALSE );
-        change_safe();
+                 NULL, COMPONENT_TEXT, COMPONENT_LONGTEXT, false );
         change_integer_list( pi_component_values, ppsz_component_descriptions, 0 );
 
     set_callbacks( Create, Destroy );
 vlc_module_end();
 
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
     "component", NULL
 };
 
@@ -768,6 +773,7 @@ static int ExtractCallback( vlc_object_t *p_this, char const *psz_var,
                             vlc_value_t oldval, vlc_value_t newval,
                             void *p_data )
 {
+    VLC_UNUSED(oldval);
     filter_sys_t *p_sys = (filter_sys_t *)p_data;
 
     if( !strcmp( psz_var, FILTER_PREFIX "component" ) )