| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/task.cc`/ |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/task.h>cxx . . $ `<file>/gstreamer/gstreamermm/task.h`/ |
| 7 | #include <gstreamermm/private/task_p.h>cxx . . $ `<file>/gstreamer/gstreamermm/private/task_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 | #include <gst/gst.h> |
| 30 | #include <gstreamermm/taskpool.h>cxx . . $ `<file>/gstreamer/gstreamermm/taskpool.h`/ |
| 31 | |
| 32 | |
| 33 | namespacecxx . . $ `$anonymous_namespace_gstreamer/gstreamermm/task.cc`/ |
| 34 | { |
| 35 | |
| 36 | extern "C" |
| 37 | { |
| 38 | |
| 39 | static void Task_Task_gstreamermm_callback(void* data) |
| 40 | { |
| 41 | Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#::SlotTaskcxx . . $ Gst/Task#SlotTask#* the_slot = static_cast<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#::SlotTaskcxx . . $ Gst/Task#SlotTask#*>(data); |
| 42 | |
| 43 | try |
| 44 | { |
| 45 | (*the_slot)(cxx . . $ sigc/slot0#`operator()`(8f5363d873dd4781).); |
| 46 | } |
| 47 | catch(...) |
| 48 | { |
| 49 | Glibcxx . . $ Glib/::exception_handlers_invokecxx . . $ Glib/exception_handlers_invoke(ced63f7c635d850d).(); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | static void Task_Thread_gstreamermm_callback(GstTaskcxx . . $ GstTask#* task, GThread* thread, gpointer user_data) |
| 54 | { |
| 55 | Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#::TaskThreadSlotcxx . . $ Gst/Task#TaskThreadSlot#* the_slot = static_cast<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#::TaskThreadSlotcxx . . $ Gst/Task#TaskThreadSlot#*>(user_data); |
| 56 | |
| 57 | try |
| 58 | { |
| 59 | (*the_slot)(cxx . . $ sigc/slot2#`operator()`(d6f853cadabc373b).Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(307007635fa0a143).(task, true), Glibcxx . . $ Glib/::Threadscxx . . $ Glib/Threads/::wrapcxx . . $ Glib/Threads/wrap(64ebfb3fb400f80c).(thread)); |
| 60 | } |
| 61 | catch(...) |
| 62 | { |
| 63 | Glibcxx . . $ Glib/::exception_handlers_invokecxx . . $ Glib/exception_handlers_invoke(ced63f7c635d850d).(); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | static void Task_Callbacks_gstreamermm_callback_destroy(void* data) |
| 68 | { |
| 69 | delete static_cast<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#::TaskThreadSlotcxx . . $ Gst/Task#TaskThreadSlot#*>(data); |
| 70 | } |
| 71 | |
| 72 | } // extern "C" |
| 73 | |
| 74 | } // anonymous namespace |
| 75 | |
| 76 | namespace Gstcxx . . $ Gst/ |
| 77 | { |
| 78 | |
| 79 | Taskcxx . . $ Gst/Task#::Taskcxx . . $ Gst/Task#Task(c89ba1236a12ec8f).(const SlotTaskcxx . . $ Gst/Task#SlotTask#& task_slot) |
| 80 | : |
| 81 | // Mark this class as non-derived to allow C++ vfuncs to be skipped. |
| 82 | Glibcxx . . $ Glib/::ObjectBasecxx . . $ Glib/ObjectBase#(nullptr), |
| 83 | Objectcxx . . $ Gst/Object#(Glibcxx . . $ Glib/::ConstructParamscxx . . $ Glib/ConstructParams#(task_class_cxx . . $ Gst/Task#task_class_..initcxx . . $ Gst/Task_Class#init(bf348c0cd369184d).())) |
| 84 | { |
| 85 | // Create a copy of the slot. A pointer to this copy will be passed through |
| 86 | // the call back's data parameter. It will be destroyed with the |
| 87 | // std::unique_ptr<>. |
| 88 | m_slotcxx . . $ Gst/Task#m_slot..resetcxx . . $ std/unique_ptr#reset(c8c3025d73122d7d).(new SlotTaskcxx . . $ Gst/Task#SlotTask#(task_slot)); |
| 89 | |
| 90 | // These lines are taken verbatim from gst_task_create() after calling |
| 91 | // g_object_new(). |
| 92 | gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()->funccxx . . $ _GstTask#func. = &Task_Task_gstreamermm_callback; |
| 93 | gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()->user_datacxx . . $ _GstTask#user_data. = m_slotcxx . . $ Gst/Task#m_slot..getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).(); |
| 94 | } |
| 95 | |
| 96 | void Taskcxx . . $ Gst/Task#::set_leave_slotcxx . . $ Gst/Task#set_leave_slot(c47c7fb6356781bb).(const SlotLeavecxx . . $ Gst/Task#SlotLeave#& leave_slot) |
| 97 | { |
| 98 | gst_task_set_leave_callback(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(), &Task_Thread_gstreamermm_callback, new SlotLeavecxx . . $ Gst/Task#SlotLeave#(leave_slot), &Task_Callbacks_gstreamermm_callback_destroy); |
| 99 | } |
| 100 | |
| 101 | void Taskcxx . . $ Gst/Task#::set_enter_slotcxx . . $ Gst/Task#set_enter_slot(c47c7fb6356781bb).(const SlotEntercxx . . $ Gst/Task#SlotEnter#& enter_slot) |
| 102 | { |
| 103 | gst_task_set_enter_callback(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(), &Task_Thread_gstreamermm_callback, new SlotEntercxx . . $ Gst/Task#SlotEnter#(enter_slot), &Task_Callbacks_gstreamermm_callback_destroy); |
| 104 | } |
| 105 | |
| 106 | } //namespace Gst |
| 107 | |
| 108 | namespacecxx . . $ `$anonymous_namespace_gstreamer/gstreamermm/task.cc`/ |
| 109 | { |
| 110 | } // anonymous namespace |
| 111 | |
| 112 | // static |
| 113 | GType Glibcxx . . $ Glib/::Valuecxx . . $ Glib/Value#<Gst::TaskState>::value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() |
| 114 | { |
| 115 | return gst_task_state_get_type(); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | namespace Glibcxx . . $ Glib/ |
| 120 | { |
| 121 | |
| 122 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#> wrapcxx . . $ Glib/wrap(307007635fa0a143).(GstTaskcxx . . $ GstTask#* object, bool take_copy) |
| 123 | { |
| 124 | return Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#>( dynamic_cast<Gstcxx . . $ Gst/::Taskcxx . . $ Gst/Task#*> (Glibcxx . . $ Glib/::wrap_autocxx . . $ Glib/wrap_auto(fd1af59aa43b0601). ((GObjectcxx . . $ GObject#*)(object), take_copy)) ); |
| 125 | //We use dynamic_cast<> in case of multiple inheritance. |
| 126 | } |
| 127 | |
| 128 | } /* namespace Glib */ |
| 129 | |
| 130 | |
| 131 | namespace Gstcxx . . $ Gst/ |
| 132 | { |
| 133 | |
| 134 | |
| 135 | /* The *_Class implementation: */ |
| 136 | |
| 137 | const Glibcxx . . $ Glib/::Classcxx . . $ Glib/Class#& Task_Classcxx . . $ Gst/Task_Class#::initcxx . . $ Gst/Task_Class#init(bf348c0cd369184d).() |
| 138 | { |
| 139 | if(!gtype_cxx . . $ Glib/Class#gtype_.) // create the GType if necessary |
| 140 | { |
| 141 | // Glib::Class has to know the class init function to clone custom types. |
| 142 | class_init_func_cxx . . $ Glib/Class#class_init_func_. = &Task_Classcxx . . $ Gst/Task_Class#::class_init_functioncxx . . $ Gst/Task_Class#class_init_function(6c58c5e2437d25a2).; |
| 143 | |
| 144 | // This is actually just optimized away, apparently with no harm. |
| 145 | // Make sure that the parent type has been created. |
| 146 | //CppClassParent::CppObjectType::get_type(); |
| 147 | |
| 148 | // Create the wrapper type, with the same class/instance size as the base type. |
| 149 | register_derived_typecxx . . $ Glib/Class#register_derived_type(2c44cd906ae4e829).(gst_task_get_type()); |
| 150 | |
| 151 | // Add derived versions of interfaces, if the C type implements any interfaces: |
| 152 | |
| 153 | } |
| 154 | |
| 155 | return *this; |
| 156 | } |
| 157 | |
| 158 | |
| 159 | void Task_Classcxx . . $ Gst/Task_Class#::class_init_functioncxx . . $ Gst/Task_Class#class_init_function(6c58c5e2437d25a2).(void* g_class, void* class_data) |
| 160 | { |
| 161 | const auto klass = static_cast<BaseClassTypecxx . . $ Gst/Task_Class#BaseClassType#*>(g_class); |
| 162 | CppClassParentcxx . . $ Gst/Task_Class#CppClassParent#::class_init_functioncxx . . $ Gst/Object_Class#class_init_function(6c58c5e2437d25a2).(klass, class_data); |
| 163 | |
| 164 | |
| 165 | } |
| 166 | |
| 167 | |
| 168 | Glibcxx . . $ Glib/::ObjectBasecxx . . $ Glib/ObjectBase#* Task_Classcxx . . $ Gst/Task_Class#::wrap_newcxx . . $ Gst/Task_Class#wrap_new(893eec6d4349e251).(GObjectcxx . . $ GObject#* object) |
| 169 | { |
| 170 | return new Taskcxx . . $ Gst/Task#((GstTaskcxx . . $ GstTask#*)object); |
| 171 | } |
| 172 | |
| 173 | |
| 174 | /* The implementation: */ |
| 175 | |
| 176 | GstTaskcxx . . $ GstTask#* Taskcxx . . $ Gst/Task#::gobj_copycxx . . $ Gst/Task#gobj_copy(69decbbe1cbfff1).() |
| 177 | { |
| 178 | referencecxx . . $ Glib/ObjectBase#reference(83f5f38750778ac8).(); |
| 179 | return gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(); |
| 180 | } |
| 181 | |
| 182 | Taskcxx . . $ Gst/Task#::Taskcxx . . $ Gst/Task#Task(237165b4a42a691a).(const Glibcxx . . $ Glib/::ConstructParamscxx . . $ Glib/ConstructParams#& construct_params) |
| 183 | : |
| 184 | Objectcxx . . $ Gst/Object#(construct_params) |
| 185 | { |
| 186 | |
| 187 | } |
| 188 | |
| 189 | Taskcxx . . $ Gst/Task#::Taskcxx . . $ Gst/Task#Task(80b42c2d0befce8f).(GstTaskcxx . . $ GstTask#* castitem) |
| 190 | : |
| 191 | Objectcxx . . $ Gst/Object#((GstObjectcxx . . $ GstObject#*)(castitem)) |
| 192 | {} |
| 193 | |
| 194 | |
| 195 | Taskcxx . . $ Gst/Task#::Taskcxx . . $ Gst/Task#Task(77eb1f2f4eaf6c8).(Taskcxx . . $ Gst/Task#&& src) noexcept |
| 196 | : Objectcxx . . $ Gst/Object#(stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(src)) |
| 197 | {} |
| 198 | |
| 199 | Taskcxx . . $ Gst/Task#& Taskcxx . . $ Gst/Task#::operatorcxx . . $ Gst/Task#`operator=`(90578c75e7dae747).=(Taskcxx . . $ Gst/Task#&& src) noexcept |
| 200 | { |
| 201 | Objectcxx . . $ Gst/Object#::operator=(stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(src)); |
| 202 | return *this; |
| 203 | } |
| 204 | |
| 205 | |
| 206 | Taskcxx . . $ Gst/Task#::~cxx . . $ Gst/Task#`~Task`(ced63f7c635d850d).Taskcxx . . $ Gst/Task#() noexcept |
| 207 | {} |
| 208 | |
| 209 | |
| 210 | Taskcxx . . $ Gst/Task#::CppClassTypecxx . . $ Gst/Task#CppClassType# Taskcxx . . $ Gst/Task#::task_class_cxx . . $ Gst/Task#task_class_.; // initialize static member |
| 211 | |
| 212 | GType Taskcxx . . $ Gst/Task#::get_typecxx . . $ Gst/Task#get_type(f708dce9a8856c70).() |
| 213 | { |
| 214 | return task_class_cxx . . $ Gst/Task#task_class_..initcxx . . $ Gst/Task_Class#init(bf348c0cd369184d).().get_typecxx . . $ Glib/Class#get_type(fe4d2d262d4164a8).(); |
| 215 | } |
| 216 | |
| 217 | |
| 218 | GType Taskcxx . . $ Gst/Task#::get_base_typecxx . . $ Gst/Task#get_base_type(f708dce9a8856c70).() |
| 219 | { |
| 220 | return gst_task_get_type(); |
| 221 | } |
| 222 | |
| 223 | |
| 224 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Taskcxx . . $ Gst/Task#> Taskcxx . . $ Gst/Task#::createcxx . . $ Gst/Task#create(acdb4a9d4875e6a5).(const SlotTaskcxx . . $ Gst/Task#SlotTask#& task_slot) |
| 225 | { |
| 226 | return Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Taskcxx . . $ Gst/Task#>( new Taskcxx . . $ Gst/Task#(task_slot) ); |
| 227 | } |
| 228 | |
| 229 | void Taskcxx . . $ Gst/Task#::set_lockcxx . . $ Gst/Task#set_lock(ff994652e8ed49be).(Glibcxx . . $ Glib/::Threadscxx . . $ Glib/Threads/::RecMutexcxx . . $ Glib/Threads/RecMutex#& mutex) |
| 230 | { |
| 231 | gst_task_set_lock(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(), mutex.gobjcxx . . $ Glib/Threads/RecMutex#gobj(e434434d57a9a79b).()); |
| 232 | } |
| 233 | |
| 234 | void Taskcxx . . $ Gst/Task#::set_poolcxx . . $ Gst/Task#set_pool(5957d2ab017b193).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::TaskPoolcxx . . $ Gst/TaskPool#>& pool) |
| 235 | { |
| 236 | gst_task_set_pool(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(), Glibcxx . . $ Glib/::unwrapcxx . . $ Glib/unwrap(d8611424b789c87e).(pool)); |
| 237 | } |
| 238 | |
| 239 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::TaskPoolcxx . . $ Gst/TaskPool#> Taskcxx . . $ Gst/Task#::get_poolcxx . . $ Gst/Task#get_pool(b9c7358c4d373e33).() |
| 240 | { |
| 241 | return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(6d0e21b0c22bfa6f).(gst_task_get_pool(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).())); |
| 242 | } |
| 243 | |
| 244 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<const Gstcxx . . $ Gst/::TaskPoolcxx . . $ Gst/TaskPool#> Taskcxx . . $ Gst/Task#::get_poolcxx . . $ Gst/Task#get_pool(1fe8c3fc67650964).() const |
| 245 | { |
| 246 | return Glibcxx . . $ Glib/RefPtr#RefPtr(9e4c744904342adc).::wrapcxx . . $ Glib/wrap(6d0e21b0c22bfa6f).(gst_task_get_pool(const_cast<GstTaskcxx . . $ GstTask#*>(gobjcxx . . $ Gst/Task#gobj(22f45279cc7526a8).()))); |
| 247 | } |
| 248 | |
| 249 | TaskStatecxx . . $ Gst/TaskState# Taskcxx . . $ Gst/Task#::get_statecxx . . $ Gst/Task#get_state(a96bf2ee13f05779).() const |
| 250 | { |
| 251 | return ((TaskStatecxx . . $ Gst/TaskState#)(gst_task_get_state(const_cast<GstTaskcxx . . $ GstTask#*>(gobjcxx . . $ Gst/Task#gobj(22f45279cc7526a8).())))); |
| 252 | } |
| 253 | |
| 254 | void Taskcxx . . $ Gst/Task#::set_statecxx . . $ Gst/Task#set_state(483126772e570f97).(Gstcxx . . $ Gst/::TaskStatecxx . . $ Gst/TaskState# state) |
| 255 | { |
| 256 | gst_task_set_state(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).(), ((GstTaskState)(state))); |
| 257 | } |
| 258 | |
| 259 | bool Taskcxx . . $ Gst/Task#::pausecxx . . $ Gst/Task#pause(c9857a73d68e59ba).() |
| 260 | { |
| 261 | return gst_task_pause(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()); |
| 262 | } |
| 263 | |
| 264 | bool Taskcxx . . $ Gst/Task#::startcxx . . $ Gst/Task#start(c9857a73d68e59ba).() |
| 265 | { |
| 266 | return gst_task_start(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()); |
| 267 | } |
| 268 | |
| 269 | bool Taskcxx . . $ Gst/Task#::stopcxx . . $ Gst/Task#stop(c9857a73d68e59ba).() |
| 270 | { |
| 271 | return gst_task_stop(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()); |
| 272 | } |
| 273 | |
| 274 | bool Taskcxx . . $ Gst/Task#::joincxx . . $ Gst/Task#join(c9857a73d68e59ba).() |
| 275 | { |
| 276 | return gst_task_join(gobjcxx . . $ Gst/Task#gobj(69decbbe1cbfff1).()); |
| 277 | } |
| 278 | |
| 279 | void Taskcxx . . $ Gst/Task#::cleanup_allcxx . . $ Gst/Task#cleanup_all(49f6e7a06ebc5aa8).() |
| 280 | { |
| 281 | gst_task_cleanup_all(); |
| 282 | } |
| 283 | |
| 284 | |
| 285 | } // namespace Gst |
| 286 | |
| 287 |