| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/event.h> |
| 7 | #include <gstreamermm/private/event_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/message.h> |
| 31 | #include <gstreamermm/structure.h> |
| 32 | #include <gstreamermm/taglist.h> |
| 33 | #include <gstreamermm/buffer.h> |
| 34 | #include <gstreamermm/toc.h> |
| 35 | |
| 36 | #include <iostream> |
| 37 | |
| 38 | namespace Gst |
| 39 | { |
| 40 | |
| 41 | namespace Enums |
| 42 | { |
| 43 | |
| 44 | Glib::ustring get_name(EventType t) |
| 45 | { |
| 46 | return gst_event_type_get_name(GstEventType(t)); |
| 47 | } |
| 48 | |
| 49 | Glib::QueryQuark get_quark(EventType t) |
| 50 | { |
| 51 | return Glib::QueryQuark(gst_event_type_to_quark(GstEventType(t))); |
| 52 | } |
| 53 | |
| 54 | EventTypeFlags get_flags(EventType t) |
| 55 | { |
| 56 | return static_cast<EventTypeFlags>(gst_event_type_get_flags(static_cast<GstEventType>(t))); |
| 57 | } |
| 58 | |
| 59 | } //namespace Enums |
| 60 | |
| 61 | Glib::RefPtr<Gst::Event> Event::create_writable() |
| 62 | { |
| 63 | return Glib::RefPtr<Event>::cast_static(MiniObject::create_writable()); |
| 64 | } |
| 65 | |
| 66 | bool Event::is_downstream() const |
| 67 | { |
| 68 | return GST_EVENT_IS_DOWNSTREAM(gobj()); |
| 69 | } |
| 70 | |
| 71 | bool Event::is_upstream() const |
| 72 | { |
| 73 | return GST_EVENT_IS_UPSTREAM(gobj()); |
| 74 | } |
| 75 | |
| 76 | bool Event::is_serialized() const |
| 77 | { |
| 78 | return GST_EVENT_IS_SERIALIZED(gobj()); |
| 79 | } |
| 80 | |
| 81 | bool EventFlushStop::parse_reset_time() const |
| 82 | { |
| 83 | gboolean reset_time; |
| 84 | gst_event_parse_flush_stop(const_cast<GstEvent*>(gobj()), &reset_time); |
| 85 | return reset_time; |
| 86 | } |
| 87 | |
| 88 | Gst::TagList EventTag::parse_tag_list() const |
| 89 | { |
| 90 | GstTagList* gst_taglist = gst_tag_list_new_empty(); |
| 91 | gst_event_parse_tag(const_cast<GstEvent*>(gobj()), &gst_taglist); |
| 92 | return Gst::TagList(gst_taglist); |
| 93 | } |
| 94 | |
| 95 | void EventBufferSize::parse(Format& format, gint64& minsize, gint64& maxsize, |
| 96 | bool& async) const |
| 97 | { |
| 98 | gboolean gst_async = FALSE; |
| 99 | gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), |
| 100 | (GstFormat*)&format, &minsize, &maxsize, &gst_async); |
| 101 | async = gst_async; |
| 102 | } |
| 103 | |
| 104 | gint64 EventBufferSize::parse_min_size() const |
| 105 | { |
| 106 | gint64 gst_minsize = 0; |
| 107 | gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), 0, &gst_minsize, |
| 108 | nullptr, nullptr); |
| 109 | return gst_minsize; |
| 110 | } |
| 111 | |
| 112 | Gst::Format EventBufferSize::parse_format() const |
| 113 | { |
| 114 | GstFormat gst_format = GST_FORMAT_UNDEFINED; |
| 115 | gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), |
| 116 | reinterpret_cast<GstFormat*>(&gst_format), 0, 0, 0); |
| 117 | return static_cast<Gst::Format>(gst_format); |
| 118 | } |
| 119 | |
| 120 | gint64 EventBufferSize::parse_max_size() const |
| 121 | { |
| 122 | gint64 gst_maxsize = 0; |
| 123 | gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), 0, 0, |
| 124 | &gst_maxsize, 0); |
| 125 | return gst_maxsize; |
| 126 | } |
| 127 | |
| 128 | bool EventBufferSize::parse_async() const |
| 129 | { |
| 130 | gboolean gst_async = FALSE; |
| 131 | gst_event_parse_buffer_size(const_cast<GstEvent*>(gobj()), 0, 0, 0, &gst_async); |
| 132 | return gst_async; |
| 133 | } |
| 134 | |
| 135 | void EventQos::parse(Gst::QOSType& type, double& proportion, ClockTimeDiff& diff, |
| 136 | ClockTime& timestamp) const |
| 137 | { |
| 138 | gst_event_parse_qos(const_cast<GstEvent*>(gobj()), (GstQOSType*)&type, &proportion, &diff, |
| 139 | ×tamp); |
| 140 | } |
| 141 | |
| 142 | QOSType EventQos::parse_type() const |
| 143 | { |
| 144 | GstQOSType type; |
| 145 | gst_event_parse_qos(const_cast<GstEvent*>(gobj()), &type, nullptr, nullptr, nullptr); |
| 146 | return static_cast<Gst::QOSType>(type); |
| 147 | } |
| 148 | |
| 149 | double EventQos::parse_proportion() const |
| 150 | { |
| 151 | double gst_proportion = 0; |
| 152 | gst_event_parse_qos(const_cast<GstEvent*>(gobj()), nullptr, &gst_proportion, nullptr, nullptr); |
| 153 | return gst_proportion; |
| 154 | } |
| 155 | |
| 156 | Gst::ClockTimeDiff EventQos::parse_diff() const |
| 157 | { |
| 158 | GstClockTimeDiff gst_diff = 0; |
| 159 | gst_event_parse_qos(const_cast<GstEvent*>(gobj()), nullptr, nullptr, &gst_diff, nullptr); |
| 160 | return gst_diff; |
| 161 | } |
| 162 | |
| 163 | Gst::ClockTime EventQos::parse_timestamp() const |
| 164 | { |
| 165 | GstClockTime gst_timestamp = 0; |
| 166 | gst_event_parse_qos(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, &gst_timestamp); |
| 167 | return gst_timestamp; |
| 168 | } |
| 169 | |
| 170 | void EventSeek::parse(double& rate, Format& format, SeekFlags& flags, |
| 171 | SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop) const |
| 172 | { |
| 173 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), &rate, |
| 174 | (GstFormat*)&format, (GstSeekFlags*)&flags, (GstSeekType*)&start_type, |
| 175 | &start, (GstSeekType*)&stop_type, &stop); |
| 176 | } |
| 177 | |
| 178 | gint64 EventSeek::parse_start() const |
| 179 | { |
| 180 | gint64 gst_start = 0; |
| 181 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, nullptr, &gst_start, |
| 182 | nullptr, nullptr); |
| 183 | return gst_start; |
| 184 | } |
| 185 | |
| 186 | double EventSeek::parse_rate() const |
| 187 | { |
| 188 | double gst_rate = 0; |
| 189 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), &gst_rate, nullptr, nullptr, nullptr, nullptr, |
| 190 | nullptr, nullptr); |
| 191 | return gst_rate; |
| 192 | } |
| 193 | |
| 194 | Gst::Format EventSeek::parse_format() const |
| 195 | { |
| 196 | GstFormat gst_format = GST_FORMAT_UNDEFINED; |
| 197 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, &gst_format, nullptr, nullptr, nullptr, |
| 198 | nullptr, nullptr); |
| 199 | return static_cast<Gst::Format>(gst_format); |
| 200 | } |
| 201 | |
| 202 | Gst::SeekFlags EventSeek::parse_flags() const |
| 203 | { |
| 204 | GstSeekFlags gst_flags = GST_SEEK_FLAG_NONE; |
| 205 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, nullptr, &gst_flags, nullptr, nullptr, |
| 206 | nullptr, nullptr); |
| 207 | return static_cast<Gst::SeekFlags>(gst_flags); |
| 208 | } |
| 209 | |
| 210 | Gst::SeekType EventSeek::parse_start_type() const |
| 211 | { |
| 212 | GstSeekType gst_type = GST_SEEK_TYPE_NONE; |
| 213 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, &gst_type, nullptr, |
| 214 | nullptr, nullptr); |
| 215 | return static_cast<Gst::SeekType>(gst_type); |
| 216 | } |
| 217 | |
| 218 | Gst::SeekType EventSeek::parse_stop_type() const |
| 219 | { |
| 220 | GstSeekType gst_type = GST_SEEK_TYPE_NONE; |
| 221 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, nullptr, nullptr, &gst_type, |
| 222 | nullptr); |
| 223 | return static_cast<Gst::SeekType>(gst_type); |
| 224 | } |
| 225 | |
| 226 | gint64 EventSeek::parse_stop() const |
| 227 | { |
| 228 | gint64 gst_stop = 0; |
| 229 | gst_event_parse_seek(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, |
| 230 | &gst_stop); |
| 231 | return gst_stop; |
| 232 | } |
| 233 | |
| 234 | ClockTime EventLatency::parse_latency() const |
| 235 | { |
| 236 | GstClockTime gst_latency = 0; |
| 237 | gst_event_parse_latency(const_cast<GstEvent*>(gobj()), &gst_latency); |
| 238 | return gst_latency; |
| 239 | } |
| 240 | |
| 241 | void EventStep::parse(Gst::Format& format, guint64& amount, double& rate, |
| 242 | bool& flush, bool& intermediate) const |
| 243 | { |
| 244 | gboolean gst_flush = FALSE; |
| 245 | gboolean gst_intermediate = FALSE; |
| 246 | |
| 247 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), |
| 248 | reinterpret_cast<GstFormat*>(&format), &amount, &rate, &gst_flush, |
| 249 | &gst_intermediate); |
| 250 | |
| 251 | flush = gst_flush; |
| 252 | intermediate = gst_intermediate; |
| 253 | } |
| 254 | |
| 255 | guint64 EventStep::parse_amount() const |
| 256 | { |
| 257 | guint64 gst_amount = 0; |
| 258 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), nullptr, &gst_amount, nullptr, nullptr, nullptr); |
| 259 | return gst_amount; |
| 260 | } |
| 261 | |
| 262 | Gst::Format EventStep::parse_format() const |
| 263 | { |
| 264 | GstFormat gst_format = GST_FORMAT_UNDEFINED; |
| 265 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), &gst_format, nullptr, nullptr, nullptr, nullptr); |
| 266 | return static_cast<Gst::Format>(gst_format); |
| 267 | } |
| 268 | |
| 269 | double EventStep::parse_rate() const |
| 270 | { |
| 271 | double gst_rate = 0; |
| 272 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), nullptr, nullptr, &gst_rate, nullptr, nullptr); |
| 273 | return gst_rate; |
| 274 | } |
| 275 | |
| 276 | bool EventStep::parse_flush() const |
| 277 | { |
| 278 | gboolean gst_flush = FALSE; |
| 279 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, &gst_flush, nullptr); |
| 280 | return gst_flush; |
| 281 | } |
| 282 | |
| 283 | bool EventStep::parse_intermediate() const |
| 284 | { |
| 285 | gboolean gst_intermediate = FALSE; |
| 286 | gst_event_parse_step(const_cast<GstEvent*>(gobj()), nullptr, nullptr, nullptr, nullptr, |
| 287 | &gst_intermediate); |
| 288 | return gst_intermediate; |
| 289 | } |
| 290 | |
| 291 | Glib::RefPtr<Gst::Message> EventSinkMessage::parse_message() |
| 292 | { |
| 293 | GstMessage* gst_msg = nullptr; |
| 294 | gst_event_parse_sink_message(gobj(), &gst_msg); |
| 295 | return Glib::wrap(gst_msg); |
| 296 | } |
| 297 | |
| 298 | Glib::RefPtr<const Gst::Message> EventSinkMessage::parse_message() const |
| 299 | { |
| 300 | return const_cast<Gst::EventSinkMessage*>(this)->parse_message(); |
| 301 | } |
| 302 | |
| 303 | void EventToc::parse(Glib::RefPtr<Gst::Toc>& toc, bool& updated) |
| 304 | { |
| 305 | GstToc *gst_toc = nullptr; |
| 306 | gboolean gst_updated; |
| 307 | gst_event_parse_toc(gobj(), &gst_toc, &gst_updated); |
| 308 | updated = gst_updated; |
| 309 | toc = Glib::wrap(gst_toc); |
| 310 | } |
| 311 | |
| 312 | void EventToc::parse(Glib::RefPtr<const Gst::Toc>& toc, bool& updated) const |
| 313 | { |
| 314 | const_cast<EventToc*>(this)->parse(toc, updated); |
| 315 | } |
| 316 | |
| 317 | Glib::RefPtr<Gst::Toc> EventToc::parse_toc() |
| 318 | { |
| 319 | GstToc *gst_toc = nullptr; |
| 320 | gst_event_parse_toc(gobj(), &gst_toc, nullptr); |
| 321 | return Glib::wrap(gst_toc); |
| 322 | } |
| 323 | |
| 324 | Glib::RefPtr<const Gst::Toc> EventToc::parse_toc() const |
| 325 | { |
| 326 | return const_cast<EventToc*>(this)->parse_toc(); |
| 327 | } |
| 328 | |
| 329 | bool EventToc::parse_updated() const |
| 330 | { |
| 331 | gboolean gst_updated; |
| 332 | gst_event_parse_toc(const_cast<GstEvent*>(gobj()), nullptr, &gst_updated); |
| 333 | return gst_updated; |
| 334 | } |
| 335 | |
| 336 | void EventProtection::parse(Glib::ustring& system_id, Glib::RefPtr<Gst::Buffer>& data, Glib::ustring& origin) const |
| 337 | { |
| 338 | const gchar *gst_system_id = nullptr, *gst_origin = nullptr; |
| 339 | GstBuffer *gst_buffer; |
| 340 | gst_event_parse_protection(const_cast<GstEvent*>(gobj()), &gst_system_id, &gst_buffer, &gst_origin); |
| 341 | system_id = gst_system_id; |
| 342 | data = Glib::wrap(gst_buffer, true); |
| 343 | origin = gst_origin; |
| 344 | } |
| 345 | |
| 346 | Glib::ustring EventProtection::parse_system_id() const |
| 347 | { |
| 348 | const gchar *gst_system_id = nullptr; |
| 349 | gst_event_parse_protection(const_cast<GstEvent*>(gobj()), &gst_system_id, nullptr, nullptr); |
| 350 | return Glib::ustring(gst_system_id); |
| 351 | } |
| 352 | |
| 353 | Glib::RefPtr<Gst::Buffer> EventProtection::parse_data() |
| 354 | { |
| 355 | GstBuffer* gst_data = nullptr; |
| 356 | gst_event_parse_protection(const_cast<GstEvent*>(gobj()), nullptr, &gst_data, nullptr); |
| 357 | return Glib::wrap(gst_data, true); |
| 358 | } |
| 359 | |
| 360 | Glib::RefPtr<const Gst::Buffer> EventProtection::parse_data() const |
| 361 | { |
| 362 | return const_cast<EventProtection*>(this)->parse_data(); |
| 363 | } |
| 364 | |
| 365 | Glib::ustring EventProtection::parse_origin() const |
| 366 | { |
| 367 | const gchar *gst_origin = nullptr; |
| 368 | gst_event_parse_protection(const_cast<GstEvent*>(gobj()), nullptr, nullptr, &gst_origin); |
| 369 | return Glib::ustring(gst_origin); |
| 370 | } |
| 371 | |
| 372 | void EventSegmentDone::parse(Gst::Format& format, gint64& position) const |
| 373 | { |
| 374 | GstFormat gst_format; |
| 375 | gst_event_parse_segment_done(const_cast<GstEvent*>(gobj()), &gst_format, &position); |
| 376 | format = static_cast<Gst::Format>(gst_format); |
| 377 | } |
| 378 | |
| 379 | Gst::Format EventSegmentDone::parse_format() const |
| 380 | { |
| 381 | GstFormat format; |
| 382 | gst_event_parse_segment_done(const_cast<GstEvent*>(gobj()), &format, nullptr); |
| 383 | return static_cast<Gst::Format>(format); |
| 384 | } |
| 385 | |
| 386 | gint64 EventSegmentDone::parse_position() const |
| 387 | { |
| 388 | gint64 position; |
| 389 | gst_event_parse_segment_done(const_cast<GstEvent*>(gobj()), nullptr, &position); |
| 390 | return position; |
| 391 | } |
| 392 | |
| 393 | Gst::ClockTime EventGap::parse_timestamp() const |
| 394 | { |
| 395 | GstClockTime timestamp; |
| 396 | gst_event_parse_gap(const_cast<GstEvent*>(gobj()), ×tamp, nullptr); |
| 397 | return timestamp; |
| 398 | } |
| 399 | |
| 400 | Gst::ClockTime EventGap::parse_duration() const |
| 401 | { |
| 402 | GstClockTime duration; |
| 403 | gst_event_parse_gap(const_cast<GstEvent*>(gobj()), nullptr, &duration); |
| 404 | return duration; |
| 405 | } |
| 406 | |
| 407 | Glib::ustring EventStreamStart::parse_stream_id() const |
| 408 | { |
| 409 | const gchar* gst_stream_id = nullptr; |
| 410 | gst_event_parse_stream_start(const_cast<GstEvent*>(gobj()), &gst_stream_id); |
| 411 | return Glib::ustring(gst_stream_id); |
| 412 | } |
| 413 | |
| 414 | Gst::StreamFlags EventStreamStart::parse_stream_flags() const |
| 415 | { |
| 416 | GstStreamFlags flags; |
| 417 | gst_event_parse_stream_flags (const_cast<GstEvent*>(gobj()), &flags); |
| 418 | return static_cast<Gst::StreamFlags>(flags); |
| 419 | } |
| 420 | |
| 421 | Glib::RefPtr<Gst::Caps> EventCaps::parse_caps() |
| 422 | { |
| 423 | GstCaps* gst_caps = nullptr; |
| 424 | gst_event_parse_caps(gobj(), &gst_caps); |
| 425 | return Glib::wrap(gst_caps, true); |
| 426 | } |
| 427 | |
| 428 | Glib::RefPtr<const Gst::Caps> EventCaps::parse_caps() const |
| 429 | { |
| 430 | return const_cast<EventCaps*>(this)->parse_caps(); |
| 431 | } |
| 432 | |
| 433 | Gst::Segment EventSegment::copy_segment() const |
| 434 | { |
| 435 | const GstSegment *gst_segment; |
| 436 | gst_event_parse_segment(const_cast<GstEvent*>(gobj()), &gst_segment); |
| 437 | return Gst::Segment(const_cast<GstSegment*>(gst_segment), true); |
| 438 | |
| 439 | } |
| 440 | |
| 441 | Glib::ustring EventTocSelect::parse_uid() const |
| 442 | { |
| 443 | gchar *gst_uid; |
| 444 | gst_event_parse_toc_select(const_cast<GstEvent*>(gobj()), &gst_uid); |
| 445 | Glib::ustring uid = gst_uid; |
| 446 | g_free(gst_uid); |
| 447 | return uid; |
| 448 | } |
| 449 | |
| 450 | |
| 451 | } //namespace Gst |
| 452 | |
| 453 | namespace |
| 454 | { |
| 455 | } // anonymous namespace |
| 456 | |
| 457 | // static |
| 458 | GType Glib::Value<Gst::EventType>::value_type() |
| 459 | { |
| 460 | return gst_event_type_get_type(); |
| 461 | } |
| 462 | |
| 463 | // static |
| 464 | GType Glib::Value<Gst::EventTypeFlags>::value_type() |
| 465 | { |
| 466 | return gst_event_type_flags_get_type(); |
| 467 | } |
| 468 | |
| 469 | // static |
| 470 | GType Glib::Value<Gst::QOSType>::value_type() |
| 471 | { |
| 472 | return gst_qos_type_get_type(); |
| 473 | } |
| 474 | |
| 475 | // static |
| 476 | GType Glib::Value<Gst::StreamFlags>::value_type() |
| 477 | { |
| 478 | return gst_stream_flags_get_type(); |
| 479 | } |
| 480 | |
| 481 | |
| 482 | /* Why reinterpret_cast<Event*>(gobject) is needed: |
| 483 | * |
| 484 | * A Event instance is in fact always a GstEvent instance. |
| 485 | * Unfortunately, GstEvent cannot be a member of Event, |
| 486 | * because it is an opaque struct. Also, the C interface does not provide |
| 487 | * any hooks to install a destroy notification handler, thus we cannot |
| 488 | * wrap it dynamically either. |
| 489 | * |
| 490 | * The cast works because Event does not have any member data, and |
| 491 | * it is impossible to derive from it. This is ensured by using final on the |
| 492 | * class and by using = delete on the default constructor. |
| 493 | */ |
| 494 | |
| 495 | namespace Glib |
| 496 | { |
| 497 | |
| 498 | Glib::RefPtr<Gst::Event> wrap(GstEvent* object, bool take_copy) |
| 499 | { |
| 500 | if(take_copy && object) |
| 501 | gst_event_ref(object); |
| 502 | |
| 503 | // See the comment at the top of this file, if you want to know why the cast works. |
| 504 | return Glib::RefPtr<Gst::Event>(reinterpret_cast<Gst::Event*>(object)); |
| 505 | } |
| 506 | |
| 507 | } // namespace Glib |
| 508 | |
| 509 | |
| 510 | namespace Gst |
| 511 | { |
| 512 | |
| 513 | |
| 514 | void Event::reference() const |
| 515 | { |
| 516 | // See the comment at the top of this file, if you want to know why the cast works. |
| 517 | gst_event_ref(reinterpret_cast<GstEvent*>(const_cast<Event*>(this))); |
| 518 | } |
| 519 | |
| 520 | void Event::unreference() const |
| 521 | { |
| 522 | // See the comment at the top of this file, if you want to know why the cast works. |
| 523 | gst_event_unref(reinterpret_cast<GstEvent*>(const_cast<Event*>(this))); |
| 524 | } |
| 525 | |
| 526 | GstEvent* Event::gobj() |
| 527 | { |
| 528 | // See the comment at the top of this file, if you want to know why the cast works. |
| 529 | return reinterpret_cast<GstEvent*>(this); |
| 530 | } |
| 531 | |
| 532 | const GstEvent* Event::gobj() const |
| 533 | { |
| 534 | // See the comment at the top of this file, if you want to know why the cast works. |
| 535 | return reinterpret_cast<const GstEvent*>(this); |
| 536 | } |
| 537 | |
| 538 | GstEvent* Event::gobj_copy() const |
| 539 | { |
| 540 | // See the comment at the top of this file, if you want to know why the cast works. |
| 541 | const auto gobject = reinterpret_cast<GstEvent*>(const_cast<Event*>(this)); |
| 542 | gst_event_ref(gobject); |
| 543 | return gobject; |
| 544 | } |
| 545 | |
| 546 | |
| 547 | Gst::Structure Event::get_structure() const |
| 548 | { |
| 549 | return Glib::wrap(const_cast<GstStructure*>(gst_event_get_structure(const_cast<GstEvent*>(gobj()))), true); |
| 550 | } |
| 551 | |
| 552 | bool Event::has_name(const Glib::ustring& name) const |
| 553 | { |
| 554 | return gst_event_has_name(const_cast<GstEvent*>(gobj()), name.c_str()); |
| 555 | } |
| 556 | |
| 557 | guint32 Event::get_seqnum() const |
| 558 | { |
| 559 | return gst_event_get_seqnum(const_cast<GstEvent*>(gobj())); |
| 560 | } |
| 561 | |
| 562 | void Event::set_seqnum(guint32 seqnum) |
| 563 | { |
| 564 | gst_event_set_seqnum(gobj(), seqnum); |
| 565 | } |
| 566 | |
| 567 | gint64 Event::get_running_time_offset() const |
| 568 | { |
| 569 | return gst_event_get_running_time_offset(const_cast<GstEvent*>(gobj())); |
| 570 | } |
| 571 | |
| 572 | void Event::set_running_time_offset(gint64 offset) |
| 573 | { |
| 574 | gst_event_set_running_time_offset(gobj(), offset); |
| 575 | } |
| 576 | |
| 577 | Glib::RefPtr<Gst::Event> Event::copy() const |
| 578 | { |
| 579 | return Glib::wrap(gst_event_copy(const_cast<GstEvent*>(gobj()))); |
| 580 | } |
| 581 | |
| 582 | EventType Event::get_event_type() const |
| 583 | { |
| 584 | return ((EventType)(gobj()->type)); |
| 585 | } |
| 586 | |
| 587 | Gst::ClockTime Event::get_timestamp() const |
| 588 | { |
| 589 | return (Gst::ClockTime)(gobj()->timestamp); |
| 590 | } |
| 591 | |
| 592 | |
| 593 | } // namespace Gst |
| 594 | |
| 595 | |
| 596 | namespace Gst |
| 597 | { |
| 598 | |
| 599 | |
| 600 | Glib::RefPtr<Gst::EventFlushStart> EventFlushStart::create() |
| 601 | { |
| 602 | return Glib::wrap_event_derived<EventFlushStart>(gst_event_new_flush_start(), false); |
| 603 | } |
| 604 | |
| 605 | |
| 606 | } // namespace Gst |
| 607 | |
| 608 | |
| 609 | namespace Gst |
| 610 | { |
| 611 | |
| 612 | |
| 613 | Glib::RefPtr<Gst::EventFlushStop> EventFlushStop::create(bool reset_time) |
| 614 | { |
| 615 | return Glib::wrap_event_derived<EventFlushStop>(gst_event_new_flush_stop(static_cast<int>(reset_time)), false); |
| 616 | } |
| 617 | |
| 618 | |
| 619 | } // namespace Gst |
| 620 | |
| 621 | |
| 622 | namespace Gst |
| 623 | { |
| 624 | |
| 625 | |
| 626 | Glib::RefPtr<Gst::EventStreamStart> EventStreamStart::create(const Glib::ustring& stream_id) |
| 627 | { |
| 628 | return Glib::wrap_event_derived<EventStreamStart>(gst_event_new_stream_start(stream_id.c_str()), false); |
| 629 | } |
| 630 | |
| 631 | void EventStreamStart::set_stream_flags(Gst::StreamFlags flags) |
| 632 | { |
| 633 | gst_event_set_stream_flags(gobj(), ((GstStreamFlags)(flags))); |
| 634 | } |
| 635 | |
| 636 | bool EventStreamStart::parse_group_id(guint& group_id) const |
| 637 | { |
| 638 | return gst_event_parse_group_id(const_cast<GstEvent*>(gobj()), &(group_id)); |
| 639 | } |
| 640 | |
| 641 | void EventStreamStart::set_group_id(guint group_id) |
| 642 | { |
| 643 | gst_event_set_group_id(gobj(), group_id); |
| 644 | } |
| 645 | |
| 646 | |
| 647 | } // namespace Gst |
| 648 | |
| 649 | |
| 650 | namespace Gst |
| 651 | { |
| 652 | |
| 653 | |
| 654 | Glib::RefPtr<Gst::EventCaps> EventCaps::create(const Glib::RefPtr<Gst::Caps>& caps) |
| 655 | { |
| 656 | return Glib::wrap_event_derived<EventCaps>(gst_event_new_caps(Glib::unwrap(caps)), false); |
| 657 | } |
| 658 | |
| 659 | |
| 660 | } // namespace Gst |
| 661 | |
| 662 | |
| 663 | namespace Gst |
| 664 | { |
| 665 | |
| 666 | |
| 667 | Glib::RefPtr<Gst::EventSegment> EventSegment::create(const Gst::Segment& segment) |
| 668 | { |
| 669 | return Glib::wrap_event_derived<EventSegment>(gst_event_new_segment(segment.gobj()), false); |
| 670 | } |
| 671 | |
| 672 | |
| 673 | } // namespace Gst |
| 674 | |
| 675 | |
| 676 | namespace Gst |
| 677 | { |
| 678 | |
| 679 | |
| 680 | Glib::RefPtr<Gst::EventTag> EventTag::create(const Gst::TagList& taglist) |
| 681 | { |
| 682 | return Glib::wrap_event_derived<EventTag>(gst_event_new_tag(const_cast<GstTagList*>(taglist.gobj())), false); |
| 683 | } |
| 684 | |
| 685 | |
| 686 | } // namespace Gst |
| 687 | |
| 688 | |
| 689 | namespace Gst |
| 690 | { |
| 691 | |
| 692 | |
| 693 | Glib::RefPtr<Gst::EventBufferSize> EventBufferSize::create(Format format, gint64 minsize, gint64 maxsize, bool async) |
| 694 | { |
| 695 | return Glib::wrap_event_derived<EventBufferSize>(gst_event_new_buffer_size(((GstFormat)(format)), minsize, maxsize, static_cast<int>(async)), false); |
| 696 | } |
| 697 | |
| 698 | |
| 699 | } // namespace Gst |
| 700 | |
| 701 | |
| 702 | namespace Gst |
| 703 | { |
| 704 | |
| 705 | |
| 706 | Glib::RefPtr<Gst::EventSinkMessage> EventSinkMessage::create(const Glib::ustring& name, const Glib::RefPtr<Gst::Message>& message) |
| 707 | { |
| 708 | return Glib::wrap_event_derived<EventSinkMessage>(gst_event_new_sink_message(name.c_str(), Glib::unwrap(message)), false); |
| 709 | } |
| 710 | |
| 711 | |
| 712 | } // namespace Gst |
| 713 | |
| 714 | |
| 715 | namespace Gst |
| 716 | { |
| 717 | |
| 718 | |
| 719 | Glib::RefPtr<Gst::EventEos> EventEos::create() |
| 720 | { |
| 721 | return Glib::wrap_event_derived<EventEos>(gst_event_new_eos(), false); |
| 722 | } |
| 723 | |
| 724 | |
| 725 | } // namespace Gst |
| 726 | |
| 727 | |
| 728 | namespace Gst |
| 729 | { |
| 730 | |
| 731 | |
| 732 | Glib::RefPtr<Gst::EventToc> EventToc::create(const Glib::RefPtr<Gst::Toc>& toc, bool updated) |
| 733 | { |
| 734 | return Glib::wrap_event_derived<EventToc>(gst_event_new_toc(Glib::unwrap(toc), static_cast<int>(updated)), false); |
| 735 | } |
| 736 | |
| 737 | |
| 738 | } // namespace Gst |
| 739 | |
| 740 | |
| 741 | namespace Gst |
| 742 | { |
| 743 | |
| 744 | |
| 745 | Glib::RefPtr<Gst::EventProtection> EventProtection::create(const Glib::ustring& system_id, const Glib::RefPtr<Gst::Buffer>& data, const Glib::ustring& origin) |
| 746 | { |
| 747 | return Glib::wrap_event_derived<EventProtection>(gst_event_new_protection(system_id.c_str(), Glib::unwrap(data), origin.c_str()), false); |
| 748 | } |
| 749 | |
| 750 | |
| 751 | } // namespace Gst |
| 752 | |
| 753 | |
| 754 | namespace Gst |
| 755 | { |
| 756 | |
| 757 | |
| 758 | Glib::RefPtr<Gst::EventSegmentDone> EventSegmentDone::create(Gst::Format p1, gint64 position) |
| 759 | { |
| 760 | return Glib::wrap_event_derived<EventSegmentDone>(gst_event_new_segment_done(((GstFormat)(p1)), position), false); |
| 761 | } |
| 762 | |
| 763 | |
| 764 | } // namespace Gst |
| 765 | |
| 766 | |
| 767 | namespace Gst |
| 768 | { |
| 769 | |
| 770 | |
| 771 | Glib::RefPtr<Gst::EventGap> EventGap::create(Gst::ClockTime timestamp, Gst::ClockTime duration) |
| 772 | { |
| 773 | return Glib::wrap_event_derived<EventGap>(gst_event_new_gap(((GstClockTime)(timestamp)), ((GstClockTime)(duration))), false); |
| 774 | } |
| 775 | |
| 776 | |
| 777 | } // namespace Gst |
| 778 | |
| 779 | |
| 780 | namespace Gst |
| 781 | { |
| 782 | |
| 783 | |
| 784 | Glib::RefPtr<Gst::EventQos> EventQos::create(QOSType type, double proportion, Gst::ClockTimeDiff diff, Gst::ClockTime timestamp) |
| 785 | { |
| 786 | return Glib::wrap_event_derived<EventQos>(gst_event_new_qos(((GstQOSType)(type)), proportion, GstClockTimeDiff(diff), ((GstClockTime)(timestamp))), false); |
| 787 | } |
| 788 | |
| 789 | |
| 790 | } // namespace Gst |
| 791 | |
| 792 | |
| 793 | namespace Gst |
| 794 | { |
| 795 | |
| 796 | |
| 797 | Glib::RefPtr<Gst::EventSeek> EventSeek::create(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop) |
| 798 | { |
| 799 | return Glib::wrap_event_derived<EventSeek>(gst_event_new_seek(rate, ((GstFormat)(format)), ((GstSeekFlags)(flags)), ((GstSeekType)(start_type)), start, ((GstSeekType)(stop_type)), stop), false); |
| 800 | } |
| 801 | |
| 802 | |
| 803 | } // namespace Gst |
| 804 | |
| 805 | |
| 806 | namespace Gst |
| 807 | { |
| 808 | |
| 809 | |
| 810 | Glib::RefPtr<Gst::EventLatency> EventLatency::create(Gst::ClockTime latency) |
| 811 | { |
| 812 | return Glib::wrap_event_derived<EventLatency>(gst_event_new_latency(((GstClockTime)(latency))), false); |
| 813 | } |
| 814 | |
| 815 | |
| 816 | } // namespace Gst |
| 817 | |
| 818 | |
| 819 | namespace Gst |
| 820 | { |
| 821 | |
| 822 | |
| 823 | Glib::RefPtr<Gst::EventStep> EventStep::create(Gst::Format format, guint64 amount, double rate, bool flush, bool intermediate) |
| 824 | { |
| 825 | return Glib::wrap_event_derived<EventStep>(gst_event_new_step(((GstFormat)(format)), amount, rate, static_cast<int>(flush), static_cast<int>(intermediate)), false); |
| 826 | } |
| 827 | |
| 828 | |
| 829 | } // namespace Gst |
| 830 | |
| 831 | |
| 832 | namespace Gst |
| 833 | { |
| 834 | |
| 835 | |
| 836 | Glib::RefPtr<Gst::EventReconfigure> EventReconfigure::create() |
| 837 | { |
| 838 | return Glib::wrap_event_derived<EventReconfigure>(gst_event_new_reconfigure(), false); |
| 839 | } |
| 840 | |
| 841 | |
| 842 | } // namespace Gst |
| 843 | |
| 844 | |
| 845 | namespace Gst |
| 846 | { |
| 847 | |
| 848 | |
| 849 | Glib::RefPtr<Gst::EventTocSelect> EventTocSelect::create(const Glib::ustring& uid) |
| 850 | { |
| 851 | return Glib::wrap_event_derived<EventTocSelect>(gst_event_new_toc_select(uid.c_str()), false); |
| 852 | } |
| 853 | |
| 854 | |
| 855 | } // namespace Gst |
| 856 | |
| 857 |