]> git.sesse.net Git - vlc/blobdiff - modules/gui/fbosd.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / gui / fbosd.c
index 8aa5a17435925f8765a72847c901f2bb2b38ad7d..ccc747ee467211a83820e886f456860f4c7d03ec 100644 (file)
@@ -31,9 +31,9 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
+#include <vlc_modules.h>
 
-#include <errno.h>
 #include <stdlib.h>                                                /* free() */
 #include <string.h>                                            /* strerror() */
 #include <fcntl.h>                                                 /* open() */
@@ -539,7 +539,7 @@ static int OpenBlending( intf_thread_t *p_intf )
             p_intf->p_sys->fmt_out.i_sar_den;
     p_intf->p_sys->p_blend->fmt_out.video.i_chroma =
             p_intf->p_sys->fmt_out.i_chroma;
-    if( config_GetInt( p_intf, "freetype-yuvp" ) )
+    if( var_InheritBool( p_intf, "freetype-yuvp" ) )
         p_intf->p_sys->p_blend->fmt_in.video.i_chroma =
                 VLC_CODEC_YUVP;
     else
@@ -563,7 +563,6 @@ static void CloseBlending( intf_thread_t *p_intf )
             module_unneed( p_intf->p_sys->p_blend,
                            p_intf->p_sys->p_blend->p_module );
 
-        vlc_object_detach( p_intf->p_sys->p_blend );
         vlc_object_release( p_intf->p_sys->p_blend );
     }
 }
@@ -614,7 +613,6 @@ static void CloseTextRenderer( intf_thread_t *p_intf )
             module_unneed( p_intf->p_sys->p_text,
                            p_intf->p_sys->p_text->p_module );
 
-        vlc_object_detach( p_intf->p_sys->p_text );
         vlc_object_release( p_intf->p_sys->p_text );
     }
 }
@@ -864,7 +862,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
             return NULL;
         }
         p_region->p_style = text_style_Duplicate( p_style );
-        p_region->i_align = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
+        p_region->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP;
 
         if( p_sys->p_text->pf_render_text )
         {
@@ -1056,13 +1054,13 @@ static int OpenDisplay( intf_thread_t *p_intf )
     struct fb_fix_screeninfo    fix_info;     /* framebuffer fix information */
 
     /* Open framebuffer device */
-    if( !(psz_device = config_GetPsz( p_intf, "fbosd-dev" )) )
+    if( !(psz_device = var_InheritString( p_intf, "fbosd-dev" )) )
     {
         msg_Err( p_intf, "don't know which fb osd/overlay device to open" );
         return VLC_EGENERIC;
     }
 
-    p_sys->i_fd = utf8_open( psz_device, O_RDWR );
+    p_sys->i_fd = vlc_open( psz_device, O_RDWR );
     if( p_sys->i_fd == -1 )
     {
         msg_Err( p_intf, "cannot open %s (%m)", psz_device );