pango: Some minor cleanup

This commit is contained in:
Sebastian Dröge 2009-08-04 11:42:28 +02:00
parent 211ab3649f
commit 8aa87c9153
4 changed files with 33 additions and 41 deletions

View file

@ -60,20 +60,18 @@ enum
PROP_LAST
};
static const GstElementDetails clock_overlay_details =
GST_ELEMENT_DETAILS ("Clock overlay",
"Filter/Editor/Video",
"Overlays the current clock time on a video stream",
"Tim-Philipp Müller <tim@centricular.net>");
GST_BOILERPLATE (GstClockOverlay, gst_clock_overlay, GstTextOverlay,
GST_TYPE_TEXT_OVERLAY)
GST_TYPE_TEXT_OVERLAY);
static void gst_clock_overlay_base_init (gpointer g_class)
static void
gst_clock_overlay_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &clock_overlay_details);
gst_element_class_set_details_simple (element_class, "Clock overlay",
"Filter/Editor/Video",
"Overlays the current clock time on a video stream",
"Tim-Philipp Müller <tim@centricular.net>");
}

View file

@ -93,13 +93,6 @@
GST_DEBUG_CATEGORY (pango_debug);
#define GST_CAT_DEFAULT pango_debug
static const GstElementDetails text_overlay_details =
GST_ELEMENT_DETAILS ("Text overlay",
"Filter/Editor/Video",
"Adds text strings on top of a video buffer",
"David Schleef <ds@schleef.org>, " "Zeeshan Ali <zeeshan.ali@nokia.com>");
#define DEFAULT_PROP_TEXT ""
#define DEFAULT_PROP_SHADING FALSE
#define DEFAULT_PROP_VALIGNMENT GST_TEXT_OVERLAY_VALIGN_BASELINE
@ -307,9 +300,11 @@ static void gst_text_overlay_get_property (GObject * object, guint prop_id,
static void gst_text_overlay_adjust_values_with_fontdesc (GstTextOverlay *
overlay, PangoFontDescription * desc);
GST_BOILERPLATE (GstTextOverlay, gst_text_overlay, GstElement, GST_TYPE_ELEMENT)
GST_BOILERPLATE (GstTextOverlay, gst_text_overlay, GstElement,
GST_TYPE_ELEMENT);
static void gst_text_overlay_base_init (gpointer g_class)
static void
gst_text_overlay_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
@ -325,7 +320,10 @@ GST_BOILERPLATE (GstTextOverlay, gst_text_overlay, GstElement, GST_TYPE_ELEMENT)
gst_static_pad_template_get (&text_sink_template_factory));
}
gst_element_class_set_details (element_class, &text_overlay_details);
gst_element_class_set_details_simple (element_class, "Text overlay",
"Filter/Editor/Video",
"Adds text strings on top of a video buffer",
"David Schleef <ds@schleef.org>, " "Zeeshan Ali <zeeshan.ali@nokia.com>");
}
static gchar *
@ -450,11 +448,12 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_AUTO_ADJUST_SIZE, g_param_spec_boolean ("auto-resize", "auto resize",
"Automatically adjust font size to screen-size.",
DEFAULT_PROP_AUTO_ADJUST_SIZE, G_PARAM_READWRITE));
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));
DEFAULT_PROP_AUTO_ADJUST_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
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));
}

View file

@ -54,13 +54,6 @@ GST_DEBUG_CATEGORY_EXTERN (pango_debug);
#define MINIMUM_OUTLINE_OFFSET 1.0
static const GstElementDetails text_render_details =
GST_ELEMENT_DETAILS ("Text renderer",
"Filter/Editor/Video",
"Renders a text string to an image bitmap",
"David Schleef <ds@schleef.org>, "
"Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
#define DEFAULT_PROP_VALIGNMENT GST_TEXT_RENDER_VALIGN_BASELINE
#define DEFAULT_PROP_HALIGNMENT GST_TEXT_RENDER_HALIGN_CENTER
#define DEFAULT_PROP_LINE_ALIGNMENT GST_TEXT_RENDER_LINE_ALIGN_CENTER
@ -175,7 +168,11 @@ gst_text_render_base_init (gpointer g_class)
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template_factory));
gst_element_class_set_details (element_class, &text_render_details);
gst_element_class_set_details_simple (element_class, "Text renderer",
"Filter/Editor/Video",
"Renders a text string to an image bitmap",
"David Schleef <ds@schleef.org>, "
"Ronald S. Bultje <rbultje@ronald.bitfreak.net>");
}
static void

View file

@ -50,20 +50,18 @@
#include <gsttimeoverlay.h>
static const GstElementDetails time_overlay_details =
GST_ELEMENT_DETAILS ("Time overlay",
"Filter/Editor/Video",
"Overlays buffer time stamps on a video stream",
"Tim-Philipp Müller <tim@centricular.net>");
GST_BOILERPLATE (GstTimeOverlay, gst_time_overlay, GstTextOverlay,
GST_TYPE_TEXT_OVERLAY)
GST_TYPE_TEXT_OVERLAY);
static void gst_time_overlay_base_init (gpointer g_class)
static void
gst_time_overlay_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &time_overlay_details);
gst_element_class_set_details_simple (element_class, "Time overlay",
"Filter/Editor/Video",
"Overlays buffer time stamps on a video stream",
"Tim-Philipp Müller <tim@centricular.net>");
}
static gchar *