[gstreamermm] Gst::TocSetter: update interface



commit 00938110f722ba85efd37954dc585209ee9417a7
Author: Marcin Kolny <marcin kolny gmail com>
Date:   Sat Aug 27 13:27:06 2016 +0200

    Gst::TocSetter: update interface

 gstreamer/src/tocsetter.ccg |   21 +++++++++++++++++----
 gstreamer/src/tocsetter.hg  |   34 +++++++++++++++++++++++++++-------
 tools/m4/convert_gst.m4     |    1 +
 3 files changed, 45 insertions(+), 11 deletions(-)
---
diff --git a/gstreamer/src/tocsetter.ccg b/gstreamer/src/tocsetter.ccg
index 15464ca..c4b6212 100644
--- a/gstreamer/src/tocsetter.ccg
+++ b/gstreamer/src/tocsetter.ccg
@@ -1,11 +1,24 @@
-/*
- * tocsetter.ccg
+/* gstreamermm - a C++ wrapper for gstreamer
  *
- *  Created on: Sep 25, 2013
- *      Author: m.kolny
+ * Copyright 2013-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
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include <gstreamermm/handle_error.h>
+#include <gstreamermm/toc.h>
 
 namespace Gst
 {
diff --git a/gstreamer/src/tocsetter.hg b/gstreamer/src/tocsetter.hg
index ab897da..75bee06 100644
--- a/gstreamer/src/tocsetter.hg
+++ b/gstreamer/src/tocsetter.hg
@@ -1,12 +1,6 @@
-/*
- * tocsetter.hg
- *
- *  Created on: Sep 25, 2013
- *      Author: m.kolny
- */
 /* gstreamermm - a C++ wrapper for gstreamer
  *
- * Copyright 2013 The gstreamermm Development Team
+ * Copyright 2013-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
@@ -31,8 +25,34 @@ _DEFS(gstreamermm,gst)
 
 namespace Gst
 {
+class Toc;
+
+/** An interface that allows setting and retrieval of the TOC.
+ *
+ * Elements that support some kind of chapters or editions (or tracks like in
+ * the FLAC cue sheet) will implement this interface.
+ *
+ * If you just want to retrieve the TOC in your application then all you
+ * need to do is watch for TOC messages on your pipeline's bus (or you can
+ * perform TOC query). This interface is only for setting TOC data, not for
+ * extracting it. To set TOC from the application, find proper tocsetter element
+ * and set TOC using set_toc().
+ *
+ * Elements implementing the Gst::TocSetter interface can extend existing TOC
+ * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it)
+ * with any TOC entries received from downstream.
+ *
+ * Last reviewed on 2016-08-27 (1.8.0)
+ *
+ * @ingroup GstInterfaces
+ */
 class TocSetter : public Glib::Interface
 {
   _CLASS_INTERFACE(TocSetter, GstTocSetter, GST_TOC_SETTER, GstTocSetterInterface)
+
+public:
+  _WRAP_METHOD(void set_toc(const Glib::RefPtr<Gst::Toc>& toc), gst_toc_setter_set_toc)
+  _WRAP_METHOD(Glib::RefPtr<Gst::Toc> get_toc() const, gst_toc_setter_get_toc)
+  _WRAP_METHOD(void reset(), gst_toc_setter_reset)
 };
 }
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index ed4e9df..9c8dc0d 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -329,6 +329,7 @@ _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))')
+_CONVERSION(`GstToc*',`Glib::RefPtr<Gst::Toc>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Gst::Toc>&', `GstToc*',`Glib::unwrap($3)')
 
 dnl TocEntry


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