Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 22nd, 2012  |  syntax: None  |  size: 2.16 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. DiscovererStreamInfo sinfo;
  2.  
  3.         info = dc.discover_uri (uri);
  4.         // get stream info
  5.         GLib.List<DiscovererStreamInfo> l = info.get_video_streams ();
  6.         for (int i = 0; i < l.length (); i++) {
  7.           sinfo = l.nth_data (i);
  8.           video_streams.append_page (new Label("fill me"),new Label (@"video $i"));
  9.         }
  10.  
  11. -----------
  12.  
  13.   CC     mi-info.o
  14. mi-info.c: In function ‘_g_list_free_gst_discoverer_stream_info_unref’:
  15. mi-info.c:234:32: error: ‘gst_discoverer_stream_info_unref’ undeclared (first use in this function)
  16. mi-info.c:234:32: note: each undeclared identifier is reported only once for each function it appears in
  17. mi-info.c: In function ‘media_info_info_on_element_sync_message’:
  18. mi-info.c:358:2: warning: passing argument 1 of ‘_gst_structure_copy0’ discards qualifiers from pointer target type
  19. mi-info.c:343:17: note: expected ‘gpointer’ but argument is of type ‘const struct GstStructure *’
  20.  
  21. ----------
  22.  
  23. added to vapi metadata;
  24.  
  25.  
  26. gst_discoverer_info_get_audio_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
  27. gst_discoverer_info_get_video_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
  28. gst_discoverer_info_get_container_streams type_arguments="DiscovererStreamInfo" transfer_ownership="1"
  29. GstDiscovererInfo ref_function="gst_discoverer_info_ref" unref_function="gst_discoverer_info_unref" base_class="GstMiniObject"
  30. GstDiscovererInfo.mini_object hidden="1"
  31. GstDiscovererStreamInfo ref_function="gst_discoverer_stream_info_ref" unref_function="gst_discoverer_stream_info_unref" base_class="GstMiniObject"
  32. GstDiscovererStreamInfo.mini_object hidden="1"
  33.  
  34. ----------
  35.  
  36. Problem 1:
  37.  
  38. one should use:
  39. list = gst_discoverer_info_get_audio_streams (info);
  40. ...
  41. gst_discoverer_stream_info_list_free(list);
  42.  
  43.  
  44. Problem 2:
  45.  
  46. the generated code contains:
  47.  
  48. static void _g_list_free_gst_discoverer_stream_info_unref (GList* self) {
  49.         g_list_foreach (self, (GFunc) gst_discoverer_stream_info_unref, NULL);
  50.         g_list_free (self);
  51. }
  52.  
  53. but gst_discoverer_stream_info_unref() is a macro to gst_mini_object_unref()
  54. if I use gst_mini_object_unref I get error because of missing casts