mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
cog: logoinsert checkpoint FIXME
This commit is contained in:
parent
5d9d693caf
commit
a37a68b7b7
1 changed files with 7 additions and 7 deletions
|
@ -58,7 +58,7 @@ struct _GstLogoinsert
|
|||
gchar *data;
|
||||
gsize size;
|
||||
CogFrame *overlay_frame;
|
||||
CogFrame *ayuv_frame;
|
||||
CogFrame *argb_frame;
|
||||
CogFrame *alpha_frame;
|
||||
|
||||
};
|
||||
|
@ -116,7 +116,7 @@ static GstStaticPadTemplate gst_logoinsert_src_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{I420,YUY2,UYVY,AYUV}"))
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("I420"))
|
||||
);
|
||||
|
||||
GType
|
||||
|
@ -254,17 +254,17 @@ gst_logoinsert_transform_ip (GstBaseTransform * base_transform, GstBuffer * buf)
|
|||
|
||||
frame = gst_cog_buffer_wrap (buf, li->format, li->width, li->height);
|
||||
|
||||
if (li->ayuv_frame == NULL)
|
||||
if (li->argb_frame == NULL)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
if (li->overlay_frame == NULL) {
|
||||
CogFrame *f;
|
||||
|
||||
f = cog_virt_frame_extract_alpha (cog_frame_ref (li->ayuv_frame));
|
||||
f = cog_virt_frame_extract_alpha (cog_frame_ref (li->argb_frame));
|
||||
f = cog_virt_frame_new_subsample (f, frame->format, 2);
|
||||
li->alpha_frame = cog_frame_realize (f);
|
||||
|
||||
f = cog_virt_frame_new_unpack (cog_frame_ref (li->ayuv_frame));
|
||||
f = cog_virt_frame_new_unpack (cog_frame_ref (li->argb_frame));
|
||||
f = cog_virt_frame_new_color_matrix_RGB_to_YCbCr (f, COG_COLOR_MATRIX_SDTV,
|
||||
8);
|
||||
f = cog_virt_frame_new_subsample (f, frame->format, 2);
|
||||
|
@ -327,7 +327,7 @@ gst_logoinsert_set_location (GstLogoinsert * li, const gchar * location)
|
|||
return;
|
||||
}
|
||||
|
||||
li->ayuv_frame = cog_frame_new_from_png (li->data, li->size);
|
||||
li->argb_frame = cog_frame_new_from_png (li->data, li->size);
|
||||
|
||||
if (li->alpha_frame) {
|
||||
cog_frame_unref (li->alpha_frame);
|
||||
|
@ -396,7 +396,7 @@ cog_frame_new_from_png (void *data, int size)
|
|||
}
|
||||
|
||||
frame_data = g_malloc (width * height * 4);
|
||||
frame = cog_frame_new_from_data_AYUV (frame_data, width, height);
|
||||
frame = cog_frame_new_from_data_ARGB (frame_data, width, height);
|
||||
|
||||
rowbytes = png_get_rowbytes (png_ptr, info_ptr);
|
||||
rows = (png_bytep *) g_malloc (sizeof (png_bytep) * height);
|
||||
|
|
Loading…
Reference in a new issue