Commit 5e896f15 authored by David Schleef's avatar David Schleef

Add textoverlay element that was previously in the sandbox

Original commit message from CVS:
Add textoverlay element that was previously in the sandbox
parent 85791b98
......@@ -3,12 +3,16 @@ plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
#PANGO_CFLAGS = -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2
#PANGO_LDFLAGS = -Wl,--export-dynamic -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
plugin_LTLIBRARIES = libgsttimeoverlay.la
plugin_LTLIBRARIES = libgsttimeoverlay.la libgsttextoverlay.la
noinst_HEADERS = gsttimeoverlay.h
noinst_HEADERS = gsttimeoverlay.h gsttextoverlay.h
libgsttimeoverlay_la_SOURCES = gsttimeoverlay.c
libgsttimeoverlay_la_CFLAGS = $(GST_CFLAGS) $(PANGO_CFLAGS) -I$(top_srcdir)/gst/videofilter
libgsttimeoverlay_la_LIBADD =
libgsttimeoverlay_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(PANGO_LIBS) -lm
libgsttextoverlay_la_SOURCES = gsttextoverlay.c
libgsttextoverlay_la_CFLAGS = $(GST_CFLAGS) $(PANGO_CFLAGS)
libgsttextoverlay_la_LIBADD =
libgsttextoverlay_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(PANGO_LIBS)
This diff is collapsed.
/* -*- Mode: C; c-file-style: "stroustrup" -*- */
#ifndef __GST_TEXTOVERLAY_H__
#define __GST_TEXTOVERLAY_H__
#include <gst/gst.h>
#include <pango/pangoft2.h>
G_BEGIN_DECLS
#define GST_TYPE_TEXTOVERLAY (gst_textoverlay_get_type())
#define GST_TEXTOVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
GST_TYPE_TEXTOVERLAY, GstTextOverlay))
#define GST_TEXTOVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),\
GST_TYPE_ULAW, GstTextOverlay))
#define GST_TEXTOVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
GST_TYPE_TEXTOVERLAY, GstTextOverlayClass))
#define GST_IS_TEXTOVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),\
GST_TYPE_TEXTOVERLAY))
#define GST_IS_TEXTOVERLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
GST_TYPE_TEXTOVERLAY))
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,
};
enum _GstTextOverlayHAlign {
GST_TEXT_OVERLAY_HALIGN_LEFT,
GST_TEXT_OVERLAY_HALIGN_CENTER,
GST_TEXT_OVERLAY_HALIGN_RIGHT,
};
struct _GstTextOverlay {
GstElement element;
GstPad *video_sinkpad;
GstPad *text_sinkpad;
GstPad *srcpad;
gint width;
gint height;
PangoLayout *layout;
FT_Bitmap bitmap;
gint bitmap_buffer_size;
gint baseline_y;
GstTextOverlayVAlign valign;
GstTextOverlayHAlign halign;
gint x0;
gint y0;
guint64 next_known_text_change;
GString *next_known_text;
};
struct _GstTextOverlayClass {
GstElementClass parent_class;
PangoContext *pango_context;
};
GType gst_textoverlay_get_type(void) G_GNUC_CONST;
G_END_DECLS
#endif /* __GST_TEXTOVERLAY_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