| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/tagsetter.h> |
| 7 | #include <gstreamermm/private/tagsetter_p.h> |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2008 The gstreamermm Development Team |
| 13 | * |
| 14 | * This library is free software; you can redistribute it and/or |
| 15 | * modify it under the terms of the GNU Lesser General Public |
| 16 | * License as published by the Free Software Foundation; either |
| 17 | * version 2.1 of the License, or (at your option) any later version. |
| 18 | * |
| 19 | * This library is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | * Lesser General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU Lesser General Public |
| 25 | * License along with this library; if not, write to the Free |
| 26 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 27 | */ |
| 28 | |
| 29 | namespace Gst |
| 30 | { |
| 31 | |
| 32 | void TagSetter::add_tag(Tag tag, const Glib::ValueBase& value, |
| 33 | TagMergeMode mode) |
| 34 | { |
| 35 | gst_tag_setter_add_tag_values(gobj(), (GstTagMergeMode) mode, |
| 36 | gstreamermm_get_stock_tag(tag), value.gobj(), (void*)0); |
| 37 | } |
| 38 | |
| 39 | void TagSetter::add_tag(const Glib::ustring& tag, const Glib::ValueBase& value, |
| 40 | TagMergeMode mode) |
| 41 | { |
| 42 | gst_tag_setter_add_tag_values(gobj(), (GstTagMergeMode) mode, tag.c_str(), |
| 43 | value.gobj(), (void*)0); |
| 44 | } |
| 45 | |
| 46 | void TagSetter::add_tag(Tag tag, const char* data, TagMergeMode mode) |
| 47 | { |
| 48 | gst_tag_setter_add_tags(gobj(), (GstTagMergeMode) mode, |
| 49 | gstreamermm_get_stock_tag(tag), data, (void*)0); |
| 50 | } |
| 51 | |
| 52 | void TagSetter::add_tag(const Glib::ustring& tag, const char* data, |
| 53 | TagMergeMode mode) |
| 54 | { |
| 55 | gst_tag_setter_add_tags(gobj(), (GstTagMergeMode) mode, tag.c_str(), |
| 56 | data, (void*)0); |
| 57 | } |
| 58 | |
| 59 | } //namespace Gst |
| 60 | |
| 61 | namespace |
| 62 | { |
| 63 | } // anonymous namespace |
| 64 | |
| 65 | |
| 66 | namespace Glib |
| 67 | { |
| 68 | |
| 69 | Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy) |
| 70 | { |
| 71 | return Glib::RefPtr<Gst::TagSetter>( dynamic_cast<Gst::TagSetter*> (Glib::wrap_auto_interface<Gst::TagSetter> ((GObject*)(object), take_copy)) ); |
| 72 | //We use dynamic_cast<> in case of multiple inheritance. |
| 73 | } |
| 74 | |
| 75 | } // namespace Glib |
| 76 | |
| 77 | |
| 78 | namespace Gst |
| 79 | { |
| 80 | |
| 81 | |
| 82 | /* The *_Class implementation: */ |
| 83 | |
| 84 | const Glib::Interface_Class& TagSetter_Class::init() |
| 85 | { |
| 86 | if(!gtype_) // create the GType if necessary |
| 87 | { |
| 88 | // Glib::Interface_Class has to know the interface init function |
| 89 | // in order to add interfaces to implementing types. |
| 90 | class_init_func_ = &TagSetter_Class::iface_init_function; |
| 91 | |
| 92 | // We can not derive from another interface, and it is not necessary anyway. |
| 93 | gtype_ = gst_tag_setter_get_type(); |
| 94 | } |
| 95 | |
| 96 | return *this; |
| 97 | } |
| 98 | |
| 99 | void TagSetter_Class::iface_init_function(void* g_iface, void*) |
| 100 | { |
| 101 | const auto klass = static_cast<BaseClassType*>(g_iface); |
| 102 | |
| 103 | //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect. |
| 104 | //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc |
| 105 | g_assert(klass != nullptr); |
| 106 | |
| 107 | |
| 108 | } |
| 109 | |
| 110 | |
| 111 | Glib::ObjectBase* TagSetter_Class::wrap_new(GObject* object) |
| 112 | { |
| 113 | return new TagSetter((GstTagSetter*)(object)); |
| 114 | } |
| 115 | |
| 116 | |
| 117 | /* The implementation: */ |
| 118 | |
| 119 | TagSetter::TagSetter() |
| 120 | : |
| 121 | Glib::Interface(tagsetter_class_.init()) |
| 122 | {} |
| 123 | |
| 124 | TagSetter::TagSetter(GstTagSetter* castitem) |
| 125 | : |
| 126 | Glib::Interface((GObject*)(castitem)) |
| 127 | {} |
| 128 | |
| 129 | TagSetter::TagSetter(const Glib::Interface_Class& interface_class) |
| 130 | : Glib::Interface(interface_class) |
| 131 | { |
| 132 | } |
| 133 | |
| 134 | TagSetter::TagSetter(TagSetter&& src) noexcept |
| 135 | : Glib::Interface(std::move(src)) |
| 136 | {} |
| 137 | |
| 138 | TagSetter& TagSetter::operator=(TagSetter&& src) noexcept |
| 139 | { |
| 140 | Glib::Interface::operator=(std::move(src)); |
| 141 | return *this; |
| 142 | } |
| 143 | |
| 144 | TagSetter::~TagSetter() noexcept |
| 145 | {} |
| 146 | |
| 147 | // static |
| 148 | void TagSetter::add_interface(GType gtype_implementer) |
| 149 | { |
| 150 | tagsetter_class_.init().add_interface(gtype_implementer); |
| 151 | } |
| 152 | |
| 153 | TagSetter::CppClassType TagSetter::tagsetter_class_; // initialize static member |
| 154 | |
| 155 | GType TagSetter::get_type() |
| 156 | { |
| 157 | return tagsetter_class_.init().get_type(); |
| 158 | } |
| 159 | |
| 160 | |
| 161 | GType TagSetter::get_base_type() |
| 162 | { |
| 163 | return gst_tag_setter_get_type(); |
| 164 | } |
| 165 | |
| 166 | |
| 167 | void TagSetter::reset_tags() |
| 168 | { |
| 169 | gst_tag_setter_reset_tags(gobj()); |
| 170 | } |
| 171 | |
| 172 | void TagSetter::merge_tags(const Gst::TagList& list, TagMergeMode mode) |
| 173 | { |
| 174 | gst_tag_setter_merge_tags(gobj(), list.gobj(), ((GstTagMergeMode)(mode))); |
| 175 | } |
| 176 | |
| 177 | const Gst::TagList TagSetter::get_tag_list() const |
| 178 | { |
| 179 | return Glib::wrap_taglist(const_cast<GstTagList*>(gst_tag_setter_get_tag_list(const_cast<GstTagSetter*>(gobj()))), true); |
| 180 | } |
| 181 | |
| 182 | void TagSetter::set_tag_merge_mode(TagMergeMode mode) |
| 183 | { |
| 184 | gst_tag_setter_set_tag_merge_mode(gobj(), ((GstTagMergeMode)(mode))); |
| 185 | } |
| 186 | |
| 187 | TagMergeMode TagSetter::get_tag_merge_mode() const |
| 188 | { |
| 189 | return ((TagMergeMode)(gst_tag_setter_get_tag_merge_mode(const_cast<GstTagSetter*>(gobj())))); |
| 190 | } |
| 191 | |
| 192 | |
| 193 | } // namespace Gst |
| 194 | |
| 195 |