[gstreamermm] Gst::Discoverer: update wrappers.



commit f6ff961bef3f62898b1d25256d3be488f6ac5ad0
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Wed May 18 21:55:27 2016 +0200

    Gst::Discoverer: update wrappers.
    
        * gstreamer/src/discoverer.{ccg|hg}:
        * gstreamer/src/discovererinfo.{ccg|hg}: wrap missing methods, update
          documentation.
        * tools/m4/convert_gst.m4: add GstToc conversion definitio.

 gstreamer/src/discoverer.ccg     |    4 ++--
 gstreamer/src/discoverer.hg      |   16 ++++++++++++----
 gstreamer/src/discovererinfo.ccg |    6 ++++--
 gstreamer/src/discovererinfo.hg  |   20 ++++++++++++++++++--
 tools/m4/convert_gst.m4          |    3 +++
 5 files changed, 39 insertions(+), 10 deletions(-)
---
diff --git a/gstreamer/src/discoverer.ccg b/gstreamer/src/discoverer.ccg
index 963f27e..d54948e 100644
--- a/gstreamer/src/discoverer.ccg
+++ b/gstreamer/src/discoverer.ccg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2011 gstreamermm Development Team
+ * Copyright 2011-2016 gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,8 +17,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gst/pbutils/pbutils.h>
 #include <gstreamermm/discovererinfo.h>
+#include <gstreamermm/element.h>
 
 _PINCLUDE(glibmm/private/object_p.h)
 
diff --git a/gstreamer/src/discoverer.hg b/gstreamer/src/discoverer.hg
index 87be85b..c9659bc 100644
--- a/gstreamer/src/discoverer.hg
+++ b/gstreamer/src/discoverer.hg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2011 The gstreamermm Development Team
+ * Copyright 2011-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -27,6 +27,7 @@ namespace Gst
 {
 
 class DiscovererInfo;
+class Element;
 
 /** Discoverer - Utility for discovering information on URIs.
  * The Discoverer is a utility object which allows to get as much information
@@ -37,12 +38,16 @@ class DiscovererInfo;
  * The blocking mode just requires calling discover_uri() with the URI one
  * wishes to discover.
  *
- * The non-blocking mode requires a running Glib::MainLoop in the default
+ * The non-blocking mode requires a running Glib::MainLoop iterating a
  * Glib::MainContext, where one connects to the various signals, appends the
- * URIs to be processed (through discover_uri_async()) and then asks for the
- * discovery to begin (through start()).
+ * URIs to be processed (through discover_uri_async()) and then
+ * asks for the discovery to begin (through start()).
+ * By default this will use the GLib default main context unless you have
+ * set a custom context using Glib::MainContext::push_thread_default().
  *
  * All the information is returned in a DiscovererInfo structure.
+ *
+ * Last reviewed on 2016-05-18 (1.8.0)
  */
 class Discoverer : public Glib::Object 
 {
@@ -68,6 +73,9 @@ public:
 
   _WRAP_SIGNAL(void finished(), "finished")
   _WRAP_SIGNAL(void starting(), "starting")
+
+#m4 _CONVERSION(`GstElement*', `const Glib::RefPtr<Gst::Element>&', `Glib::wrap($3,true)')
+  _WRAP_SIGNAL(void source_setup(const Glib::RefPtr<Gst::Element>& source), "source_setup")
 };
 
 } //namespace Gst
diff --git a/gstreamer/src/discovererinfo.ccg b/gstreamer/src/discovererinfo.ccg
index 6e8caef..4e398d8 100644
--- a/gstreamer/src/discovererinfo.ccg
+++ b/gstreamer/src/discovererinfo.ccg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2011 gstreamermm Development Team
+ * Copyright 2011-2016 gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,11 +17,13 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gst/pbutils/pbutils.h>
 #include <gstreamermm/caps.h>
 #include <gstreamermm/structure.h>
 #include <gstreamermm/taglist.h>
+#include <gstreamermm/toc.h>
 #include <gobject/gobject.h>
+#include <gst/pbutils/pbutils.h>
+
 _PINCLUDE(gstreamermm/private/miniobject_p.h)
 
 namespace Gst
diff --git a/gstreamer/src/discovererinfo.hg b/gstreamer/src/discovererinfo.hg
index 795fef1..7eb901f 100644
--- a/gstreamer/src/discovererinfo.hg
+++ b/gstreamer/src/discovererinfo.hg
@@ -1,6 +1,6 @@
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2011 The gstreamermm Development Team
+ * Copyright 2011-2016 The gstreamermm Development Team
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -51,11 +51,13 @@ namespace Gst
 {
 
 _WRAP_ENUM(DiscovererResult, GstDiscovererResult)
+_WRAP_ENUM(DiscovererSerializeFlags, GstDiscovererSerializeFlags)
 
 class Caps;
 class DiscovererStreamInfo;
 class Structure;
 class TagList;
+class Toc;
 
 /** DiscovererInfo - Class containing the information of a URI analyzed by
  * Gst::Discoverer.
@@ -66,7 +68,9 @@ class DiscovererInfo : public MiniObject
   _STRUCT_NOT_HIDDEN
 
 public:
-  _WRAP_METHOD(ClockTime get_duration() const, gst_discoverer_info_get_duration) 
+  _WRAP_METHOD(Glib::RefPtr<Gst::DiscovererInfo> copy() const, gst_discoverer_info_copy)
+
+  _WRAP_METHOD(ClockTime get_duration() const, gst_discoverer_info_get_duration)
 #m4 _CONVERSION(`const GstStructure*', `Structure', `Glib::wrap(const_cast<GstStructure*>($3), true)')
 
   _WRAP_METHOD(Structure get_misc() const, gst_discoverer_info_get_misc) 
@@ -99,6 +103,14 @@ public:
 
   _WRAP_METHOD(std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_video_streams(), 
gst_discoverer_info_get_video_streams)
   _WRAP_METHOD(std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_video_streams() const, 
gst_discoverer_info_get_video_streams)
+
+  _WRAP_METHOD(std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_subtitle_streams(), 
gst_discoverer_info_get_subtitle_streams)
+  _WRAP_METHOD(std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_subtitle_streams() const, 
gst_discoverer_info_get_subtitle_streams)
+
+#m4 _CONVERSION(`const 
gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, 
Glib::OWNERSHIP_DEEP)')
+  _WRAP_METHOD(std::vector<Glib::ustring> get_missing_elements_installer_details() const, 
gst_discoverer_info_get_missing_elements_installer_details)
+
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Toc> get_toc() const, gst_discoverer_info_get_toc)
 };
 
 /** DiscovererStreamInfo - Base class for information concerning a media
@@ -138,6 +150,9 @@ public:
   _WRAP_METHOD(Gst::TagList get_tags() const, gst_discoverer_stream_info_get_tags)
 
   _WRAP_METHOD(Glib::ustring get_stream_type_nick() const, gst_discoverer_stream_info_get_stream_type_nick)
+  _WRAP_METHOD(Glib::ustring get_stream_id() const, gst_discoverer_stream_info_get_stream_id)
+
+  _WRAP_METHOD(Glib::RefPtr<const Gst::Toc> get_toc() const, gst_discoverer_stream_info_get_toc)
 };
 
 /** DiscovererContainerInfo - Gst::DiscovererStreamInfo specific to container
@@ -167,6 +182,7 @@ public:
   _WRAP_METHOD(guint get_depth() const, gst_discoverer_audio_info_get_depth)
   _WRAP_METHOD(guint get_max_bitrate() const, gst_discoverer_audio_info_get_max_bitrate)
   _WRAP_METHOD(guint get_sample_rate() const, gst_discoverer_audio_info_get_sample_rate)
+  _WRAP_METHOD(Glib::ustring get_language() const, gst_discoverer_audio_info_get_language)
 };
 
 /** DiscovererVideoInfo - Gst::DiscovererStreamInfo specific to video streams
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index d4b768f..fa2f072 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -314,6 +314,9 @@ _CONVERSION(`const Glib::RefPtr<Gst::TaskPool>&',`GstTaskPool*', `Glib::unwrap($
 _CONVERSION(`GstTaskPool*',`Glib::RefPtr<Gst::TaskPool>',`Glib::wrap($3)')
 _CONVERSION(`GstTaskPool*',`Glib::RefPtr<const Gst::TaskPool>',`Glib::wrap($3)')
 
+dnl Toc
+_CONVERSION(`const GstToc*',`Glib::RefPtr<const Gst::Toc>',`Glib::wrap(const_cast<GstToc*>($3))')
+
 dnl TocEntry
 _CONVERSION(`GstTocEntry*',`Glib::RefPtr<Gst::TocEntry>',`Glib::wrap($3)')
 _CONVERSION(`Glib::RefPtr<Gst::TocEntry>', `GstTocEntry*',`Glib::unwrap($3)')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]