Skip to content

Commit

Permalink
Merge branch 'implement_meta_transform' into 'master'
Browse files Browse the repository at this point in the history
[nemometa] implement meta_transform function. MER#2061

See merge request mer-core/nemo-gst-interfaces!3
  • Loading branch information
Andrew Branson committed Oct 10, 2019
2 parents b2e69a7 + aff1add commit a071758
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion gst-libs/gst/meta/nemometa.c
Expand Up @@ -19,6 +19,10 @@
#include "nemometa.h"
#include <gst/video/video.h>

static gboolean
nemo_gst_buffer_orientation_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data);

GType
nemo_gst_buffer_orientation_meta_api_get_type (void)
{
Expand Down Expand Up @@ -46,7 +50,7 @@ nemo_gst_buffer_orientation_meta_get_info (void)
sizeof (NemoGstBufferOrientationMeta),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL,
(GstMetaTransformFunction)NULL);
nemo_gst_buffer_orientation_meta_transform);

g_once_init_leave (&meta_info, meta);
}
Expand All @@ -66,3 +70,18 @@ gst_buffer_add_gst_buffer_orientation_meta (GstBuffer * buffer,

return meta;
}

static gboolean
nemo_gst_buffer_orientation_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
NemoGstBufferOrientationMeta *smeta = (NemoGstBufferOrientationMeta *) meta;

// This meta is about how the buffer is created. So, `type` doesn't matter.
if (!gst_buffer_add_gst_buffer_orientation_meta (dest, smeta->orientation,
smeta->direction)) {
return FALSE;
}

return TRUE;
}

0 comments on commit a071758

Please sign in to comment.