| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/pipeline.h> |
| 7 | #include <gstreamermm/private/pipeline_p.h> |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2008-2016 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/gst.h> |
| 30 | #include <gstreamermm/bus.h> |
| 31 | |
| 32 | |
| 33 | namespace Gst |
| 34 | { |
| 35 | |
| 36 | Pipeline::Pipeline() |
| 37 | : // Mark this class as non-derived to allow C++ vfuncs to be skipped. |
| 38 | Glib::ObjectBase(nullptr), |
| 39 | Bin(Glib::ConstructParams(pipeline_class_.init(), "name",static_cast<char*>(0), nullptr)) |
| 40 | {} |
| 41 | |
| 42 | } // namespace Gst |
| 43 | |
| 44 | namespace |
| 45 | { |
| 46 | } // anonymous namespace |
| 47 | |
| 48 | |
| 49 | namespace Glib |
| 50 | { |
| 51 | |
| 52 | Glib::RefPtr<Gst::Pipeline> wrap(GstPipeline* object, bool take_copy) |
| 53 | { |
| 54 | return Glib::RefPtr<Gst::Pipeline>( dynamic_cast<Gst::Pipeline*> (Glib::wrap_auto ((GObject*)(object), take_copy)) ); |
| 55 | //We use dynamic_cast<> in case of multiple inheritance. |
| 56 | } |
| 57 | |
| 58 | } /* namespace Glib */ |
| 59 | |
| 60 | |
| 61 | namespace Gst |
| 62 | { |
| 63 | |
| 64 | |
| 65 | /* The *_Class implementation: */ |
| 66 | |
| 67 | const Glib::Class& Pipeline_Class::init() |
| 68 | { |
| 69 | if(!gtype_) // create the GType if necessary |
| 70 | { |
| 71 | // Glib::Class has to know the class init function to clone custom types. |
| 72 | class_init_func_ = &Pipeline_Class::class_init_function; |
| 73 | |
| 74 | // This is actually just optimized away, apparently with no harm. |
| 75 | // Make sure that the parent type has been created. |
| 76 | //CppClassParent::CppObjectType::get_type(); |
| 77 | |
| 78 | // Create the wrapper type, with the same class/instance size as the base type. |
| 79 | register_derived_type(gst_pipeline_get_type()); |
| 80 | |
| 81 | // Add derived versions of interfaces, if the C type implements any interfaces: |
| 82 | |
| 83 | } |
| 84 | |
| 85 | return *this; |
| 86 | } |
| 87 | |
| 88 | |
| 89 | void Pipeline_Class::class_init_function(void* g_class, void* class_data) |
| 90 | { |
| 91 | const auto klass = static_cast<BaseClassType*>(g_class); |
| 92 | CppClassParent::class_init_function(klass, class_data); |
| 93 | |
| 94 | |
| 95 | } |
| 96 | |
| 97 | |
| 98 | Glib::ObjectBase* Pipeline_Class::wrap_new(GObject* object) |
| 99 | { |
| 100 | return new Pipeline((GstPipeline*)object); |
| 101 | } |
| 102 | |
| 103 | |
| 104 | /* The implementation: */ |
| 105 | |
| 106 | GstPipeline* Pipeline::gobj_copy() |
| 107 | { |
| 108 | reference(); |
| 109 | return gobj(); |
| 110 | } |
| 111 | |
| 112 | Pipeline::Pipeline(const Glib::ConstructParams& construct_params) |
| 113 | : |
| 114 | Bin(construct_params) |
| 115 | { |
| 116 | |
| 117 | } |
| 118 | |
| 119 | Pipeline::Pipeline(GstPipeline* castitem) |
| 120 | : |
| 121 | Bin((GstBin*)(castitem)) |
| 122 | {} |
| 123 | |
| 124 | |
| 125 | Pipeline::Pipeline(Pipeline&& src) noexcept |
| 126 | : Bin(std::move(src)) |
| 127 | {} |
| 128 | |
| 129 | Pipeline& Pipeline::operator=(Pipeline&& src) noexcept |
| 130 | { |
| 131 | Bin::operator=(std::move(src)); |
| 132 | return *this; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | Pipeline::~Pipeline() noexcept |
| 137 | {} |
| 138 | |
| 139 | |
| 140 | Pipeline::CppClassType Pipeline::pipeline_class_; // initialize static member |
| 141 | |
| 142 | GType Pipeline::get_type() |
| 143 | { |
| 144 | return pipeline_class_.init().get_type(); |
| 145 | } |
| 146 | |
| 147 | |
| 148 | GType Pipeline::get_base_type() |
| 149 | { |
| 150 | return gst_pipeline_get_type(); |
| 151 | } |
| 152 | |
| 153 | |
| 154 | Pipeline::Pipeline(const Glib::ustring& name) |
| 155 | : |
| 156 | // Mark this class as non-derived to allow C++ vfuncs to be skipped. |
| 157 | Glib::ObjectBase(nullptr), |
| 158 | Bin(Glib::ConstructParams(pipeline_class_.init(), "name", name.c_str(), nullptr)) |
| 159 | { |
| 160 | |
| 161 | |
| 162 | } |
| 163 | |
| 164 | Glib::RefPtr<Pipeline> Pipeline::create(const Glib::ustring& name) |
| 165 | { |
| 166 | return Glib::RefPtr<Pipeline>( new Pipeline(name) ); |
| 167 | } |
| 168 | |
| 169 | Glib::RefPtr<Pipeline> Pipeline::create() |
| 170 | { |
| 171 | return Glib::RefPtr<Pipeline>( new Pipeline() ); |
| 172 | } |
| 173 | |
| 174 | Glib::RefPtr<Gst::Bus> Pipeline::get_bus() |
| 175 | { |
| 176 | return Glib::wrap(gst_pipeline_get_bus(gobj())); |
| 177 | } |
| 178 | |
| 179 | Glib::RefPtr<const Gst::Bus> Pipeline::get_bus() const |
| 180 | { |
| 181 | return const_cast<Pipeline*>(this)->get_bus(); |
| 182 | } |
| 183 | |
| 184 | bool Pipeline::set_clock(const Glib::RefPtr<Gst::Clock>& clock) |
| 185 | { |
| 186 | return gst_pipeline_set_clock(gobj(), Glib::unwrap(clock)); |
| 187 | } |
| 188 | |
| 189 | Glib::RefPtr<Gst::Clock> Pipeline::get_clock() |
| 190 | { |
| 191 | return Glib::wrap(gst_pipeline_get_clock(gobj())); |
| 192 | } |
| 193 | |
| 194 | Glib::RefPtr<const Gst::Clock> Pipeline::get_clock() const |
| 195 | { |
| 196 | return const_cast<Pipeline*>(this)->get_clock(); |
| 197 | } |
| 198 | |
| 199 | void Pipeline::use_clock(const Glib::RefPtr<Gst::Clock>& clock) |
| 200 | { |
| 201 | gst_pipeline_use_clock(gobj(), Glib::unwrap(clock)); |
| 202 | } |
| 203 | |
| 204 | void Pipeline::auto_clock() |
| 205 | { |
| 206 | gst_pipeline_auto_clock(gobj()); |
| 207 | } |
| 208 | |
| 209 | void Pipeline::set_auto_flush_bus(gboolean auto_flush) |
| 210 | { |
| 211 | gst_pipeline_set_auto_flush_bus(gobj(), auto_flush); |
| 212 | } |
| 213 | |
| 214 | bool Pipeline::get_auto_flush_bus() const |
| 215 | { |
| 216 | return gst_pipeline_get_auto_flush_bus(const_cast<GstPipeline*>(gobj())); |
| 217 | } |
| 218 | |
| 219 | void Pipeline::set_delay(ClockTime delay) |
| 220 | { |
| 221 | gst_pipeline_set_delay(gobj(), ((GstClockTime)(delay))); |
| 222 | } |
| 223 | |
| 224 | ClockTime Pipeline::get_delay() const |
| 225 | { |
| 226 | return ((ClockTime)(gst_pipeline_get_delay(const_cast<GstPipeline*>(gobj())))); |
| 227 | } |
| 228 | |
| 229 | Glib::RefPtr<Gst::Clock> Pipeline::get_pipeline_clock() |
| 230 | { |
| 231 | return Glib::wrap(gst_pipeline_get_pipeline_clock(gobj())); |
| 232 | } |
| 233 | |
| 234 | Glib::RefPtr<const Gst::Clock> Pipeline::get_pipeline_clock() const |
| 235 | { |
| 236 | return const_cast<Pipeline*>(this)->get_pipeline_clock(); |
| 237 | } |
| 238 | |
| 239 | void Pipeline::set_latency(Gst::ClockTime latency) |
| 240 | { |
| 241 | gst_pipeline_set_latency(gobj(), ((GstClockTime)(latency))); |
| 242 | } |
| 243 | |
| 244 | Gst::ClockTime Pipeline::get_latency() const |
| 245 | { |
| 246 | return ((Gst::ClockTime)(gst_pipeline_get_latency(const_cast<GstPipeline*>(gobj())))); |
| 247 | } |
| 248 | |
| 249 | |
| 250 | Glib::PropertyProxy< guint64 > Pipeline::property_latency() |
| 251 | { |
| 252 | return Glib::PropertyProxy< guint64 >(this, "latency"); |
| 253 | } |
| 254 | |
| 255 | Glib::PropertyProxy_ReadOnly< guint64 > Pipeline::property_latency() const |
| 256 | { |
| 257 | return Glib::PropertyProxy_ReadOnly< guint64 >(this, "latency"); |
| 258 | } |
| 259 | |
| 260 | Glib::PropertyProxy< bool > Pipeline::property_auto_flush_bus() |
| 261 | { |
| 262 | return Glib::PropertyProxy< bool >(this, "auto-flush-bus"); |
| 263 | } |
| 264 | |
| 265 | Glib::PropertyProxy_ReadOnly< bool > Pipeline::property_auto_flush_bus() const |
| 266 | { |
| 267 | return Glib::PropertyProxy_ReadOnly< bool >(this, "auto-flush-bus"); |
| 268 | } |
| 269 | |
| 270 | Glib::PropertyProxy< ClockTime > Pipeline::property_delay() |
| 271 | { |
| 272 | return Glib::PropertyProxy< ClockTime >(this, "delay"); |
| 273 | } |
| 274 | |
| 275 | Glib::PropertyProxy_ReadOnly< ClockTime > Pipeline::property_delay() const |
| 276 | { |
| 277 | return Glib::PropertyProxy_ReadOnly< ClockTime >(this, "delay"); |
| 278 | } |
| 279 | |
| 280 | |
| 281 | } // namespace Gst |
| 282 | |
| 283 |