mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
textoverlay: make some properties controllable
https://bugzilla.gnome.org/show_bug.cgi?id=638859
This commit is contained in:
parent
1e80f70d7a
commit
e674178331
3 changed files with 15 additions and 4 deletions
|
@ -15,12 +15,14 @@ libgstpango_la_SOURCES = \
|
|||
libgstpango_la_CFLAGS = \
|
||||
$(GST_PLUGINS_BASE_CFLAGS) \
|
||||
$(GST_BASE_CFLAGS) \
|
||||
$(GST_CONTROLLER_CFLAGS) \
|
||||
$(GST_CFLAGS) \
|
||||
$(PANGO_CFLAGS)
|
||||
libgstpango_la_LIBADD = \
|
||||
$(GST_PLUGINS_BASE_LIBS) \
|
||||
$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_MAJORMINOR).la \
|
||||
$(GST_BASE_LIBS) \
|
||||
$(GST_CONTROLLER_LIBS) \
|
||||
$(GST_LIBS) \
|
||||
$(PANGO_LIBS)
|
||||
libgstpango_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
|
|
|
@ -430,7 +430,8 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
|
|||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_XPOS,
|
||||
g_param_spec_double ("xpos", "horizontal position",
|
||||
"Horizontal position when using position alignment", 0, 1.0,
|
||||
DEFAULT_PROP_XPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
DEFAULT_PROP_XPOS,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* GstTextOverlay:ypos
|
||||
*
|
||||
|
@ -441,7 +442,8 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
|
|||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_YPOS,
|
||||
g_param_spec_double ("ypos", "vertical position",
|
||||
"Vertical position when using position alignment", 0, 1.0,
|
||||
DEFAULT_PROP_YPOS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
DEFAULT_PROP_YPOS,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
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.",
|
||||
|
@ -463,7 +465,8 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
|
|||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_COLOR,
|
||||
g_param_spec_uint ("color", "Color",
|
||||
"Color to use for text (big-endian ARGB).", 0, G_MAXUINT32,
|
||||
DEFAULT_PROP_COLOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
DEFAULT_PROP_COLOR,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GstTextOverlay:line-alignment
|
||||
|
@ -489,7 +492,8 @@ gst_text_overlay_class_init (GstTextOverlayClass * klass)
|
|||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SILENT,
|
||||
g_param_spec_boolean ("silent", "silent",
|
||||
"Whether to render the text string",
|
||||
DEFAULT_PROP_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
DEFAULT_PROP_SILENT,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* GstTextOverlay:wait-text
|
||||
*
|
||||
|
@ -2247,6 +2251,8 @@ gst_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
}
|
||||
|
||||
gst_object_sync_values (G_OBJECT (overlay), GST_BUFFER_TIMESTAMP (buffer));
|
||||
|
||||
wait_for_text_buf:
|
||||
|
||||
GST_OBJECT_LOCK (overlay);
|
||||
|
@ -2531,6 +2537,8 @@ gst_text_overlay_change_state (GstElement * element, GstStateChange transition)
|
|||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
gst_controller_init (NULL, NULL);
|
||||
|
||||
if (!gst_element_register (plugin, "textoverlay", GST_RANK_NONE,
|
||||
GST_TYPE_TEXT_OVERLAY) ||
|
||||
!gst_element_register (plugin, "timeoverlay", GST_RANK_NONE,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/controller/gstcontroller.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
|
Loading…
Reference in a new issue