X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ext%2Fpango%2Fgstbasetextoverlay.h;h=76fb10d664b71b9bff4ddaa8728e1bd90d7964a9;hb=8e072037984283a2b8c0f7a52227bd794557d706;hp=b7db8de65d7f338ade0d1866bd7f8329a6206f57;hpb=a00927ad0376d3c0ff8d6059109ff8804270f2a9;p=platform%2Fupstream%2Fgstreamer.git diff --git a/ext/pango/gstbasetextoverlay.h b/ext/pango/gstbasetextoverlay.h index b7db8de..76fb10d 100644 --- a/ext/pango/gstbasetextoverlay.h +++ b/ext/pango/gstbasetextoverlay.h @@ -1,9 +1,33 @@ +/* GStreamer + * Copyright (C) <1999> Erik Walthinsen + * Copyright (C) <2003> David Schleef + * Copyright (C) <2006> Julien Moutte + * Copyright (C) <2006> Zeeshan Ali + * Copyright (C) <2006-2008> Tim-Philipp Müller + * Copyright (C) <2009> Young-Ho Cha + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + #ifndef __GST_BASE_TEXT_OVERLAY_H__ #define __GST_BASE_TEXT_OVERLAY_H__ #include #include -#include +#include #include G_BEGIN_DECLS @@ -104,27 +128,25 @@ struct _GstBaseTextOverlay { GstSegment segment; GstSegment text_segment; GstBuffer *text_buffer; - gboolean text_linked; - gboolean video_flushing; - gboolean video_eos; - gboolean text_flushing; - gboolean text_eos; - - GCond *cond; /* to signal removal of a queued text + gboolean text_linked; + gboolean video_flushing; + gboolean video_eos; + gboolean text_flushing; + gboolean text_eos; + + GMutex lock; + GCond cond; /* to signal removal of a queued text * buffer, arrival of a text buffer, * a text segment update, or a change * in status (e.g. shutdown, flushing) */ + /* stream metrics */ GstVideoInfo info; GstVideoFormat format; gint width; gint height; - GstBaseTextOverlayVAlign valign; - GstBaseTextOverlayHAlign halign; - GstBaseTextOverlayWrapMode wrap_mode; - GstBaseTextOverlayLineAlign line_align; - + /* properties */ gint xpad; gint ypad; gint deltax; @@ -136,22 +158,53 @@ struct _GstBaseTextOverlay { gboolean silent; gboolean wait_text; guint color, outline_color; - PangoLayout *layout; - gdouble shadow_offset; - gdouble outline_offset; - guchar *text_image; - gint image_width; - gint image_height; - gint baseline_y; - gboolean auto_adjust_size; - gboolean need_render; - + gboolean draw_shadow; + gboolean draw_outline; gint shading_value; /* for timeoverlay subclass */ + gboolean use_vertical_render; + GstBaseTextOverlayVAlign valign; + GstBaseTextOverlayHAlign halign; + GstBaseTextOverlayWrapMode wrap_mode; + GstBaseTextOverlayLineAlign line_align; + /* text pad format */ gboolean have_pango_markup; - gboolean use_vertical_render; + + /* rendering state */ + gboolean need_render; + GstBuffer *text_image; + + /* dimension relative to witch the render is done, this is the stream size + * or a portion of the window_size (adapted to aspect ratio) */ + gint render_width; + gint render_height; + /* This is (render_width / width) uses to convert to stream scale */ + gdouble render_scale; + + /* dimension of text_image, the physical dimension */ + guint text_width; + guint text_height; + + /* position of rendering in image coordinates */ + gint text_x; + gint text_y; + + /* window dimension, reported in the composition meta params. This is set + * to stream width, height if missing */ + gint window_width; + gint window_height; + + gdouble shadow_offset; + gdouble outline_offset; + + PangoRectangle ink_rect; + PangoRectangle logical_rect; + + gboolean attach_compo_to_buffer; + GstVideoOverlayComposition *composition; + GstVideoOverlayComposition *upstream_composition; }; struct _GstBaseTextOverlayClass {