Changeset 66d883a95cd1dce8b2e35efe5bee34126dd93e95
- Timestamp:
- 20/07/08 22:57:28
(5 months ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1216587448 +0200
- git-parent:
[fb0a060578bd8c7b2983e2b8ed0dffda8a51c631]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1216587448 +0200
- Message:
Cosmetics (moved BuildDone? under HAVE_FONTCONFIG)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfb0a060 |
r66d883a |
|
| 179 | 179 | static char *FontConfig_Select( FcConfig *, const char *, |
|---|
| 180 | 180 | bool, bool, int * ); |
|---|
| 181 | | static int BuildDone( vlc_object_t*, const char *, vlc_value_t, vlc_value_t, |
|---|
| 182 | | void* ); |
|---|
| 183 | 181 | #endif |
|---|
| 184 | 182 | |
|---|
| … | … | |
| 250 | 248 | static void FontBuilderThread( vlc_object_t *p_this); |
|---|
| 251 | 249 | static void FontBuilderDestructor( vlc_object_t *p_this ); |
|---|
| | 250 | static int FontBuilderDone( vlc_object_t*, const char *, vlc_value_t, vlc_value_t, |
|---|
| | 251 | void* ); |
|---|
| 252 | 252 | #endif |
|---|
| 253 | 253 | |
|---|
| … | … | |
| 483 | 483 | if( p_fontbuilder ) |
|---|
| 484 | 484 | { |
|---|
| 485 | | var_AddCallback( p_fontbuilder, "build-done", BuildDone, p_filter ); |
|---|
| | 485 | var_AddCallback( p_fontbuilder, "build-done", FontBuilderDone, p_filter ); |
|---|
| 486 | 486 | var_TriggerCallback( p_fontbuilder, "build-done" ); |
|---|
| 487 | 487 | } |
|---|
| … | … | |
| 495 | 495 | if( p_fontbuilder ) |
|---|
| 496 | 496 | { |
|---|
| 497 | | var_DelCallback( p_fontbuilder, "build-done", BuildDone, p_filter ); |
|---|
| | 497 | var_DelCallback( p_fontbuilder, "build-done", FontBuilderDone, p_filter ); |
|---|
| 498 | 498 | |
|---|
| 499 | 499 | /* We wait for the thread on the first FontBuilderDetach */ |
|---|
| … | … | |
| 547 | 547 | if( p_fontconfig ) |
|---|
| 548 | 548 | FcConfigDestroy( p_fontconfig ); |
|---|
| | 549 | } |
|---|
| | 550 | static int FontBuilderDone( vlc_object_t *p_this, const char *psz_var, |
|---|
| | 551 | vlc_value_t oldval, vlc_value_t newval, void *param ) |
|---|
| | 552 | { |
|---|
| | 553 | filter_t *p_filter = param; |
|---|
| | 554 | filter_sys_t *p_sys = p_filter->p_sys; |
|---|
| | 555 | |
|---|
| | 556 | if( newval.b_bool ) |
|---|
| | 557 | { |
|---|
| | 558 | vlc_mutex_t *p_lock = var_AcquireMutex( "fontbuilder" ); |
|---|
| | 559 | |
|---|
| | 560 | p_sys->b_fontconfig_ok = true; |
|---|
| | 561 | p_sys->p_fontconfig = p_this->p_private; |
|---|
| | 562 | |
|---|
| | 563 | vlc_mutex_unlock( p_lock ); |
|---|
| | 564 | } |
|---|
| | 565 | |
|---|
| | 566 | VLC_UNUSED(psz_var); |
|---|
| | 567 | VLC_UNUSED(oldval); |
|---|
| | 568 | return VLC_SUCCESS; |
|---|
| 549 | 569 | } |
|---|
| 550 | 570 | #endif |
|---|
| … | … | |
| 2197 | 2217 | } |
|---|
| 2198 | 2218 | |
|---|
| 2199 | | static int BuildDone( vlc_object_t *p_this, const char *psz_var, |
|---|
| 2200 | | vlc_value_t oldval, vlc_value_t newval, void *param ) |
|---|
| 2201 | | { |
|---|
| 2202 | | filter_t *p_filter = param; |
|---|
| 2203 | | filter_sys_t *p_sys = p_filter->p_sys; |
|---|
| 2204 | | |
|---|
| 2205 | | if( newval.b_bool ) |
|---|
| 2206 | | { |
|---|
| 2207 | | vlc_mutex_t *p_lock = var_AcquireMutex( "fontbuilder" ); |
|---|
| 2208 | | |
|---|
| 2209 | | p_sys->b_fontconfig_ok = true; |
|---|
| 2210 | | p_sys->p_fontconfig = p_this->p_private; |
|---|
| 2211 | | |
|---|
| 2212 | | vlc_mutex_unlock( p_lock ); |
|---|
| 2213 | | } |
|---|
| 2214 | | |
|---|
| 2215 | | VLC_UNUSED(psz_var); |
|---|
| 2216 | | VLC_UNUSED(oldval); |
|---|
| 2217 | | return VLC_SUCCESS; |
|---|
| 2218 | | } |
|---|
| 2219 | | |
|---|
| 2220 | 2219 | static int ProcessLines( filter_t *p_filter, |
|---|
| 2221 | 2220 | uint32_t *psz_text, |
|---|