| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_TOCSETTER_H |
| 3 | #define _GSTREAMERMM_TOCSETTER_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2013-2016 The gstreamermm Development Team |
| 12 | * |
| 13 | * This library is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU Lesser General Public |
| 15 | * License as published by the Free Software Foundation; either |
| 16 | * version 2.1 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This library is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | * Lesser General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU Lesser General Public |
| 24 | * License along with this library; if not, write to the Free |
| 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | */ |
| 27 | |
| 28 | |
| 29 | #include <gst/gsttocsetter.h> |
| 30 | #include <glibmm/interface.h> |
| 31 | |
| 32 | |
| 33 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 34 | using GstTocSetter = struct _GstTocSetter; |
| 35 | using GstTocSetterClass = struct _GstTocSetterClass; |
| 36 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 37 | |
| 38 | |
| 39 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 40 | namespace Gst |
| 41 | { class TocSetter_Class; } // namespace Gst |
| 42 | #endif // DOXYGEN_SHOULD_SKIP_THIS |
| 43 | |
| 44 | namespace Gst |
| 45 | { |
| 46 | class Toc; |
| 47 | |
| 48 | /** An interface that allows setting and retrieval of the TOC. |
| 49 | * |
| 50 | * Elements that support some kind of chapters or editions (or tracks like in |
| 51 | * the FLAC cue sheet) will implement this interface. |
| 52 | * |
| 53 | * If you just want to retrieve the TOC in your application then all you |
| 54 | * need to do is watch for TOC messages on your pipeline's bus (or you can |
| 55 | * perform TOC query). This interface is only for setting TOC data, not for |
| 56 | * extracting it. To set TOC from the application, find proper tocsetter element |
| 57 | * and set TOC using set_toc(). |
| 58 | * |
| 59 | * Elements implementing the Gst::TocSetter interface can extend existing TOC |
| 60 | * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it) |
| 61 | * with any TOC entries received from downstream. |
| 62 | * |
| 63 | * Last reviewed on 2016-08-27 (1.8.0) |
| 64 | * |
| 65 | * @ingroup GstInterfaces |
| 66 | */ |
| 67 | |
| 68 | class TocSetter : public Glib::Interface |
| 69 | { |
| 70 | |
| 71 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 72 | |
| 73 | public: |
| 74 | using CppObjectType = TocSetter; |
| 75 | using CppClassType = TocSetter_Class; |
| 76 | using BaseObjectType = GstTocSetter; |
| 77 | using BaseClassType = GstTocSetterInterface; |
| 78 | |
| 79 | // noncopyable |
| 80 | TocSetter(const TocSetter&) = delete; |
| 81 | TocSetter& operator=(const TocSetter&) = delete; |
| 82 | |
| 83 | private: |
| 84 | friend class TocSetter_Class; |
| 85 | static CppClassType tocsetter_class_; |
| 86 | |
| 87 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 88 | protected: |
| 89 | /** |
| 90 | * You should derive from this class to use it. |
| 91 | */ |
| 92 | TocSetter(); |
| 93 | |
| 94 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 95 | /** Called by constructors of derived classes. Provide the result of |
| 96 | * the Class init() function to ensure that it is properly |
| 97 | * initialized. |
| 98 | * |
| 99 | * @param interface_class The Class object for the derived type. |
| 100 | */ |
| 101 | explicit TocSetter(const Glib::Interface_Class& interface_class); |
| 102 | |
| 103 | public: |
| 104 | // This is public so that C++ wrapper instances can be |
| 105 | // created for C instances of unwrapped types. |
| 106 | // For instance, if an unexpected C type implements the C interface. |
| 107 | explicit TocSetter(GstTocSetter* castitem); |
| 108 | |
| 109 | protected: |
| 110 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 111 | |
| 112 | public: |
| 113 | |
| 114 | TocSetter(TocSetter&& src) noexcept; |
| 115 | TocSetter& operator=(TocSetter&& src) noexcept; |
| 116 | |
| 117 | ~TocSetter() noexcept override; |
| 118 | |
| 119 | static void add_interface(GType gtype_implementer); |
| 120 | |
| 121 | /** Get the GType for this class, for use with the underlying GObject type system. |
| 122 | */ |
| 123 | static GType get_type() G_GNUC_CONST; |
| 124 | |
| 125 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 126 | static GType get_base_type() G_GNUC_CONST; |
| 127 | #endif |
| 128 | |
| 129 | ///Provides access to the underlying C GObject. |
| 130 | GstTocSetter* gobj() { return reinterpret_cast<GstTocSetter*>(gobject_); } |
| 131 | |
| 132 | ///Provides access to the underlying C GObject. |
| 133 | const GstTocSetter* gobj() const { return reinterpret_cast<GstTocSetter*>(gobject_); } |
| 134 | |
| 135 | private: |
| 136 | |
| 137 | |
| 138 | public: |
| 139 | |
| 140 | /** Set the given TOC on the setter. Previously set TOC will be |
| 141 | * unreffed before setting a new one. |
| 142 | * |
| 143 | * @param toc A Gst::Toc to set. |
| 144 | */ |
| 145 | void set_toc(const Glib::RefPtr<Gst::Toc>& toc); |
| 146 | |
| 147 | /** Return current TOC the setter uses. The TOC should not be |
| 148 | * modified without making it writable first. |
| 149 | * |
| 150 | * @return TOC set, or <tt>nullptr</tt>. Unref with |
| 151 | * gst_toc_unref() when no longer needed. |
| 152 | */ |
| 153 | Glib::RefPtr<Gst::Toc> get_toc() const; |
| 154 | |
| 155 | /** Reset the internal TOC. Elements should call this from within the |
| 156 | * state-change handler. |
| 157 | */ |
| 158 | void reset(); |
| 159 | |
| 160 | |
| 161 | public: |
| 162 | |
| 163 | public: |
| 164 | //C++ methods used to invoke GTK+ virtual functions: |
| 165 | |
| 166 | protected: |
| 167 | //GTK+ Virtual Functions (override these to change behaviour): |
| 168 | |
| 169 | //Default Signal Handlers:: |
| 170 | |
| 171 | |
| 172 | }; |
| 173 | } |
| 174 | |
| 175 | |
| 176 | namespace Glib |
| 177 | { |
| 178 | /** A Glib::wrap() method for this object. |
| 179 | * |
| 180 | * @param object The C instance. |
| 181 | * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
| 182 | * @result A C++ instance that wraps this C instance. |
| 183 | * |
| 184 | * @relates Gst::TocSetter |
| 185 | */ |
| 186 | Glib::RefPtr<Gst::TocSetter> wrap(GstTocSetter* object, bool take_copy = false); |
| 187 | |
| 188 | } // namespace Glib |
| 189 | |
| 190 | |
| 191 | #endif /* _GSTREAMERMM_TOCSETTER_H */ |
| 192 |