| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/streamvolume.h> |
| 7 | #include <gstreamermm/private/streamvolume_p.h> |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2009 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 | #include <gst/video/video-enumtypes.h> |
| 30 | |
| 31 | namespace |
| 32 | { |
| 33 | } // anonymous namespace |
| 34 | |
| 35 | |
| 36 | namespace Glib |
| 37 | { |
| 38 | |
| 39 | Glib::RefPtr<Gst::StreamVolume> wrap(GstStreamVolume* object, bool take_copy) |
| 40 | { |
| 41 | return Glib::RefPtr<Gst::StreamVolume>( dynamic_cast<Gst::StreamVolume*> (Glib::wrap_auto_interface<Gst::StreamVolume> ((GObject*)(object), take_copy)) ); |
| 42 | //We use dynamic_cast<> in case of multiple inheritance. |
| 43 | } |
| 44 | |
| 45 | } // namespace Glib |
| 46 | |
| 47 | |
| 48 | namespace Gst |
| 49 | { |
| 50 | |
| 51 | |
| 52 | /* The *_Class implementation: */ |
| 53 | |
| 54 | const Glib::Interface_Class& StreamVolume_Class::init() |
| 55 | { |
| 56 | if(!gtype_) // create the GType if necessary |
| 57 | { |
| 58 | // Glib::Interface_Class has to know the interface init function |
| 59 | // in order to add interfaces to implementing types. |
| 60 | class_init_func_ = &StreamVolume_Class::iface_init_function; |
| 61 | |
| 62 | // We can not derive from another interface, and it is not necessary anyway. |
| 63 | gtype_ = gst_stream_volume_get_type(); |
| 64 | } |
| 65 | |
| 66 | return *this; |
| 67 | } |
| 68 | |
| 69 | void StreamVolume_Class::iface_init_function(void* g_iface, void*) |
| 70 | { |
| 71 | const auto klass = static_cast<BaseClassType*>(g_iface); |
| 72 | |
| 73 | //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect. |
| 74 | //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc |
| 75 | g_assert(klass != nullptr); |
| 76 | |
| 77 | |
| 78 | } |
| 79 | |
| 80 | |
| 81 | Glib::ObjectBase* StreamVolume_Class::wrap_new(GObject* object) |
| 82 | { |
| 83 | return new StreamVolume((GstStreamVolume*)(object)); |
| 84 | } |
| 85 | |
| 86 | |
| 87 | /* The implementation: */ |
| 88 | |
| 89 | StreamVolume::StreamVolume() |
| 90 | : |
| 91 | Glib::Interface(streamvolume_class_.init()) |
| 92 | {} |
| 93 | |
| 94 | StreamVolume::StreamVolume(GstStreamVolume* castitem) |
| 95 | : |
| 96 | Glib::Interface((GObject*)(castitem)) |
| 97 | {} |
| 98 | |
| 99 | StreamVolume::StreamVolume(const Glib::Interface_Class& interface_class) |
| 100 | : Glib::Interface(interface_class) |
| 101 | { |
| 102 | } |
| 103 | |
| 104 | StreamVolume::StreamVolume(StreamVolume&& src) noexcept |
| 105 | : Glib::Interface(std::move(src)) |
| 106 | {} |
| 107 | |
| 108 | StreamVolume& StreamVolume::operator=(StreamVolume&& src) noexcept |
| 109 | { |
| 110 | Glib::Interface::operator=(std::move(src)); |
| 111 | return *this; |
| 112 | } |
| 113 | |
| 114 | StreamVolume::~StreamVolume() noexcept |
| 115 | {} |
| 116 | |
| 117 | // static |
| 118 | void StreamVolume::add_interface(GType gtype_implementer) |
| 119 | { |
| 120 | streamvolume_class_.init().add_interface(gtype_implementer); |
| 121 | } |
| 122 | |
| 123 | StreamVolume::CppClassType StreamVolume::streamvolume_class_; // initialize static member |
| 124 | |
| 125 | GType StreamVolume::get_type() |
| 126 | { |
| 127 | return streamvolume_class_.init().get_type(); |
| 128 | } |
| 129 | |
| 130 | |
| 131 | GType StreamVolume::get_base_type() |
| 132 | { |
| 133 | return gst_stream_volume_get_type(); |
| 134 | } |
| 135 | |
| 136 | |
| 137 | double StreamVolume::get_volume(Gst::StreamVolumeFormat format) |
| 138 | { |
| 139 | return gst_stream_volume_get_volume(gobj(), ((GstStreamVolumeFormat)(format))); |
| 140 | } |
| 141 | |
| 142 | void StreamVolume::set_volume(Gst::StreamVolumeFormat format, double val) |
| 143 | { |
| 144 | gst_stream_volume_set_volume(gobj(), ((GstStreamVolumeFormat)(format)), val); |
| 145 | } |
| 146 | |
| 147 | bool StreamVolume::get_mute() |
| 148 | { |
| 149 | return gst_stream_volume_get_mute(gobj()); |
| 150 | } |
| 151 | |
| 152 | void StreamVolume::set_mute(bool mute) |
| 153 | { |
| 154 | gst_stream_volume_set_mute(gobj(), static_cast<int>(mute)); |
| 155 | } |
| 156 | |
| 157 | double StreamVolume::convert_volume(Gst::StreamVolumeFormat from, Gst::StreamVolumeFormat to, double val) |
| 158 | { |
| 159 | return gst_stream_volume_convert_volume(((GstStreamVolumeFormat)(from)), ((GstStreamVolumeFormat)(to)), val); |
| 160 | } |
| 161 | |
| 162 | |
| 163 | Glib::PropertyProxy< bool > StreamVolume::property_mute() |
| 164 | { |
| 165 | return Glib::PropertyProxy< bool >(this, "mute"); |
| 166 | } |
| 167 | |
| 168 | Glib::PropertyProxy_ReadOnly< bool > StreamVolume::property_mute() const |
| 169 | { |
| 170 | return Glib::PropertyProxy_ReadOnly< bool >(this, "mute"); |
| 171 | } |
| 172 | |
| 173 | Glib::PropertyProxy< double > StreamVolume::property_volume() |
| 174 | { |
| 175 | return Glib::PropertyProxy< double >(this, "volume"); |
| 176 | } |
| 177 | |
| 178 | Glib::PropertyProxy_ReadOnly< double > StreamVolume::property_volume() const |
| 179 | { |
| 180 | return Glib::PropertyProxy_ReadOnly< double >(this, "volume"); |
| 181 | } |
| 182 | |
| 183 | |
| 184 | } // namespace Gst |
| 185 | |
| 186 |