
Untitled
By: a guest on
May 22nd, 2012 | syntax:
None | size: 2.16 KB | hits: 12 | expires: Never
DiscovererStreamInfo sinfo;
info = dc.discover_uri (uri);
// get stream info
GLib.List<DiscovererStreamInfo> l = info.get_video_streams ();
for (int i = 0; i < l.length (); i++) {
sinfo = l.nth_data (i);
video_streams.append_page (new Label("fill me"),new Label (@"video $i"));
}
-----------
CC mi-info.o
mi-info.c: In function ‘_g_list_free_gst_discoverer_stream_info_unref’:
mi-info.c:234:32: error: ‘gst_discoverer_stream_info_unref’ undeclared (first use in this function)
mi-info.c:234:32: note: each undeclared identifier is reported only once for each function it appears in
mi-info.c: In function ‘media_info_info_on_element_sync_message’:
mi-info.c:358:2: warning: passing argument 1 of ‘_gst_structure_copy0’ discards qualifiers from pointer target type
mi-info.c:343:17: note: expected ‘gpointer’ but argument is of type ‘const struct GstStructure *’
----------
added to vapi metadata;
gst_discoverer_info_get_audio_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
gst_discoverer_info_get_video_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
gst_discoverer_info_get_container_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
GstDiscovererInfo ref_function="gst_discoverer_info_ref" unref_function="gst_discoverer_info_unref" base_class="GstMiniObject"
GstDiscovererInfo.mini_object hidden="1"
GstDiscovererStreamInfo ref_function="gst_discoverer_stream_info_ref" unref_function="gst_discoverer_stream_info_unref" base_class="GstMiniObject"
GstDiscovererStreamInfo.mini_object hidden="1"
----------
Problem 1:
one should use:
list = gst_discoverer_info_get_audio_streams (info);
...
gst_discoverer_stream_info_list_free(list);
Problem 2:
the generated code contains:
static void _g_list_free_gst_discoverer_stream_info_unref (GList* self) {
g_list_foreach (self, (GFunc) gst_discoverer_stream_info_unref, NULL);
g_list_free (self);
}
but gst_discoverer_stream_info_unref() is a macro to gst_mini_object_unref()
if I use gst_mini_object_unref I get error because of missing casts