]> git.sesse.net Git - vlc/blobdiff - modules/video_output/image.c
Fix bash syntax in rrd doc.
[vlc] / modules / video_output / image.c
index f19b851293cd32f0723585ad1551c1a2d9567783..afe1d618776d2903ef63127e8dbfdbb0e3a2b175 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include <vlc_interface.h>
 
@@ -86,20 +90,20 @@ vlc_module_begin( );
     set_capability( "video output", 0 );
 
     add_string(  CFG_PREFIX "format", "png", NULL,
-                 FORMAT_TEXT, FORMAT_LONGTEXT, VLC_FALSE );
+                 FORMAT_TEXT, FORMAT_LONGTEXT, false );
     change_string_list( psz_format_list, psz_format_list_text, 0 );
-    add_integer( CFG_PREFIX "width", -1, NULL,
-                 WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE );
-        add_deprecated( "image-width", VLC_FALSE ); /* since 0.9.0 */
-    add_integer( CFG_PREFIX "height", -1, NULL,
-                 HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE );
-        add_deprecated( "image-height", VLC_FALSE ); /* since 0.9.0 */
+    add_integer( CFG_PREFIX "width", 0, NULL,
+                 WIDTH_TEXT, WIDTH_LONGTEXT, true );
+        add_deprecated_alias( "image-width" ); /* since 0.9.0 */
+    add_integer( CFG_PREFIX "height", 0, NULL,
+                 HEIGHT_TEXT, HEIGHT_LONGTEXT, true );
+        add_deprecated_alias( "image-height" ); /* since 0.9.0 */
     add_integer( CFG_PREFIX "ratio", 3, NULL,
-                 RATIO_TEXT, RATIO_LONGTEXT, VLC_FALSE );
+                 RATIO_TEXT, RATIO_LONGTEXT, false );
     add_string(  CFG_PREFIX "prefix", "img", NULL,
-                 PREFIX_TEXT, PREFIX_LONGTEXT, VLC_FALSE );
+                 PREFIX_TEXT, PREFIX_LONGTEXT, false );
     add_bool(    CFG_PREFIX "replace", 0, NULL,
-                 REPLACE_TEXT, REPLACE_LONGTEXT, VLC_FALSE );
+                 REPLACE_TEXT, REPLACE_LONGTEXT, false );
     set_callbacks( Create, Destroy );
 vlc_module_end();
 
@@ -122,10 +126,10 @@ struct vout_sys_t
     int         i_current;     /* Current image */
     int         i_frames;   /* Number of frames */
 
-    vlc_bool_t  b_replace;
+    bool  b_replace;
 
-    vlc_bool_t b_time;
-    vlc_bool_t b_meta;
+    bool b_time;
+    bool b_meta;
 
     image_handler_t *p_image;
 };
@@ -150,9 +154,9 @@ static int Create( vlc_object_t *p_this )
     p_vout->p_sys->psz_prefix =
             var_CreateGetString( p_this, CFG_PREFIX "prefix" );
     p_vout->p_sys->b_time = strchr( p_vout->p_sys->psz_prefix, '%' )
-                            ? VLC_TRUE : VLC_FALSE;
+                            ? true : false;
     p_vout->p_sys->b_meta = strchr( p_vout->p_sys->psz_prefix, '$' )
-                            ? VLC_TRUE : VLC_FALSE;
+                            ? true : false;
     p_vout->p_sys->psz_format =
             var_CreateGetString( p_this, CFG_PREFIX "format" );
     p_vout->p_sys->i_width =
@@ -336,4 +340,5 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
 
 static void End( vout_thread_t *p_vout )
 {
+    VLC_UNUSED(p_vout);
 }