Esempio n. 1
0
static gboolean
foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
{
  GstBuffer *outbuf = user_data;
  const GstMetaInfo *info = (*meta)->info;
  gboolean do_copy = FALSE;

  if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) {
    /* never call the transform_meta with memory specific metadata */
    GST_DEBUG ("not copying memory specific metadata %s",
        g_type_name (info->api));
    do_copy = FALSE;
  } else {
    do_copy = TRUE;
    GST_DEBUG ("copying metadata %s", g_type_name (info->api));
  }

  if (do_copy) {
    GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
    GST_DEBUG ("copy metadata %s", g_type_name (info->api));
    /* simply copy then */
    info->transform_func (outbuf, *meta, inbuf,
        _gst_meta_transform_copy, &copy_data);
  }
  return TRUE;
}
static gboolean gst_imx_blitter_video_transform_transform_meta(GstBaseTransform *trans, GstBuffer *inbuf, GstMeta *meta, GstBuffer *outbuf)
{
	GstMetaInfo const *info = meta->info;
	gchar const * const *tags;

	tags = gst_meta_api_type_get_tags(info->api);

	if (
		(tags != NULL) &&
		(g_strv_length((gchar **)tags) == 1) &&
		gst_meta_api_type_has_tag(info->api, g_quark_from_string(GST_META_TAG_VIDEO_STR))
	)
		return TRUE;

	return GST_BASE_TRANSFORM_CLASS(gst_imx_blitter_video_transform_parent_class)->transform_meta(trans, inbuf, meta, outbuf);
}
static gboolean
gst_video_convert_transform_meta (GstBaseTransform * trans, GstBuffer * outbuf,
    GstMeta * meta, GstBuffer * inbuf)
{
  const GstMetaInfo *info = meta->info;
  gboolean ret;

  if (gst_meta_api_type_has_tag (info->api, _colorspace_quark)) {
    /* don't copy colorspace specific metadata, FIXME, we need a MetaTransform
     * for the colorspace metadata. */
    ret = FALSE;
  } else {
    /* copy other metadata */
    ret = TRUE;
  }
  return ret;
}
static gboolean
foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
{
    GstRTPOpusDepay *depay = user_data;
    const GstMetaInfo *info = (*meta)->info;
    const gchar *const *tags = gst_meta_api_type_get_tags (info->api);

    if (!tags || (g_strv_length ((gchar **) tags) == 1
                  && gst_meta_api_type_has_tag (info->api,
                          g_quark_from_string (GST_META_TAG_AUDIO_STR)))) {
        GST_DEBUG_OBJECT (depay, "keeping metadata %s", g_type_name (info->api));
    } else {
        GST_DEBUG_OBJECT (depay, "dropping metadata %s", g_type_name (info->api));
        *meta = NULL;
    }

    return TRUE;
}
Esempio n. 5
0
static gboolean
foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data)
{
  CopyMetaData *data = user_data;
  GstRtpOPUSPay *pay = data->pay;
  GstBuffer *outbuf = data->outbuf;
  const GstMetaInfo *info = (*meta)->info;
  const gchar *const *tags = gst_meta_api_type_get_tags (info->api);

  if (!tags || (g_strv_length ((gchar **) tags) == 1
          && gst_meta_api_type_has_tag (info->api,
              g_quark_from_string (GST_META_TAG_AUDIO_STR)))) {
    GstMetaTransformCopy copy_data = { FALSE, 0, -1 };
    GST_DEBUG_OBJECT (pay, "copy metadata %s", g_type_name (info->api));
    /* simply copy then */
    info->transform_func (outbuf, *meta, inbuf,
        _gst_meta_transform_copy, &copy_data);
  } else {
    GST_DEBUG_OBJECT (pay, "not copying metadata %s", g_type_name (info->api));
  }

  return TRUE;
}