undefined symbol: vanc_meta_get_info
John P Poet
jppoet at gmail.com
Tue Oct 11 23:16:15 UTC 2016
I noticed this warning fly by:
gst-libs/gst/vanc/Makefile.am:17: warning: variable
'libgstvanc_ at GST_API_VERSION@la_SOURCES' is defined but no program or
gst-libs/gst/vanc/Makefile.am:17: library has 'libgstvanc_ at GST_API_VERSION@la'
as canonical name (possible typo)
How does it know that? Could that be part of my problem?
John
On Mon, Oct 10, 2016 at 4:46 PM John P Poet <jppoet at gmail.com> wrote:
I am writing a new meta lib, and have been battling trying to solve:
*```*
$ gst-inspect-1.0 decklinkvideosrc
(gst-plugin-scanner:10063): GStreamer-WARNING **: Failed to load plugin
'/opt/gst/lib/gstreamer-1.0/libgstdecklink.so':
/opt/gst/lib/gstreamer-1.0/libgstdecklink.so:
undefined symbol: vanc_meta_get_info
*```*
What is interesting about this, is that the exact same library/header/c
file defines:
*```*
VANCMeta * gst_buffer_add_vanc_meta (GstBuffer * buffer,
gint did, gint dbn_sdid,
uint16_t * data, gsize size,
uint16_t checksum);
*```*
And that function links/runs prefectly when used in decklinkvideosrc. It
is only when adding a call to
*```*
const GstMetaInfo *vanc_meta_get_info (void);
*```*
That I get that undefined symbol error. I have been beating my head
against this for a couple of days, so I hope a fresh pair of eyes will spot
what I am doing wrong.
The relevant parts are:
gstvancmeta.h
```
#ifndef _GST_VANC_META_H_
#define _GST_VANC_META_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <gst/gst.h>
#include <stdint.h>
...
/* implementation */
const GstMetaInfo *vanc_meta_get_info (void);
#define GST_VANC_META_INFO (vanc_meta_get_info ())
VANCMeta * gst_buffer_add_vanc_meta (GstBuffer * buffer,
gint did, gint dbn_sdid,
uint16_t * data, gsize size,
uint16_t checksum);
...
*```*
gstvancmeta.c
*```*
#include "gstvancmeta.h"
...
const GstMetaInfo
*vanc_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter (&meta_info)) {
const GstMetaInfo *mi = gst_meta_register (VANC_META_API_TYPE,
"VANCMeta",
sizeof (VANCMeta),
vanc_meta_init,
vanc_meta_free,
vanc_meta_transform);
g_once_init_leave (&meta_info, mi);
}
return meta_info;
}
VANCMeta *
gst_buffer_add_vanc_meta (GstBuffer * buffer,
gint did, gint dbn_sdid,
uint16_t * data, gsize size,
uint16_t checksum)
{
VANCMeta *vmeta;
g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
vmeta = (VANCMeta *) gst_buffer_add_meta (buffer,
GST_VANC_META_INFO, NULL);
...
return vmeta;
}
*```*
And then I call them from code in gstdecklinkvideosrc.cpp, for example:
*```*
static void packetizeComponentAncillary(GstDecklinkVideoSrc *self,
std::vector<uint16_t> &data,
GstBuffer * buffer)
{
const GstMetaInfo *vanc_info = vanc_meta_get_info ();
...
if (usableVANC(did, dbn_sdid)) {
gst_buffer_add_vanc_meta (buffer, did, dbn_sdid, &data[idx + 6],
data_count, chksum_e);
GST_WARNING_OBJECT (self, "VANC meta added");
}
}
}
*```*
I only add the call to vanc_meta_get_info () there just to see if it would
link, since it does not in gst-libav. It does not either place. In
gstdecklink it is linking the .la file, and in gst-libav it is linking the
.so file.
I will attach the full patch in case it helps.
Thank you,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161011/53af386b/attachment.html>
More information about the gstreamer-devel
mailing list