mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
basetextoverlay: Reorder and cleanup class attribute
Also add a minimum amount of comment so we can understand what is doing what. https://bugzilla.gnome.org/show_bug.cgi?id=751157
This commit is contained in:
parent
04e3fc3f33
commit
db81a73dba
2 changed files with 38 additions and 31 deletions
|
@ -887,7 +887,6 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps)
|
||||||
|
|
||||||
overlay->info = info;
|
overlay->info = info;
|
||||||
overlay->format = GST_VIDEO_INFO_FORMAT (&info);
|
overlay->format = GST_VIDEO_INFO_FORMAT (&info);
|
||||||
|
|
||||||
overlay->stream_width = GST_VIDEO_INFO_WIDTH (&info);
|
overlay->stream_width = GST_VIDEO_INFO_WIDTH (&info);
|
||||||
overlay->stream_height = GST_VIDEO_INFO_HEIGHT (&info);
|
overlay->stream_height = GST_VIDEO_INFO_HEIGHT (&info);
|
||||||
|
|
||||||
|
@ -1510,6 +1509,7 @@ gst_base_text_overlay_set_composition (GstBaseTextOverlay * overlay)
|
||||||
|
|
||||||
if (overlay->composition)
|
if (overlay->composition)
|
||||||
gst_video_overlay_composition_unref (overlay->composition);
|
gst_video_overlay_composition_unref (overlay->composition);
|
||||||
|
|
||||||
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
overlay->composition = gst_video_overlay_composition_new (rectangle);
|
||||||
gst_video_overlay_rectangle_unref (rectangle);
|
gst_video_overlay_rectangle_unref (rectangle);
|
||||||
|
|
||||||
|
|
|
@ -128,11 +128,11 @@ struct _GstBaseTextOverlay {
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
GstSegment text_segment;
|
GstSegment text_segment;
|
||||||
GstBuffer *text_buffer;
|
GstBuffer *text_buffer;
|
||||||
gboolean text_linked;
|
gboolean text_linked;
|
||||||
gboolean video_flushing;
|
gboolean video_flushing;
|
||||||
gboolean video_eos;
|
gboolean video_eos;
|
||||||
gboolean text_flushing;
|
gboolean text_flushing;
|
||||||
gboolean text_eos;
|
gboolean text_eos;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
GCond cond; /* to signal removal of a queued text
|
GCond cond; /* to signal removal of a queued text
|
||||||
|
@ -140,16 +140,13 @@ struct _GstBaseTextOverlay {
|
||||||
* a text segment update, or a change
|
* a text segment update, or a change
|
||||||
* in status (e.g. shutdown, flushing) */
|
* in status (e.g. shutdown, flushing) */
|
||||||
|
|
||||||
|
/* stream metrics */
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
GstVideoFormat format;
|
GstVideoFormat format;
|
||||||
gint width;
|
gint stream_width;
|
||||||
gint height;
|
gint stream_height;
|
||||||
|
|
||||||
GstBaseTextOverlayVAlign valign;
|
|
||||||
GstBaseTextOverlayHAlign halign;
|
|
||||||
GstBaseTextOverlayWrapMode wrap_mode;
|
|
||||||
GstBaseTextOverlayLineAlign line_align;
|
|
||||||
|
|
||||||
|
/* properties */
|
||||||
gint xpad;
|
gint xpad;
|
||||||
gint ypad;
|
gint ypad;
|
||||||
gint deltax;
|
gint deltax;
|
||||||
|
@ -161,33 +158,43 @@ struct _GstBaseTextOverlay {
|
||||||
gboolean silent;
|
gboolean silent;
|
||||||
gboolean wait_text;
|
gboolean wait_text;
|
||||||
guint color, outline_color;
|
guint color, outline_color;
|
||||||
|
|
||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
gdouble shadow_offset;
|
gboolean auto_adjust_size;
|
||||||
gdouble outline_offset;
|
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;
|
||||||
|
|
||||||
|
/* rendering state */
|
||||||
|
gboolean need_render;
|
||||||
GstBuffer *text_image;
|
GstBuffer *text_image;
|
||||||
|
|
||||||
|
/* rendering canvas dimension, this is adjusted to compensate the
|
||||||
|
* downstream reported window size. */
|
||||||
|
gint width;
|
||||||
|
gint height;
|
||||||
|
|
||||||
|
/* dimension of text_image, the physical dimension */
|
||||||
gint image_width;
|
gint image_width;
|
||||||
gint image_height;
|
gint image_height;
|
||||||
gint baseline_y;
|
|
||||||
|
|
||||||
gint stream_width;
|
/* window dimension, reported in the composition meta params. This is set
|
||||||
gint stream_height;
|
* to stream_width, stream_height if missing */
|
||||||
gint window_width;
|
gint window_width;
|
||||||
gint window_height;
|
gint window_height;
|
||||||
|
|
||||||
gboolean auto_adjust_size;
|
gdouble shadow_offset;
|
||||||
gboolean need_render;
|
gdouble outline_offset;
|
||||||
|
gint baseline_y;
|
||||||
gboolean draw_shadow;
|
|
||||||
gboolean draw_outline;
|
|
||||||
|
|
||||||
gint shading_value; /* for timeoverlay subclass */
|
|
||||||
|
|
||||||
gboolean have_pango_markup;
|
|
||||||
gboolean use_vertical_render;
|
|
||||||
|
|
||||||
gboolean attach_compo_to_buffer;
|
|
||||||
|
|
||||||
|
gboolean attach_compo_to_buffer;
|
||||||
GstVideoOverlayComposition *composition;
|
GstVideoOverlayComposition *composition;
|
||||||
GstVideoOverlayComposition *upstream_composition;
|
GstVideoOverlayComposition *upstream_composition;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue