plugin: paintable: Support setting media rotation. Contributes to #310

Rotation can be set by passing a GstVideoOrientationMethod to the
gst_clapper_paintable_set_rotation() function.

The actual rotation is done through GskTransforms directly on the
Snapshot.

Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
This commit is contained in:
Eugenio Paolantonio (g7)
2023-03-26 16:20:56 +02:00
parent 7fc93fbebc
commit 4e250c8f2a
2 changed files with 109 additions and 11 deletions

View File

@@ -56,6 +56,7 @@ struct _GstClapperPaintable
/* Sink properties */
gint par_n, par_d;
GstVideoOrientationMethod rotation;
/* Resize */
gboolean pending_resize;
@@ -71,11 +72,13 @@ struct _GstClapperPaintable
guint draw_id;
};
GstClapperPaintable * gst_clapper_paintable_new (void);
void gst_clapper_paintable_queue_draw (GstClapperPaintable *paintable);
void gst_clapper_paintable_set_widget (GstClapperPaintable *paintable, GtkWidget *widget);
void gst_clapper_paintable_set_importer (GstClapperPaintable *paintable, GstClapperImporter *importer);
gboolean gst_clapper_paintable_set_video_info (GstClapperPaintable *paintable, const GstVideoInfo *v_info);
void gst_clapper_paintable_set_pixel_aspect_ratio (GstClapperPaintable *paintable, gint par_n, gint par_d);
GstClapperPaintable * gst_clapper_paintable_new (void);
void gst_clapper_paintable_queue_draw (GstClapperPaintable *paintable);
void gst_clapper_paintable_set_widget (GstClapperPaintable *paintable, GtkWidget *widget);
void gst_clapper_paintable_set_importer (GstClapperPaintable *paintable, GstClapperImporter *importer);
gboolean gst_clapper_paintable_set_video_info (GstClapperPaintable *paintable, const GstVideoInfo *v_info);
void gst_clapper_paintable_set_pixel_aspect_ratio (GstClapperPaintable *paintable, gint par_n, gint par_d);
void gst_clapper_paintable_set_rotation (GstClapperPaintable *paintable, GstVideoOrientationMethod rotation);
GstVideoOrientationMethod gst_clapper_paintable_get_rotation (GstClapperPaintable *paintable);
G_END_DECLS