do some name borgifying document

Original commit message from CVS:
do some name borgifying
document
parent 695afd0e
2005-11-25 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/inspect/plugin-autodetect.xml:
* ext/cairo/gstcairo.c: (plugin_init):
* ext/cairo/gsttextoverlay.c: (gst_text_overlay_base_init),
(gst_text_overlay_class_init), (gst_text_overlay_finalize),
(gst_text_overlay_init), (gst_text_overlay_font_init),
(gst_text_overlay_set_property), (gst_text_overlay_render_text),
(gst_text_overlay_getcaps), (gst_text_overlay_setcaps),
(gst_text_overlay_text_pad_linked),
(gst_text_overlay_text_pad_unlinked), (gst_text_overlay_shade_y),
(gst_text_overlay_blit_1), (gst_text_overlay_blit_sub2x2),
(gst_text_overlay_push_frame), (gst_text_overlay_pop_video),
(gst_text_overlay_pop_text), (gst_text_overlay_collected),
(gst_text_overlay_change_state):
* ext/cairo/gsttextoverlay.h:
* ext/cairo/gsttimeoverlay.c:
(gst_cairo_time_overlay_update_font_height),
(gst_cairo_time_overlay_set_caps),
(gst_cairo_time_overlay_get_unit_size),
(gst_cairo_time_overlay_print_smpte_time),
(gst_cairo_time_overlay_transform),
(gst_cairo_time_overlay_base_init),
(gst_cairo_time_overlay_class_init), (gst_cairo_time_overlay_init),
(gst_cairo_time_overlay_get_type):
* ext/cairo/gsttimeoverlay.h:
do some name borgifying
document
2005-11-25 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/plugins/Makefile.am:
......
......@@ -77,7 +77,8 @@ EXTRA_HFILES = \
$(top_srcdir)/gst/autodetect/gstautoaudiosink.h \
$(top_srcdir)/gst/autodetect/gstautovideosink.h \
$(top_srcdir)/gst/level/gstlevel.h \
$(top_srcdir)/gst/goom/gstgoom.h
$(top_srcdir)/gst/goom/gstgoom.h \
$(top_srcdir)/ext/cairo/gsttimeoverlay.h
# example code that needs to be converted to xml and placed in xml/
EXAMPLE_CFILES = \
......
......@@ -14,6 +14,7 @@
<title>gst-plugins-good Elements</title>
<xi:include href="xml/element-autoaudiosink.xml" />
<xi:include href="xml/element-autovideosink.xml" />
<xi:include href="xml/element-cairotimeoverlay.xml" />
<xi:include href="xml/element-goom.xml" />
<xi:include href="xml/element-level.xml" />
</chapter>
......@@ -25,20 +26,27 @@
<xi:include href="xml/plugin-aasink.xml" />
<xi:include href="xml/plugin-alaw.xml" />
<xi:include href="xml/plugin-alpha.xml" />
<xi:include href="xml/plugin-alphacolor.xml" />
<xi:include href="xml/plugin-autodetect.xml" />
<xi:include href="xml/plugin-avi.xml" />
<xi:include href="xml/plugin-cacasink.xml" />
<xi:include href="xml/plugin-cairo.xml" />
<xi:include href="xml/plugin-cutter.xml" />
<xi:include href="xml/plugin-debug.xml" />
<xi:include href="xml/plugin-dv.xml" />
<xi:include href="xml/plugin-efence.xml" />
<xi:include href="xml/plugin-effectv.xml" />
<xi:include href="xml/plugin-esdsink.xml" />
<xi:include href="xml/plugin-fdsrc.xml" />
<xi:include href="xml/plugin-flac.xml" />
<xi:include href="xml/plugin-flxdec.xml" />
<xi:include href="xml/plugin-gconfelements.xml" />
<xi:include href="xml/plugin-goom.xml" />
<xi:include href="xml/plugin-jpeg.xml" />
<xi:include href="xml/plugin-level.xml" />
<xi:include href="xml/plugin-matroska.xml" />
<xi:include href="xml/plugin-mulaw.xml" />
<xi:include href="xml/plugin-navigationtest.xml" />
<xi:include href="xml/plugin-ossaudio.xml" />
<xi:include href="xml/plugin-png.xml" />
<xi:include href="xml/plugin-rtp.xml" />
......@@ -49,6 +57,8 @@
<xi:include href="xml/plugin-udp.xml" />
<xi:include href="xml/plugin-videobox.xml" />
<xi:include href="xml/plugin-videoflip.xml" />
<xi:include href="xml/plugin-videomixer.xml" />
<xi:include href="xml/plugin-wavenc.xml" />
<xi:include href="xml/plugin-wavparse.xml" />
</chapter>
</book>
......@@ -14,6 +14,14 @@ GstAutoVideoSink
GstAutoVideoSinkClass
</SECTION>
<SECTION>
<FILE>element-cairotimeoverlay</FILE>
GstCairoTimeOverlay
<TITLE>cairotimeoverlay</TITLE>
<SUBSECTION Standard>
GstCairoTimeOverlayClass
</SECTION>
<SECTION>
<FILE>element-goom</FILE>
GstGoom
......
......@@ -13,14 +13,14 @@
<name>autoaudiosink</name>
<longname>Auto audio sink</longname>
<class>Sink/Audio</class>
<description>Audio sink embedding the Auto-settings for audio output</description>
<description>Wrapper audio sink for automatically detected audio sink</description>
<author>Ronald Bultje &lt;rbultje@ronald.bitfreak.net&gt;</author>
</element>
<element>
<name>autovideosink</name>
<longname>Auto video sink</longname>
<class>Sink/Video</class>
<description>Video sink embedding the Auto-settings for video output</description>
<description>Wrapper video sink for automatically detected video sink</description>
<author>Ronald Bultje &lt;rbultje@ronald.bitfreak.net&gt;</author>
</element>
</elements>
......
......@@ -33,9 +33,9 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
gst_element_register (plugin, "cairotextoverlay", GST_RANK_NONE,
GST_TYPE_TEXT_OVERLAY);
GST_TYPE_CAIRO_TEXT_OVERLAY);
gst_element_register (plugin, "cairotimeoverlay", GST_RANK_NONE,
GST_TYPE_TIMEOVERLAY);
GST_TYPE_CAIRO_TIME_OVERLAY);
GST_DEBUG_CATEGORY_INIT (cairo_debug, "cairo", 0, "Cairo elements");
......
This diff is collapsed.
#ifndef __GST_TEXT_OVERLAY_H__
#define __GST_TEXT_OVERLAY_H__
#ifndef __GST_CAIRO_TEXT_OVERLAY_H__
#define __GST_CAIRO_TEXT_OVERLAY_H__
#include <gst/gst.h>
#include <gst/base/gstcollectpads.h>
G_BEGIN_DECLS
#define GST_TYPE_TEXT_OVERLAY (gst_text_overlay_get_type())
#define GST_TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
GST_TYPE_TEXT_OVERLAY, GstTextOverlay))
#define GST_TEXT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
GST_TYPE_ULAW, GstTextOverlay))
#define GST_TEXT_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
GST_TYPE_TEXT_OVERLAY, GstTextOverlayClass))
#define GST_IS_TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
GST_TYPE_TEXT_OVERLAY))
#define GST_IS_TEXT_OVERLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
GST_TYPE_TEXT_OVERLAY))
typedef struct _GstTextOverlay GstTextOverlay;
typedef struct _GstTextOverlayClass GstTextOverlayClass;
typedef enum _GstTextOverlayVAlign GstTextOverlayVAlign;
typedef enum _GstTextOverlayHAlign GstTextOverlayHAlign;
enum _GstTextOverlayVAlign {
GST_TEXT_OVERLAY_VALIGN_BASELINE,
GST_TEXT_OVERLAY_VALIGN_BOTTOM,
GST_TEXT_OVERLAY_VALIGN_TOP
#define GST_TYPE_CAIRO_TEXT_OVERLAY (gst_text_overlay_get_type())
#define GST_CAIRO_TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
GST_TYPE_CAIRO_TEXT_OVERLAY, GstCairoTextOverlay))
#define GST_CAIRO_TEXT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
GST_TYPE_ULAW, GstCairoTextOverlay))
#define GST_CAIRO_TEXT_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
GST_TYPE_CAIRO_TEXT_OVERLAY, GstCairoTextOverlayClass))
#define GST_IS_CAIRO_TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
GST_TYPE_CAIRO_TEXT_OVERLAY))
#define GST_IS_CAIRO_TEXT_OVERLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
GST_TYPE_CAIRO_TEXT_OVERLAY))
typedef struct _GstCairoTextOverlay GstCairoTextOverlay;
typedef struct _GstCairoTextOverlayClass GstCairoTextOverlayClass;
typedef enum _GstCairoTextOverlayVAlign GstCairoTextOverlayVAlign;
typedef enum _GstCairoTextOverlayHAlign GstCairoTextOverlayHAlign;
enum _GstCairoTextOverlayVAlign {
GST_CAIRO_TEXT_OVERLAY_VALIGN_BASELINE,
GST_CAIRO_TEXT_OVERLAY_VALIGN_BOTTOM,
GST_CAIRO_TEXT_OVERLAY_VALIGN_TOP
};
enum _GstTextOverlayHAlign {
GST_TEXT_OVERLAY_HALIGN_LEFT,
GST_TEXT_OVERLAY_HALIGN_CENTER,
GST_TEXT_OVERLAY_HALIGN_RIGHT
enum _GstCairoTextOverlayHAlign {
GST_CAIRO_TEXT_OVERLAY_HALIGN_LEFT,
GST_CAIRO_TEXT_OVERLAY_HALIGN_CENTER,
GST_CAIRO_TEXT_OVERLAY_HALIGN_RIGHT
};
struct _GstTextOverlay {
struct _GstCairoTextOverlay {
GstElement element;
GstPad *video_sinkpad;
......@@ -54,8 +54,8 @@ struct _GstTextOverlay {
gint fps_n;
gint fps_d;
GstTextOverlayVAlign valign;
GstTextOverlayHAlign halign;
GstCairoTextOverlayVAlign valign;
GstCairoTextOverlayHAlign halign;
gint xpad;
gint ypad;
gint deltax;
......@@ -77,7 +77,7 @@ struct _GstTextOverlay {
gdouble scale;
};
struct _GstTextOverlayClass {
struct _GstCairoTextOverlayClass {
GstElementClass parent_class;
};
......@@ -85,4 +85,4 @@ GType gst_text_overlay_get_type (void);
G_END_DECLS
#endif /* __GST_TEXT_OVERLAY_H */
#endif /* __GST_CAIRO_TEXT_OVERLAY_H */
......@@ -18,9 +18,21 @@
* Boston, MA 02111-1307, USA.
*/
/*
* This file was (probably) generated from gsttimeoverlay.c,
* gsttimeoverlay.c,v 1.7 2003/11/08 02:48:59 dschleef Exp
/**
* SECTION:element-cairotimeoverlay
*
* <refsect2>
* <para>
* cairotimeoverlay renders the buffer timestamp for each frame on top of
* the frame.
* </para>
* <title>Example launch line</title>
* <para>
* <programlisting>
* gst-launch -v -m videotestsrc ! cairotimeoverlay ! autovideosink
* </programlisting>
* </para>
* </refsect2>
*/
#ifdef HAVE_CONFIG_H
......@@ -36,30 +48,30 @@
#include <gst/video/video.h>
static GstElementDetails timeoverlay_details =
static GstElementDetails cairo_time_overlay_details =
GST_ELEMENT_DETAILS ("Time Overlay",
"Filter/Editor/Video",
"Overlays the time on a video stream",
"David Schleef <ds@schleef.org>");
static GstStaticPadTemplate gst_timeoverlay_src_template =
static GstStaticPadTemplate gst_cairo_time_overlay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
static GstStaticPadTemplate gst_timeoverlay_sink_template =
static GstStaticPadTemplate gst_cairo_time_overlay_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
);
static GstVideofilterClass *parent_class = NULL;
static GstBaseTransformClass *parent_class = NULL;
static void
gst_timeoverlay_update_font_height (GstTimeoverlay * timeoverlay)
gst_cairo_time_overlay_update_font_height (GstCairoTimeOverlay * timeoverlay)
{
gint width, height;
cairo_surface_t *font_surface;
......@@ -85,10 +97,10 @@ gst_timeoverlay_update_font_height (GstTimeoverlay * timeoverlay)
}
static gboolean
gst_timeoverlay_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
gst_cairo_time_overlay_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
GstCaps * outcaps)
{
GstTimeoverlay *filter = GST_TIMEOVERLAY (btrans);
GstCairoTimeOverlay *filter = GST_CAIRO_TIME_OVERLAY (btrans);
GstStructure *structure;
gboolean ret = FALSE;
......@@ -96,7 +108,7 @@ gst_timeoverlay_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
if (gst_structure_get_int (structure, "width", &filter->width) &&
gst_structure_get_int (structure, "height", &filter->height)) {
gst_timeoverlay_update_font_height (filter);
gst_cairo_time_overlay_update_font_height (filter);
ret = TRUE;
}
......@@ -115,15 +127,15 @@ gst_timeoverlay_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
#define GST_VIDEO_I420_SIZE(w,h) (GST_VIDEO_I420_V_OFFSET(w,h)+(GST_VIDEO_I420_V_ROWSTRIDE(w)*GST_ROUND_UP_2(h)/2))
static gboolean
gst_timeoverlay_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
gst_cairo_time_overlay_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
guint * size)
{
GstTimeoverlay *filter;
GstCairoTimeOverlay *filter;
GstStructure *structure;
gboolean ret = FALSE;
gint width, height;
filter = GST_TIMEOVERLAY (btrans);
filter = GST_CAIRO_TIME_OVERLAY (btrans);
structure = gst_caps_get_structure (caps, 0);
......@@ -139,7 +151,7 @@ gst_timeoverlay_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
}
static char *
gst_timeoverlay_print_smpte_time (guint64 time)
gst_cairo_time_overlay_print_smpte_time (guint64 time)
{
int hours;
int minutes;
......@@ -162,10 +174,10 @@ gst_timeoverlay_print_smpte_time (guint64 time)
static GstFlowReturn
gst_timeoverlay_transform (GstBaseTransform * trans, GstBuffer * in,
gst_cairo_time_overlay_transform (GstBaseTransform * trans, GstBuffer * in,
GstBuffer * out)
{
GstTimeoverlay *timeoverlay;
GstCairoTimeOverlay *timeoverlay;
int width;
int height;
int b_width;
......@@ -178,7 +190,7 @@ gst_timeoverlay_transform (GstBaseTransform * trans, GstBuffer * in,
cairo_t *text_cairo;
GstFlowReturn ret = GST_FLOW_OK;
timeoverlay = GST_TIMEOVERLAY (trans);
timeoverlay = GST_CAIRO_TIME_OVERLAY (trans);
gst_buffer_stamp (out, in);
......@@ -209,7 +221,7 @@ gst_timeoverlay_transform (GstBaseTransform * trans, GstBuffer * in,
cairo_fill (text_cairo);
cairo_restore (text_cairo);
string = gst_timeoverlay_print_smpte_time (GST_BUFFER_TIMESTAMP (in));
string = gst_cairo_time_overlay_print_smpte_time (GST_BUFFER_TIMESTAMP (in));
cairo_save (text_cairo);
cairo_select_font_face (text_cairo, "monospace", 0, 0);
cairo_set_font_size (text_cairo, 20);
......@@ -246,20 +258,20 @@ gst_timeoverlay_transform (GstBaseTransform * trans, GstBuffer * in,
}
static void
gst_timeoverlay_base_init (gpointer g_class)
gst_cairo_time_overlay_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &timeoverlay_details);
gst_element_class_set_details (element_class, &cairo_time_overlay_details);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_timeoverlay_sink_template));
gst_static_pad_template_get (&gst_cairo_time_overlay_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_timeoverlay_src_template));
gst_static_pad_template_get (&gst_cairo_time_overlay_src_template));
}
static void
gst_timeoverlay_class_init (gpointer klass, gpointer class_data)
gst_cairo_time_overlay_class_init (gpointer klass, gpointer class_data)
{
GObjectClass *gobject_class;
GstElementClass *element_class;
......@@ -271,37 +283,37 @@ gst_timeoverlay_class_init (gpointer klass, gpointer class_data)
parent_class = g_type_class_peek_parent (klass);
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_timeoverlay_set_caps);
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_cairo_time_overlay_set_caps);
trans_class->get_unit_size =
GST_DEBUG_FUNCPTR (gst_timeoverlay_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_timeoverlay_transform);
GST_DEBUG_FUNCPTR (gst_cairo_time_overlay_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_cairo_time_overlay_transform);
}
static void
gst_timeoverlay_init (GTypeInstance * instance, gpointer g_class)
gst_cairo_time_overlay_init (GTypeInstance * instance, gpointer g_class)
{
}
GType
gst_timeoverlay_get_type (void)
gst_cairo_time_overlay_get_type (void)
{
static GType timeoverlay_type = 0;
static GType cairo_time_overlay_type = 0;
if (!timeoverlay_type) {
static const GTypeInfo timeoverlay_info = {
sizeof (GstTimeoverlayClass),
gst_timeoverlay_base_init,
if (!cairo_time_overlay_type) {
static const GTypeInfo cairo_time_overlay_info = {
sizeof (GstCairoTimeOverlayClass),
gst_cairo_time_overlay_base_init,
NULL,
gst_timeoverlay_class_init,
gst_cairo_time_overlay_class_init,
NULL,
NULL,
sizeof (GstTimeoverlay),
sizeof (GstCairoTimeOverlay),
0,
gst_timeoverlay_init,
gst_cairo_time_overlay_init,
};
timeoverlay_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
"GstTimeoverlay", &timeoverlay_info, 0);
cairo_time_overlay_type = g_type_register_static (GST_TYPE_BASE_TRANSFORM,
"GstCairoTimeOverlay", &cairo_time_overlay_info, 0);
}
return timeoverlay_type;
return cairo_time_overlay_type;
}
......@@ -17,48 +17,43 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_TIMEOVERLAY_H__
#define __GST_TIMEOVERLAY_H__
#ifndef __GST_CAIRO_TIME_OVERLAY_H__
#define __GST_CAIRO_TIME_OVERLAY_H__
#include <gst/gst.h>
#include <gst/base/gstbasetransform.h>
#include <cairo.h>
#include "gstvideofilter.h"
G_BEGIN_DECLS
#define GST_TYPE_TIMEOVERLAY \
(gst_timeoverlay_get_type())
#define GST_TIMEOVERLAY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_TIMEOVERLAY,GstTimeoverlay))
#define GST_TIMEOVERLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_TIMEOVERLAY,GstTimeoverlayClass))
#define GST_IS_TIMEOVERLAY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TIMEOVERLAY))
#define GST_IS_TIMEOVERLAY_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TIMEOVERLAY))
#define GST_TYPE_CAIRO_TIME_OVERLAY \
(gst_cairo_time_overlay_get_type())
#define GST_CAIRO_TIME_OVERLAY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAIRO_TIME_OVERLAY,GstCairoTimeOverlay))
#define GST_CAIRO_TIME_OVERLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAIRO_TIME_OVERLAY,GstCairoTimeOverlayClass))
#define GST_IS_CAIRO_TIME_OVERLAY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAIRO_TIME_OVERLAY))
#define GST_IS_CAIRO_TIME_OVERLAY_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAIRO_TIME_OVERLAY))
typedef struct _GstTimeoverlay GstTimeoverlay;
typedef struct _GstTimeoverlayClass GstTimeoverlayClass;
struct _GstTimeoverlay {
GstVideofilter videofilter;
typedef struct _GstCairoTimeOverlay {
GstBaseTransform basetransform;
gint width, height;
cairo_surface_t *surface;
cairo_t *cr;
int text_height;
};
} GstCairoTimeOverlay;
struct _GstTimeoverlayClass {
GstVideofilterClass parent_class;
};
typedef struct _GstCairoTimeOverlayClass {
GstBaseTransformClass parent_class;
} GstCairoTimeOverlayClass;
GType gst_timeoverlay_get_type(void);
GType gst_cairo_time_overlay_get_type(void);
G_END_DECLS
#endif /* __GST_TIMEOVERLAY_H__ */
#endif /* __GST_CAIRO_TIME_OVERLAY_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment