Commit 81e72d14 authored by Wim Taymans's avatar Wim Taymans

Updated/added documentation.

Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* ext/pango/gstclockoverlay.h:
* ext/pango/gsttextoverlay.h:
* ext/pango/gsttextrender.h:
* ext/pango/gsttimeoverlay.h:
* ext/theora/gsttheoradec.h:
* ext/theora/gsttheoraenc.h:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* gst/audioconvert/gstaudioconvert.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
* gst/ffmpegcolorspace/gstffmpegcolorspace.h:
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init):
* gst/tcp/gstmultifdsink.h:
Updated/added documentation.
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type),
(gst_text_overlay_base_init), (gst_text_overlay_class_init),
(gst_text_overlay_init), (gst_text_overlay_set_property),
(gst_text_overlay_get_property):
Fix up properties to be enums instead of string to make bindings,
introspection and automatic GUI creation possible.
Add getters for the properties.
parent 81311ccf
2006-03-01 Wim Taymans <wim@fluendo.com>
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
* ext/pango/gstclockoverlay.h:
* ext/pango/gsttextoverlay.h:
* ext/pango/gsttextrender.h:
* ext/pango/gsttimeoverlay.h:
* ext/theora/gsttheoradec.h:
* ext/theora/gsttheoraenc.h:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* gst/audioconvert/gstaudioconvert.h:
* gst/audiotestsrc/gstaudiotestsrc.h:
* gst/ffmpegcolorspace/gstffmpegcolorspace.h:
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init):
* gst/tcp/gstmultifdsink.h:
Updated/added documentation.
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type),
(gst_text_overlay_base_init), (gst_text_overlay_class_init),
(gst_text_overlay_init), (gst_text_overlay_set_property),
(gst_text_overlay_get_property):
Fix up properties to be enums instead of string to make bindings,
introspection and automatic GUI creation possible.
Add getters for the properties.
2006-02-28 Sebastien Moutte <sebastien@moutte.net>
* gst/audiotestsrc/gstaudiotestsrc.c:
......
......@@ -80,6 +80,7 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/pango/gsttextoverlay.h \
$(top_srcdir)/ext/pango/gsttextrender.h \
$(top_srcdir)/ext/pango/gsttimeoverlay.h \
$(top_srcdir)/ext/theora/gsttheoradec.h \
$(top_srcdir)/ext/theora/gsttheoraenc.h \
$(top_srcdir)/ext/vorbis/vorbisenc.h \
$(top_srcdir)/gst/audioconvert/gstaudioconvert.h \
......
......@@ -20,6 +20,7 @@
<xi:include href="xml/element-gnomevfssrc.xml" />
<xi:include href="xml/element-multifdsink.xml" />
<xi:include href="xml/element-tcpserversink.xml" />
<xi:include href="xml/element-theoradec.xml" />
<xi:include href="xml/element-theoraenc.xml" />
<xi:include href="xml/element-textoverlay.xml" />
<xi:include href="xml/element-textrender.xml" />
......
<SECTION>
<FILE>element-audioconvert</FILE>
<TITLE>audioconvert</TITLE>
GstAudioConvert
<SUBSECTION Standard>
GST_AUDIO_CONVERT
GST_AUDIO_CONVERT_CLASS
GST_IS_AUDIO_CONVERT
GST_IS_AUDIO_CONVERT_CLASS
GST_TYPE_AUDIO_CONVERT
GstAudioConvertClass
</SECTION>
......@@ -11,8 +15,20 @@ GstAudioConvertClass
<FILE>element-audiotestsrc</FILE>
<TITLE>audiotestsrc</TITLE>
GstAudioTestSrc
GstAudioTestSrcWave
<SUBSECTION Standard>
GST_AUDIO_TEST_SRC
GST_AUDIO_TEST_SRC_CLASS
GST_IS_AUDIO_TEST_SRC
GST_IS_AUDIO_TEST_SRC_CLASS
GST_TYPE_AUDIO_TEST_SRC
GstAudioTestSrcClass
gst_audio_test_src_factory_init
gst_audio_test_src_get_type
GstPinkNoise
PINK_MAX_RANDOM_ROWS
PINK_RANDOM_BITS
PINK_RANDOM_SHIFT
</SECTION>
<SECTION>
......@@ -20,7 +36,13 @@ GstAudioTestSrcClass
<TITLE>clockoverlay</TITLE>
GstClockOverlay
<SUBSECTION Standard>
GST_CLOCK_OVERLAY
GST_CLOCK_OVERLAY_CLASS
GST_IS_CLOCK_OVERLAY
GST_IS_CLOCK_OVERLAY_CLASS
GST_TYPE_CLOCK_OVERLAY
GstClockOverlayClass
gst_clock_overlay_get_type
</SECTION>
<SECTION>
......@@ -28,6 +50,11 @@ GstClockOverlayClass
<TITLE>ffmpegcolorspace</TITLE>
GstFFMpegCsp
<SUBSECTION Standard>
GST_FFMPEGCSP
GST_FFMPEGCSP_CLASS
GST_IS_FFMPEGCSP
GST_IS_FFMPEGCSP_CLASS
GST_TYPE_FFMPEGCSP
GstFFMpegCspClass
</SECTION>
......@@ -35,14 +62,29 @@ GstFFMpegCspClass
<FILE>element-multifdsink</FILE>
<TITLE>multifdsink</TITLE>
GstMultiFdSink
GstMultiFdSinkFlags
GstRecoverPolicy
GstSyncMethod
GstUnitType
GstClientStatus
<SUBSECTION Standard>
CLIENTS_LOCK
CLIENTS_LOCK_FREE
CLIENTS_LOCK_INIT
CLIENTS_UNLOCK
GST_TYPE_MULTI_FD_SINK
GST_IS_MULTI_FD_SINK
GST_IS_MULTI_FD_SINK_CLASS
GST_MULTI_FD_SINK
GST_MULTI_FD_SINK_CLASS
GST_MULTI_FD_SINK_GET_CLASS
GstTCPClient
GstUnitType
GstMultiFdSinkFlags
GstMultiFdSinkClass
gst_multi_fd_sink_add
gst_multi_fd_sink_clear
gst_multi_fd_sink_get_stats
gst_multi_fd_sink_get_type
gst_multi_fd_sink_remove
</SECTION>
<SECTION>
......@@ -51,6 +93,12 @@ GstMultiFdSinkClass
GstGnomeVFSSink
<SUBSECTION Standard>
GstGnomeVFSSinkClass
GST_GNOME_VFS_SINK_CLASS
GST_TYPE_GNOME_VFS_SINK
GST_IS_GNOME_VFS_SINK
gst_gnome_vfs_sink_get_type
GST_IS_GNOME_VFS_SINK_CLASS
GST_GNOME_VFS_SINK
</SECTION>
<SECTION>
......@@ -58,7 +106,13 @@ GstGnomeVFSSinkClass
<TITLE>gnomevfssrc</TITLE>
GstGnomeVFSSrc
<SUBSECTION Standard>
GST_GNOME_VFS_SRC
GST_GNOME_VFS_SRC_CLASS
GST_IS_GNOME_VFS_SRC
GST_IS_GNOME_VFS_SRC_CLASS
GST_TYPE_GNOME_VFS_SRC
GstGnomeVFSSrcClass
gst_gnome_vfs_src_get_type
</SECTION>
<SECTION>
......@@ -67,14 +121,30 @@ GstGnomeVFSSrcClass
GstTCPServerSink
<SUBSECTION Standard>
GstTCPServerSinkClass
GST_TCP_SERVER_SINK
GstTCPServerSinkFlags
GST_TYPE_TCP_SERVER_SINK
gst_tcp_server_sink_get_type
GST_IS_TCP_SERVER_SINK_CLASS
GST_IS_TCP_SERVER_SINK
</SECTION>
<SECTION>
<FILE>element-textoverlay</FILE>
<TITLE>textoverlay</TITLE>
GstTextOverlay
GstTextOverlayVAlign
GstTextOverlayHAlign
GstTextOverlayWrapMode
<SUBSECTION Standard>
GST_TEXT_OVERLAY
GST_TEXT_OVERLAY_CLASS
GST_TEXT_OVERLAY_GET_CLASS
GST_IS_TEXT_OVERLAY
GST_IS_TEXT_OVERLAY_CLASS
GST_TYPE_TEXT_OVERLAY
GstTextOverlayClass
gst_text_overlay_get_type
</SECTION>
<SECTION>
......@@ -82,7 +152,27 @@ GstTextOverlayClass
<TITLE>textrender</TITLE>
GstTextRender
<SUBSECTION Standard>
GST_TEXT_RENDER
GST_TEXT_RENDER_CLASS
GST_TEXT_RENDER_GET_CLASS
GST_IS_TEXT_RENDER
GST_IS_TEXT_RENDER_CLASS
GST_TYPE_TEXT_RENDER
GstTextRenderClass
gst_text_render_get_type
</SECTION>
<SECTION>
<FILE>element-theoradec</FILE>
<TITLE>theoradec</TITLE>
GstTheoraDec
<SUBSECTION Standard>
GST_THEORA_DEC
GST_IS_THEORA_DEC
GST_TYPE_THEORA_DEC
GST_THEORA_DEC_CLASS
GST_IS_THEORA_DEC_CLASS
GstTheoraDecClass
</SECTION>
<SECTION>
......@@ -91,6 +181,11 @@ GstTextRenderClass
GstTheoraEnc
GstTheoraEncBorderMode
<SUBSECTION Standard>
GST_THEORA_ENC
GST_THEORA_ENC_CLASS
GST_IS_THEORA_ENC
GST_IS_THEORA_ENC_CLASS
GST_TYPE_THEORA_ENC
GstTheoraEncClass
</SECTION>
......@@ -99,7 +194,13 @@ GstTheoraEncClass
<TITLE>timeoverlay</TITLE>
GstTimeOverlay
<SUBSECTION Standard>
GST_TIME_OVERLAY
GST_TIME_OVERLAY_CLASS
GST_IS_TIME_OVERLAY
GST_IS_TIME_OVERLAY_CLASS
GST_TYPE_TIME_OVERLAY
GstTimeOverlayClass
gst_time_overlay_get_type
</SECTION>
<SECTION>
......@@ -108,7 +209,13 @@ GstTimeOverlayClass
GstVideoTestSrc
GstVideoTestSrcPattern
<SUBSECTION Standard>
GST_VIDEO_TEST_SRC
GST_VIDEO_TEST_SRC_CLASS
GST_IS_VIDEO_TEST_SRC
GST_IS_VIDEO_TEST_SRC_CLASS
GST_TYPE_VIDEO_TEST_SRC
GstVideoTestSrcClass
gst_video_test_src_get_type
</SECTION>
<SECTION>
......@@ -116,7 +223,13 @@ GstVideoTestSrcClass
<TITLE>volume</TITLE>
GstVolume
<SUBSECTION Standard>
GST_VOLUME
GST_VOLUME_CLASS
GST_IS_VOLUME
GST_IS_VOLUME_CLASS
GST_TYPE_VOLUME
GstVolumeClass
gst_volume_get_type
</SECTION>
<SECTION>
......@@ -125,6 +238,13 @@ GstVolumeClass
GstVorbisEnc
<SUBSECTION Standard>
GstVorbisEncClass
vorbisenc_get_type
GST_IS_VORBISENC
GST_VORBISENC_CLASS
GST_VORBISENC
GST_TCP_SERVER_SINK_CLASS
GST_TYPE_VORBISENC
GST_IS_VORBISENC_CLASS
</SECTION>
<SECTION>
......@@ -132,7 +252,13 @@ GstVorbisEncClass
<TITLE>ximagesink</TITLE>
GstXImageSink
<SUBSECTION Standard>
GST_XIMAGESINK
GST_XIMAGESINK_CLASS
GST_IS_XIMAGESINK
GST_IS_XIMAGESINK_CLASS
GST_TYPE_XIMAGESINK
GstXImagesSinkClass
gst_ximagesink_get_type
</SECTION>
<SECTION>
......@@ -140,50 +266,11 @@ GstXImagesSinkClass
<TITLE>xvimagesink</TITLE>
GstXvImageSink
<SUBSECTION Standard>
GST_XVIMAGESINK
GST_XVIMAGESINK_CLASS
GST_IS_XVIMAGESINK
GST_IS_XVIMAGESINK_CLASS
GST_TYPE_XVIMAGESINK
GstXvImagesSinkClass
</SECTION>
<SECTION>
<FILE>private</FILE>
CLIENTS_UNLOCK
CLIENTS_LOCK_INIT
GST_MULTI_FD_SINK_GET_CLASS
CLIENTS_LOCK_FREE
GST_IS_MULTI_FD_SINK_CLASS
gst_multi_fd_sink_get_type
gst_multi_fd_sink_remove
GST_IS_MULTI_FD_SINK
CLIENTS_LOCK
GST_TYPE_MULTI_FD_SINK
gst_multi_fd_sink_clear
GstTCPClient
GST_MULTI_FD_SINK_CLASS
gst_multi_fd_sink_get_stats
GST_MULTI_FD_SINK
gst_multi_fd_sink_add
GST_TCP_SERVER_SINK
GstTCPServerSinkFlags
GST_TYPE_TCP_SERVER_SINK
gst_tcp_server_sink_get_type
GST_IS_TCP_SERVER_SINK_CLASS
GST_IS_TCP_SERVER_SINK
GST_GNOME_VFS_SINK_CLASS
GST_TYPE_GNOME_VFS_SINK
GST_IS_GNOME_VFS_SINK
gst_gnome_vfs_sink_get_type
GST_IS_GNOME_VFS_SINK_CLASS
GST_ELEMENT_CLASS
GST_GNOME_VFS_SINK
GST_IS_VORBISENC
GST_VORBISENC_CLASS
GST_VORBISENC
GST_TCP_SERVER_SINK_CLASS
GST_TYPE_VORBISENC
GST_IS_VORBISENC_CLASS
vorbisenc_get_type
gst_xvimagesink_get_type
</SECTION>
......@@ -40,6 +40,11 @@ G_BEGIN_DECLS
typedef struct _GstClockOverlay GstClockOverlay;
typedef struct _GstClockOverlayClass GstClockOverlayClass;
/**
* GstClockOverlay:
*
* Opaque clockoverlay data structure.
*/
struct _GstClockOverlay {
GstTextOverlay textoverlay;
};
......
......@@ -100,19 +100,34 @@ static GstElementDetails text_overlay_details = {
"David Schleef <ds@schleef.org>"
};
#define DEFAULT_PROP_TEXT ""
#define DEFAULT_PROP_SHADING FALSE
#define DEFAULT_PROP_VALIGN GST_TEXT_OVERLAY_VALIGN_BASELINE
#define DEFAULT_PROP_HALIGN GST_TEXT_OVERLAY_HALIGN_CENTER
#define DEFAULT_PROP_XPAD 25
#define DEFAULT_PROP_YPAD 25
#define DEFAULT_PROP_DELTAX 0
#define DEFAULT_PROP_DELTAY 0
#define DEFAULT_PROP_WRAP_MODE GST_TEXT_OVERLAY_WRAP_MODE_WORD_CHAR
#define DEFAULT_PROP_FONT_DESC ""
/* make a property of me */
#define DEFAULT_SHADING_VALUE -80
enum
{
ARG_0,
ARG_TEXT,
ARG_SHADING,
ARG_VALIGN,
ARG_HALIGN,
ARG_XPAD,
ARG_YPAD,
ARG_DELTAX,
ARG_DELTAY,
ARG_WRAP_MODE,
ARG_FONT_DESC
PROP_0,
PROP_TEXT,
PROP_SHADING,
PROP_VALIGN,
PROP_HALIGN,
PROP_XPAD,
PROP_YPAD,
PROP_DELTAX,
PROP_DELTAY,
PROP_WRAP_MODE,
PROP_FONT_DESC
};
......@@ -137,6 +152,67 @@ static GstStaticPadTemplate text_sink_template_factory =
GST_STATIC_CAPS ("text/x-pango-markup; text/plain")
);
#define GST_TYPE_TEXT_OVERLAY_VALIGN (gst_text_overlay_valign_get_type())
static GType
gst_text_overlay_valign_get_type (void)
{
static GType text_overlay_valign_type = 0;
static GEnumValue text_overlay_valign[] = {
{GST_TEXT_OVERLAY_VALIGN_BASELINE, "baseline", "baseline"},
{GST_TEXT_OVERLAY_VALIGN_BOTTOM, "bottom", "bottom"},
{GST_TEXT_OVERLAY_VALIGN_TOP, "top", "top"},
{0, NULL, NULL},
};
if (!text_overlay_valign_type) {
text_overlay_valign_type =
g_enum_register_static ("GstTextOverlayVAlign", text_overlay_valign);
}
return text_overlay_valign_type;
}
#define GST_TYPE_TEXT_OVERLAY_HALIGN (gst_text_overlay_halign_get_type())
static GType
gst_text_overlay_halign_get_type (void)
{
static GType text_overlay_halign_type = 0;
static GEnumValue text_overlay_halign[] = {
{GST_TEXT_OVERLAY_HALIGN_LEFT, "left", "left"},
{GST_TEXT_OVERLAY_HALIGN_CENTER, "center", "center"},
{GST_TEXT_OVERLAY_HALIGN_RIGHT, "right", "right"},
{0, NULL, NULL},
};
if (!text_overlay_halign_type) {
text_overlay_halign_type =
g_enum_register_static ("GstTextOverlayHAlign", text_overlay_halign);
}
return text_overlay_halign_type;
}
#define GST_TYPE_TEXT_OVERLAY_WRAP_MODE (gst_text_overlay_wrap_mode_get_type())
static GType
gst_text_overlay_wrap_mode_get_type (void)
{
static GType text_overlay_wrap_mode_type = 0;
static GEnumValue text_overlay_wrap_mode[] = {
{GST_TEXT_OVERLAY_WRAP_MODE_NONE, "none", "none"},
{GST_TEXT_OVERLAY_WRAP_MODE_WORD, "word", "word"},
{GST_TEXT_OVERLAY_WRAP_MODE_CHAR, "char", "char"},
{GST_TEXT_OVERLAY_WRAP_MODE_WORD_CHAR, "wordchar", "wordchar"},
{0, NULL, NULL},
};
if (!text_overlay_wrap_mode_type) {
text_overlay_wrap_mode_type =
g_enum_register_static ("GstTextOverlayWrapMode",
text_overlay_wrap_mode);
}
return text_overlay_wrap_mode_type;
}
/* These macros are adapted from videotestsrc.c */
#define I420_Y_ROWSTRIDE(width) (GST_ROUND_UP_4(width))
#define I420_U_ROWSTRIDE(width) (GST_ROUND_UP_8(width)/2)
......@@ -175,16 +251,11 @@ static void gst_text_overlay_pop_text (GstTextOverlay * overlay);
static void gst_text_overlay_finalize (GObject * object);
static void gst_text_overlay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_text_overlay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
GST_BOILERPLATE (GstTextOverlay, gst_text_overlay, GstElement, GST_TYPE_ELEMENT)
#define DEFAULT_YPAD 25
#define DEFAULT_XPAD 25
#define DEFAULT_DELTAX 0
#define DEFAULT_DELTAY 0
/* keep wrap enum in sync with string in class_init */
#define DEFAULT_WRAP_MODE GST_TEXT_OVERLAY_WRAP_MODE_WORD_CHAR
#define DEFAULT_SHADING_VALUE -80
static void gst_text_overlay_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
......@@ -221,6 +292,7 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
gobject_class->finalize = gst_text_overlay_finalize;
gobject_class->set_property = gst_text_overlay_set_property;
gobject_class->get_property = gst_text_overlay_get_property;
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_text_overlay_change_state);
......@@ -228,51 +300,48 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
klass->get_text = gst_text_overlay_get_text;
klass->pango_context = pango_ft2_get_context (72, 72);
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TEXT,
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TEXT,
g_param_spec_string ("text", "text",
"Text to be display.", "", G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SHADING,
"Text to be display.", DEFAULT_PROP_TEXT, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SHADING,
g_param_spec_boolean ("shaded-background", "shaded background",
"Whether to shade the background under the text area", FALSE,
G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_VALIGN,
g_param_spec_string ("valign", "vertical alignment",
"Vertical alignment of the text. "
"Can be either 'baseline', 'bottom', or 'top'",
"baseline", G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HALIGN,
g_param_spec_string ("halign", "horizontal alignment",
"Horizontal alignment of the text. "
"Can be either 'left', 'right', or 'center'",
"center", G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_XPAD,
"Whether to shade the background under the text area",
DEFAULT_PROP_SHADING, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VALIGN,
g_param_spec_enum ("valign", "vertical alignment",
"Vertical alignment of the text. ",
GST_TYPE_TEXT_OVERLAY_VALIGN, DEFAULT_PROP_VALIGN,
G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HALIGN,
g_param_spec_enum ("halign", "horizontal alignment",
"Horizontal alignment of the text. ", GST_TYPE_TEXT_OVERLAY_HALIGN,
DEFAULT_PROP_HALIGN, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_XPAD,
g_param_spec_int ("xpad", "horizontal paddding",
"Horizontal paddding when using left/right alignment",
0, G_MAXINT, DEFAULT_XPAD, G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_YPAD,
"Horizontal paddding when using left/right alignment", 0, G_MAXINT,
DEFAULT_PROP_XPAD, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_YPAD,
g_param_spec_int ("ypad", "vertical padding",
"Vertical padding when using top/bottom alignment",
0, G_MAXINT, DEFAULT_YPAD, G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DELTAX,
"Vertical padding when using top/bottom alignment", 0, G_MAXINT,
DEFAULT_PROP_YPAD, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DELTAX,
g_param_spec_int ("deltax", "X position modifier",
"Shift X position to the left or to the right. Unit is pixels.",
G_MININT, G_MAXINT, 0, G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DELTAY,
G_MININT, G_MAXINT, DEFAULT_PROP_DELTAX, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DELTAY,
g_param_spec_int ("deltay", "Y position modifier",
"Shift Y position up or down. Unit is pixels.",
G_MININT, G_MAXINT, 0, G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_WRAP_MODE,
g_param_spec_string ("wrap-mode", "wrap mode",
"Whether to wrap the text and if so how."
"Can be either 'none', 'word', 'char' or 'wordchar'",
"wordchar", G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FONT_DESC,
"Shift Y position up or down. Unit is pixels.", G_MININT, G_MAXINT,
DEFAULT_PROP_DELTAY, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WRAP_MODE,
g_param_spec_enum ("wrap-mode", "wrap mode",
"Whether to wrap the text and if so how.",
GST_TYPE_TEXT_OVERLAY_WRAP_MODE, DEFAULT_PROP_WRAP_MODE,
G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FONT_DESC,
g_param_spec_string ("font-desc", "font description",
"Pango font description of font "
"to be used for rendering. "
"See documentation of "
"pango_font_description_from_string"
" for syntax.", "", G_PARAM_WRITABLE));
"Pango font description of font to be used for rendering. "
"See documentation of pango_font_description_from_string "
"for syntax.", DEFAULT_PROP_FONT_DESC, G_PARAM_WRITABLE));
}
static void
......@@ -353,19 +422,19 @@ gst_text_overlay_init (GstTextOverlay * overlay, GstTextOverlayClass * klass)
pango_layout_new (GST_TEXT_OVERLAY_GET_CLASS (overlay)->pango_context);
memset (&overlay->bitmap, 0, sizeof (overlay->bitmap));
overlay->halign = GST_TEXT_OVERLAY_HALIGN_CENTER;
overlay->valign = GST_TEXT_OVERLAY_VALIGN_BASELINE;
overlay->xpad = DEFAULT_XPAD;
overlay->ypad = DEFAULT_YPAD;
overlay->deltax = 0;
overlay->deltay = 0;
overlay->halign = DEFAULT_PROP_HALIGN;
overlay->valign = DEFAULT_PROP_VALIGN;
overlay->xpad = DEFAULT_PROP_XPAD;
overlay->ypad = DEFAULT_PROP_YPAD;
overlay->deltax = DEFAULT_PROP_DELTAX;
overlay->deltay = DEFAULT_PROP_DELTAY;
overlay->wrap_mode = DEFAULT_WRAP_MODE;
overlay->wrap_mode = DEFAULT_PROP_WRAP_MODE;
overlay->want_shading = FALSE;
overlay->want_shading = DEFAULT_PROP_SHADING;
overlay->shading_value = DEFAULT_SHADING_VALUE;
overlay->default_text = g_strdup ("");
overlay->default_text = g_strdup (DEFAULT_PROP_TEXT);
overlay->need_render = TRUE;