Does GstMeta always flow in all branches of pipeline?


I have a pipeline with two branches, I’d like to tag GstBuffer frames with GstMeta and have GstMeta flow in both branches of the pipeline. I am able to get GstMeta in one of the branches (fakesink2) but not in the second branch (fakesink1). The branch that seems to be missing GstMeta is the one that contains a video encoder. I add the GstMeta to GstBuffer in a probe on clockoverlay sink. How can this problem be solved with GstMeta (or an alternate solution)?

Sample pipeline with two branches:

Thank you in advanced.

So you implemented a GstMeta subclass? Show us the code? The transform function should copy the data if the passed type is GST_META_TRANSFORM_IS_COPY(type).

Hi @philn, thanks for your reply. here is a link. Please see MyExampleMeta.h and MyExampleMeta.cpp. I don’t know what needs updating such that GST_META_TRANSFORM_IS_COPY(type) would return true.

The meta_transform callback registered in gst_meta_register() is never called - if that helps debugging the issue.

Thanks again.

Add GST_META_TAG_VIDEO_STR in the meta tags?
The base class for video encoders will not copy metas in some certain conditions, see gst_video_encoder_transform_meta_default().

The mfh264enc and its base class don’t override the transform_meta vfunc, so the default one is used.

It works. It works if I use static const gchar* tags[] = { GST_META_TAG_VIDEO_STR, NULL}; but it doesn’t work if I have multiple tags static const gchar* tags[] = { GST_META_TAG_VIDEO_STR, "foo", "bar", NULL};. I’ll take this as a solution, thank you so very much.