2004-12-16 05:32:07 +00:00
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
#ifndef __GST_CAIRO_TEXT_OVERLAY_H__
|
|
|
|
#define __GST_CAIRO_TEXT_OVERLAY_H__
|
2004-12-16 05:32:07 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2011-12-14 18:34:25 +00:00
|
|
|
#include <gst/base/gstcollectpads2.h>
|
2004-12-16 05:32:07 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
#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),\
|
2006-04-08 18:25:55 +00:00
|
|
|
GST_TYPE_CAIRO_TEXT_OVERLAY, GstCairoTextOverlayClass))
|
2005-11-25 21:36:18 +00:00
|
|
|
#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))
|
2006-04-08 18:25:55 +00:00
|
|
|
#define GST_IS_CAIRO_TEXT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),\
|
2005-11-25 21:36:18 +00:00
|
|
|
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
|
2004-12-16 05:32:07 +00:00
|
|
|
};
|
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
enum _GstCairoTextOverlayHAlign {
|
|
|
|
GST_CAIRO_TEXT_OVERLAY_HALIGN_LEFT,
|
|
|
|
GST_CAIRO_TEXT_OVERLAY_HALIGN_CENTER,
|
|
|
|
GST_CAIRO_TEXT_OVERLAY_HALIGN_RIGHT
|
2004-12-16 05:32:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
struct _GstCairoTextOverlay {
|
2004-12-16 05:32:07 +00:00
|
|
|
GstElement element;
|
|
|
|
|
|
|
|
GstPad *video_sinkpad;
|
|
|
|
GstPad *text_sinkpad;
|
|
|
|
GstPad *srcpad;
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
|
2011-12-14 18:34:25 +00:00
|
|
|
GstCollectPads2 *collect;
|
|
|
|
GstCollectData2 *video_collect_data;
|
|
|
|
GstCollectData2 *text_collect_data;
|
2011-01-23 15:56:49 +00:00
|
|
|
GstPadEventFunction collect_event;
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
|
2004-12-16 05:32:07 +00:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2005-11-22 22:21:37 +00:00
|
|
|
gint fps_n;
|
|
|
|
gint fps_d;
|
2004-12-16 05:32:07 +00:00
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
GstCairoTextOverlayVAlign valign;
|
|
|
|
GstCairoTextOverlayHAlign halign;
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
gint xpad;
|
|
|
|
gint ypad;
|
|
|
|
gint deltax;
|
|
|
|
gint deltay;
|
2005-12-06 19:44:58 +00:00
|
|
|
gchar *default_text;
|
|
|
|
gboolean want_shading;
|
2004-12-16 05:32:07 +00:00
|
|
|
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
guchar *text_fill_image;
|
|
|
|
guchar *text_outline_image;
|
|
|
|
gint font_height;
|
|
|
|
gint text_x0, text_x1; /* start/end x position of text */
|
|
|
|
gint text_dy;
|
2004-12-16 05:32:07 +00:00
|
|
|
|
2005-12-06 19:44:58 +00:00
|
|
|
gboolean need_render;
|
2004-12-16 05:32:07 +00:00
|
|
|
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
gchar *font;
|
|
|
|
gint slant;
|
|
|
|
gint weight;
|
|
|
|
gdouble scale;
|
2011-10-27 14:52:47 +00:00
|
|
|
gboolean silent;
|
2004-12-16 05:32:07 +00:00
|
|
|
};
|
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
struct _GstCairoTextOverlayClass {
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
GstElementClass parent_class;
|
2004-12-16 05:32:07 +00:00
|
|
|
};
|
|
|
|
|
ext/cairo/: Port cairo textoverlay plugin to 0.9. Add 'shaded-background' property and redo position. Doesn't handle ...
Original commit message from CVS:
* ext/cairo/Makefile.am:
* 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:
Port cairo textoverlay plugin to 0.9. Add 'shaded-background'
property and redo position. Doesn't handle upstream renegotiation
yet though.
2005-11-07 15:09:54 +00:00
|
|
|
GType gst_text_overlay_get_type (void);
|
2004-12-16 05:32:07 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2005-11-25 21:36:18 +00:00
|
|
|
#endif /* __GST_CAIRO_TEXT_OVERLAY_H */
|