[vlc-devel] commit: Cosmetics (moved BuildDone under HAVE_FONTCONFIG) (Laurent Aimar )

git version control git at videolan.org
Sun Jul 20 22:55:26 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jul 20 22:57:28 2008 +0200| [66d883a95cd1dce8b2e35efe5bee34126dd93e95]

Cosmetics (moved BuildDone under HAVE_FONTCONFIG)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66d883a95cd1dce8b2e35efe5bee34126dd93e95
---

 modules/misc/freetype.c |   49 +++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 7ca5662..160d060 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -178,8 +178,6 @@ static int RenderHtml( filter_t *, subpicture_region_t *,
                        subpicture_region_t * );
 static char *FontConfig_Select( FcConfig *, const char *,
                                 bool, bool, int * );
-static int BuildDone( vlc_object_t*, const char *, vlc_value_t, vlc_value_t,
-                        void* );
 #endif
 
 
@@ -249,6 +247,8 @@ static vlc_object_t *FontBuilderAttach( filter_t *p_filter, vlc_mutex_t **pp_loc
 static void FontBuilderDetach( filter_t *p_filter, vlc_object_t *p_fontbuilder );
 static void FontBuilderThread( vlc_object_t *p_this);
 static void FontBuilderDestructor( vlc_object_t *p_this );
+static int FontBuilderDone( vlc_object_t*, const char *, vlc_value_t, vlc_value_t,
+                        void* );
 #endif
 
 /*****************************************************************************
@@ -482,7 +482,7 @@ static vlc_object_t *FontBuilderAttach( filter_t *p_filter, vlc_mutex_t **pp_loc
     }
     if( p_fontbuilder )
     {
-        var_AddCallback( p_fontbuilder, "build-done", BuildDone, p_filter );
+        var_AddCallback( p_fontbuilder, "build-done", FontBuilderDone, p_filter );
         var_TriggerCallback( p_fontbuilder, "build-done" );
     }
     vlc_mutex_unlock( p_lock );
@@ -494,7 +494,7 @@ static void FontBuilderDetach( filter_t *p_filter, vlc_object_t *p_fontbuilder )
     vlc_mutex_t *lock = var_AcquireMutex( "fontbuilder" );
     if( p_fontbuilder )
     {
-        var_DelCallback( p_fontbuilder, "build-done", BuildDone, p_filter );
+        var_DelCallback( p_fontbuilder, "build-done", FontBuilderDone, p_filter );
 
         /* We wait for the thread on the first FontBuilderDetach */
         if( vlc_object_alive( p_fontbuilder ) )
@@ -547,6 +547,26 @@ static void FontBuilderDestructor( vlc_object_t *p_this )
     if( p_fontconfig )
         FcConfigDestroy( p_fontconfig );
 }
+static int FontBuilderDone( vlc_object_t *p_this, const char *psz_var,
+                       vlc_value_t oldval, vlc_value_t newval, void *param )
+{
+    filter_t *p_filter = param;
+    filter_sys_t *p_sys = p_filter->p_sys;
+
+    if( newval.b_bool )
+    {
+        vlc_mutex_t *p_lock = var_AcquireMutex( "fontbuilder" );
+
+        p_sys->b_fontconfig_ok = true;
+        p_sys->p_fontconfig = p_this->p_private;
+
+        vlc_mutex_unlock( p_lock );
+    }
+
+    VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval);
+    return VLC_SUCCESS;
+}
 #endif
 
 /*****************************************************************************
@@ -2196,27 +2216,6 @@ static int CheckForEmbeddedFont( filter_sys_t *p_sys, FT_Face *pp_face, ft_style
     return VLC_EGENERIC;
 }
 
-static int BuildDone( vlc_object_t *p_this, const char *psz_var,
-                       vlc_value_t oldval, vlc_value_t newval, void *param )
-{
-    filter_t *p_filter = param;
-    filter_sys_t *p_sys = p_filter->p_sys;
-
-    if( newval.b_bool )
-    {
-        vlc_mutex_t *p_lock = var_AcquireMutex( "fontbuilder" );
-
-        p_sys->b_fontconfig_ok = true;
-        p_sys->p_fontconfig = p_this->p_private;
-
-        vlc_mutex_unlock( p_lock );
-    }
-
-    VLC_UNUSED(psz_var);
-    VLC_UNUSED(oldval);
-    return VLC_SUCCESS;
-}
-
 static int ProcessLines( filter_t *p_filter,
                          uint32_t *psz_text,
                          int i_len,




More information about the vlc-devel mailing list