Having issues using GstMeta in GStreamer 1.0.5
Cruzer
raja_bose2004 at yahoo.co.in
Wed Jan 30 07:39:08 PST 2013
Hi,
I am using the GstMeta to send some informations across elements, my
pipeline is Source->Sink.
I have written my own source and sink elements,
this is my GstMeta implementation.
//MyMetaInfo.h
G_BEGIN_DECLS
typedef struct _MyMetaInfo MyMetaInfo;
struct _MyMetaInfo
{
GstMeta Meta;
ri::FrameInfo FrameMetaInfo; // This is a structure holds some frame
information like width height integers.
};
GType my_meta_info_api_get_type (void);
#define MY_META_INFO_API_TYPE (my_meta_info_api_get_type())
const GstMetaInfo *my_meta_get_info (void);
#define MY_META_INFO (my_meta_get_info())
#define GST_MY_META_GET(b) \
((MyMetaInfo*)gst_buffer_get_meta((b),MY_META_INFO_API_TYPE))
#define GST_MY_META_ADD(b) \
((MyMetaInfo*)gst_buffer_add_meta((b),MY_META_INFO,NULL))
G_END_DECLS
//MyMetaInfo.cpp
#include "MyMetaInfo.h"
GType my_meta_info_api_get_type (void)
{
static volatile GType type;
static const gchar *tags[] = { "buffer", "meta", NULL };
if (g_once_init_enter (&type))
{
GType _type = gst_meta_api_type_register ("MyMetaInfoAPI", tags);
g_once_init_leave (&type, _type);
}
return type;
}
const GstMetaInfo* my_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info))
{
const GstMetaInfo *meta = gst_meta_register (MY_META_INFO_API_TYPE,
"MyMetaInfo",
sizeof (MyMetaInfo),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL);
g_once_init_leave (&meta_info, meta);
}
return meta_info;
}
Can anyone tell me what I am missing?
Thanks,
Bose.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Having-issues-using-GstMeta-in-GStreamer-1-0-5-tp4658241.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list