From 20b84cda60fc9530a8d62dad9c9b0ec8771ea692 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 Aug 2009 11:58:45 +0200 Subject: [PATCH] pango: Check if pangocairo supports vertical rendering and fix properties --- configure.ac | 1 + ext/pango/gsttextoverlay.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 63b8d01..d752101 100644 --- a/configure.ac +++ b/configure.ac @@ -591,6 +591,7 @@ dnl *** pango *** translit(dnm, m, l) AM_CONDITIONAL(USE_PANGO, true) AG_GST_CHECK_FEATURE(PANGO, [Pango font rendering], pango, [ AG_GST_PKG_CHECK_MODULES(PANGO, pango pangocairo) + PKG_CHECK_MODULES(PANGOCAIRO_1_15_4, pangocairo >= 1.15.4, [ AC_DEFINE(HAVE_PANGO_VERTICAL_WRITING, 1, [Defined if pango can write vertically])]) ]) dnl *** theora *** diff --git a/ext/pango/gsttextoverlay.c b/ext/pango/gsttextoverlay.c index b7086c0..6954245 100644 --- a/ext/pango/gsttextoverlay.c +++ b/ext/pango/gsttextoverlay.c @@ -450,11 +450,13 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass) "Automatically adjust font size to screen-size.", DEFAULT_PROP_AUTO_ADJUST_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +#ifdef HAVE_PANGO_VERTICAL_WRITING g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VERTICAL_RENDER, g_param_spec_boolean ("vertical-render", "vertical render", "Vertical Render.", DEFAULT_PROP_VERTICAL_RENDER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - +#endif } static void @@ -793,14 +795,13 @@ gst_text_overlay_set_property (GObject * object, guint prop_id, overlay->auto_adjust_size = g_value_get_boolean (value); overlay->need_render = TRUE; } -#ifdef HAVE_PANGO_VERTICAL_WRITING case PROP_VERTICAL_RENDER: - { +#ifdef HAVE_PANGO_VERTICAL_WRITING overlay->use_vertical_render = g_value_get_boolean (value); gst_text_overlay_update_render_mode (overlay); overlay->need_render = TRUE; - } #endif + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -- 2.7.4