| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_PAD_H |
| 3 | #define _GSTREAMERMM_PAD_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2008-2016 The gstreamermm Development Team |
| 12 | * |
| 13 | * This library is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU Lesser General Public |
| 15 | * License as published by the Free Software Foundation; either |
| 16 | * version 2.1 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This library is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | * Lesser General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU Lesser General Public |
| 24 | * License along with this library; if not, write to the Free |
| 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | */ |
| 27 | |
| 28 | #include <gst/gst.h> |
| 29 | #include <gstreamermm/object.h> |
| 30 | #include <gstreamermm/miniobject.h> |
| 31 | #include <gstreamermm/format.h> |
| 32 | #include <gstreamermm/event.h> |
| 33 | #include <gstreamermm/bufferlist.h> |
| 34 | #include <glibmm/arrayhandle.h> |
| 35 | |
| 36 | |
| 37 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 38 | using GstPad = struct _GstPad; |
| 39 | using GstPadClass = struct _GstPadClass; |
| 40 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 41 | |
| 42 | |
| 43 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 44 | namespace Gst |
| 45 | { class Pad_Class; } // namespace Gst |
| 46 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 47 | |
| 48 | namespace Gst |
| 49 | { |
| 50 | |
| 51 | class Buffer; |
| 52 | class Caps; |
| 53 | class Element; |
| 54 | class Event; |
| 55 | class PadTemplate; |
| 56 | class Query; |
| 57 | class PadProbeInfo; |
| 58 | |
| 59 | //Gst::Iterator<> forward declaration. |
| 60 | template <class CppType> |
| 61 | class Iterator; |
| 62 | |
| 63 | /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */ |
| 64 | |
| 65 | /** |
| 66 | * @var PadMode PAD_MODE_NONE |
| 67 | * Pad will not handle dataflow. |
| 68 | * |
| 69 | * @var PadMode PAD_MODE_PUSH |
| 70 | * Pad handles dataflow in downstream push mode. |
| 71 | * |
| 72 | * @var PadMode PAD_MODE_PULL |
| 73 | * Pad handles dataflow in upstream pull mode. |
| 74 | * |
| 75 | * @enum PadMode |
| 76 | * |
| 77 | * The status of a GstPad. After activating a pad, which usually happens when the |
| 78 | * parent element goes from READY to PAUSED, the GstPadMode defines if the |
| 79 | * pad operates in push or pull mode. |
| 80 | * |
| 81 | * @ingroup gstreamermmEnums |
| 82 | */ |
| 83 | enum PadMode |
| 84 | { |
| 85 | PAD_MODE_NONE, |
| 86 | PAD_MODE_PUSH, |
| 87 | PAD_MODE_PULL |
| 88 | }; |
| 89 | |
| 90 | } // namespace Gst |
| 91 | |
| 92 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 93 | namespace Glib |
| 94 | { |
| 95 | |
| 96 | template <> |
| 97 | class Value<Gst::PadMode> : public Glib::Value_Enum<Gst::PadMode> |
| 98 | { |
| 99 | public: |
| 100 | static GType value_type() G_GNUC_CONST; |
| 101 | }; |
| 102 | |
| 103 | } // namespace Glib |
| 104 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 105 | |
| 106 | namespace Gst |
| 107 | { |
| 108 | |
| 109 | /** |
| 110 | * @var FlowReturn FLOW_OK |
| 111 | * Data passing was ok. |
| 112 | * |
| 113 | * @var FlowReturn FLOW_NOT_LINKED |
| 114 | * Pad is not linked. |
| 115 | * |
| 116 | * @var FlowReturn FLOW_FLUSHING |
| 117 | * Pad is flushing. |
| 118 | * |
| 119 | * @var FlowReturn FLOW_EOS |
| 120 | * Pad is EOS. |
| 121 | * |
| 122 | * @var FlowReturn FLOW_NOT_NEGOTIATED |
| 123 | * Pad is not negotiated. |
| 124 | * |
| 125 | * @var FlowReturn FLOW_ERROR |
| 126 | * Some (fatal) error occurred. Element generating |
| 127 | * this error should post an error message with more |
| 128 | * details. |
| 129 | * |
| 130 | * @var FlowReturn FLOW_NOT_SUPPORTED |
| 131 | * This operation is not supported. |
| 132 | * |
| 133 | * @var FlowReturn FLOW_CUSTOM_SUCCESS |
| 134 | * Elements can use values starting from |
| 135 | * this (and higher) to define custom success |
| 136 | * codes. |
| 137 | * |
| 138 | * @var FlowReturn FLOW_CUSTOM_SUCCESS_1 |
| 139 | * Pre-defined custom success code (define your |
| 140 | * custom success code to this to avoid compiler |
| 141 | * warnings). |
| 142 | * |
| 143 | * @var FlowReturn FLOW_CUSTOM_SUCCESS_2 |
| 144 | * Pre-defined custom success code. |
| 145 | * |
| 146 | * @var FlowReturn FLOW_CUSTOM_ERROR |
| 147 | * Elements can use values starting from |
| 148 | * this (and lower) to define custom error codes. |
| 149 | * |
| 150 | * @var FlowReturn FLOW_CUSTOM_ERROR_1 |
| 151 | * Pre-defined custom error code (define your |
| 152 | * custom error code to this to avoid compiler |
| 153 | * warnings). |
| 154 | * |
| 155 | * @var FlowReturn FLOW_CUSTOM_ERROR_2 |
| 156 | * Pre-defined custom error code. |
| 157 | * |
| 158 | * @enum FlowReturn |
| 159 | * |
| 160 | * The result of passing data to a pad. |
| 161 | * |
| 162 | * Note that the custom return values should not be exposed outside of the |
| 163 | * element scope. |
| 164 | * |
| 165 | * @ingroup gstreamermmEnums |
| 166 | */ |
| 167 | enum FlowReturn |
| 168 | { |
| 169 | FLOW_CUSTOM_SUCCESS_2 = 102, |
| 170 | FLOW_CUSTOM_SUCCESS_1 = 101, |
| 171 | FLOW_CUSTOM_SUCCESS = 100, |
| 172 | FLOW_OK = 0, |
| 173 | FLOW_NOT_LINKED = -1, |
| 174 | FLOW_FLUSHING = -2, |
| 175 | FLOW_EOS = -3, |
| 176 | FLOW_NOT_NEGOTIATED = -4, |
| 177 | FLOW_ERROR = -5, |
| 178 | FLOW_NOT_SUPPORTED = -6, |
| 179 | FLOW_CUSTOM_ERROR = -100, |
| 180 | FLOW_CUSTOM_ERROR_1 = -101, |
| 181 | FLOW_CUSTOM_ERROR_2 = -102 |
| 182 | }; |
| 183 | |
| 184 | } // namespace Gst |
| 185 | |
| 186 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 187 | namespace Glib |
| 188 | { |
| 189 | |
| 190 | template <> |
| 191 | class Value<Gst::FlowReturn> : public Glib::Value_Enum<Gst::FlowReturn> |
| 192 | { |
| 193 | public: |
| 194 | static GType value_type() G_GNUC_CONST; |
| 195 | }; |
| 196 | |
| 197 | } // namespace Glib |
| 198 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 199 | |
| 200 | namespace Gst |
| 201 | { |
| 202 | |
| 203 | /** |
| 204 | * @var PadDirection PAD_UNKNOWN |
| 205 | * Direction is unknown. |
| 206 | * |
| 207 | * @var PadDirection PAD_SRC |
| 208 | * The pad is a source pad. |
| 209 | * |
| 210 | * @var PadDirection PAD_SINK |
| 211 | * The pad is a sink pad. |
| 212 | * |
| 213 | * @enum PadDirection |
| 214 | * |
| 215 | * The direction of a pad. |
| 216 | * |
| 217 | * @ingroup gstreamermmEnums |
| 218 | */ |
| 219 | enum PadDirection |
| 220 | { |
| 221 | PAD_UNKNOWN, |
| 222 | PAD_SRC, |
| 223 | PAD_SINK |
| 224 | }; |
| 225 | |
| 226 | } // namespace Gst |
| 227 | |
| 228 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 229 | namespace Glib |
| 230 | { |
| 231 | |
| 232 | template <> |
| 233 | class Value<Gst::PadDirection> : public Glib::Value_Enum<Gst::PadDirection> |
| 234 | { |
| 235 | public: |
| 236 | static GType value_type() G_GNUC_CONST; |
| 237 | }; |
| 238 | |
| 239 | } // namespace Glib |
| 240 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 241 | |
| 242 | namespace Gst |
| 243 | { |
| 244 | |
| 245 | /** |
| 246 | * @var PadFlags PAD_FLAG_BLOCKED |
| 247 | * Is dataflow on a pad blocked. |
| 248 | * |
| 249 | * @var PadFlags PAD_FLAG_FLUSHING |
| 250 | * Is pad flushing. |
| 251 | * |
| 252 | * @var PadFlags PAD_FLAG_EOS |
| 253 | * Is pad in EOS state. |
| 254 | * |
| 255 | * @var PadFlags PAD_FLAG_BLOCKING |
| 256 | * Is pad currently blocking on a buffer or event. |
| 257 | * |
| 258 | * @var PadFlags PAD_FLAG_NEED_PARENT |
| 259 | * Ensure that there is a parent object before calling |
| 260 | * into the pad callbacks. |
| 261 | * |
| 262 | * @var PadFlags PAD_FLAG_NEED_RECONFIGURE |
| 263 | * The pad should be reconfigured/renegotiated. |
| 264 | * The flag has to be unset manually after |
| 265 | * reconfiguration happened. |
| 266 | * |
| 267 | * @var PadFlags PAD_FLAG_PENDING_EVENTS |
| 268 | * The pad has pending events. |
| 269 | * |
| 270 | * @var PadFlags PAD_FLAG_FIXED_CAPS |
| 271 | * The pad is using fixed caps. This means that |
| 272 | * once the caps are set on the pad, the default caps query function |
| 273 | * will only return those caps. |
| 274 | * |
| 275 | * @var PadFlags PAD_FLAG_PROXY_CAPS |
| 276 | * The default event and query handler will forward |
| 277 | * all events and queries to the internally linked pads |
| 278 | * instead of discarding them. |
| 279 | * |
| 280 | * @var PadFlags PAD_FLAG_PROXY_ALLOCATION |
| 281 | * The default query handler will forward |
| 282 | * allocation queries to the internally linked pads |
| 283 | * instead of discarding them. |
| 284 | * |
| 285 | * @var PadFlags PAD_FLAG_PROXY_SCHEDULING |
| 286 | * The default query handler will forward |
| 287 | * scheduling queries to the internally linked pads |
| 288 | * instead of discarding them. |
| 289 | * |
| 290 | * @var PadFlags PAD_FLAG_ACCEPT_INTERSECT |
| 291 | * The default accept-caps handler will check |
| 292 | * it the caps intersect the query-caps result instead |
| 293 | * of checking for a subset. This is interesting for |
| 294 | * parsers that can accept incompletely specified caps. |
| 295 | * |
| 296 | * @var PadFlags PAD_FLAG_ACCEPT_TEMPLATE |
| 297 | * The default accept-caps handler will use |
| 298 | * the template pad caps instead of query caps to |
| 299 | * compare with the accept caps. Use this in combination |
| 300 | * with Gst::PAD_FLAG_ACCEPT_INTERSECT. (Since 1.6). |
| 301 | * |
| 302 | * @var PadFlags PAD_FLAG_LAST |
| 303 | * Offset to define more flags. |
| 304 | * |
| 305 | * @enum PadFlags |
| 306 | * |
| 307 | * Pad state flags |
| 308 | * |
| 309 | * @ingroup gstreamermmEnums |
| 310 | * @par Bitwise operators: |
| 311 | * <tt>%PadFlags operator|(PadFlags, PadFlags)</tt><br> |
| 312 | * <tt>%PadFlags operator&(PadFlags, PadFlags)</tt><br> |
| 313 | * <tt>%PadFlags operator^(PadFlags, PadFlags)</tt><br> |
| 314 | * <tt>%PadFlags operator~(PadFlags)</tt><br> |
| 315 | * <tt>%PadFlags& operator|=(PadFlags&, PadFlags)</tt><br> |
| 316 | * <tt>%PadFlags& operator&=(PadFlags&, PadFlags)</tt><br> |
| 317 | * <tt>%PadFlags& operator^=(PadFlags&, PadFlags)</tt><br> |
| 318 | */ |
| 319 | enum PadFlags |
| 320 | { |
| 321 | PAD_FLAG_BLOCKED = 0x10, |
| 322 | PAD_FLAG_FLUSHING = 0x20, |
| 323 | PAD_FLAG_EOS = 0x40, |
| 324 | PAD_FLAG_BLOCKING = 0x80, |
| 325 | PAD_FLAG_NEED_PARENT = 0x100, |
| 326 | PAD_FLAG_NEED_RECONFIGURE = 0x200, |
| 327 | PAD_FLAG_PENDING_EVENTS = 0x400, |
| 328 | PAD_FLAG_FIXED_CAPS = 0x800, |
| 329 | PAD_FLAG_PROXY_CAPS = 0x1000, |
| 330 | PAD_FLAG_PROXY_ALLOCATION = 0x2000, |
| 331 | PAD_FLAG_PROXY_SCHEDULING = 0x4000, |
| 332 | PAD_FLAG_ACCEPT_INTERSECT = 0x8000, |
| 333 | PAD_FLAG_ACCEPT_TEMPLATE = 0x10000, |
| 334 | PAD_FLAG_LAST = 0x100000 |
| 335 | }; |
| 336 | |
| 337 | /** @ingroup gstreamermmEnums */ |
| 338 | inline PadFlags operator|(PadFlags lhs, PadFlags rhs) |
| 339 | { return static_cast<PadFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); } |
| 340 | |
| 341 | /** @ingroup gstreamermmEnums */ |
| 342 | inline PadFlags operator&(PadFlags lhs, PadFlags rhs) |
| 343 | { return static_cast<PadFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); } |
| 344 | |
| 345 | /** @ingroup gstreamermmEnums */ |
| 346 | inline PadFlags operator^(PadFlags lhs, PadFlags rhs) |
| 347 | { return static_cast<PadFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); } |
| 348 | |
| 349 | /** @ingroup gstreamermmEnums */ |
| 350 | inline PadFlags operator~(PadFlags flags) |
| 351 | { return static_cast<PadFlags>(~static_cast<unsigned>(flags)); } |
| 352 | |
| 353 | /** @ingroup gstreamermmEnums */ |
| 354 | inline PadFlags& operator|=(PadFlags& lhs, PadFlags rhs) |
| 355 | { return (lhs = static_cast<PadFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); } |
| 356 | |
| 357 | /** @ingroup gstreamermmEnums */ |
| 358 | inline PadFlags& operator&=(PadFlags& lhs, PadFlags rhs) |
| 359 | { return (lhs = static_cast<PadFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); } |
| 360 | |
| 361 | /** @ingroup gstreamermmEnums */ |
| 362 | inline PadFlags& operator^=(PadFlags& lhs, PadFlags rhs) |
| 363 | { return (lhs = static_cast<PadFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); } |
| 364 | |
| 365 | } // namespace Gst |
| 366 | |
| 367 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 368 | namespace Glib |
| 369 | { |
| 370 | |
| 371 | template <> |
| 372 | class Value<Gst::PadFlags> : public Glib::Value_Flags<Gst::PadFlags> |
| 373 | { |
| 374 | public: |
| 375 | static GType value_type() G_GNUC_CONST; |
| 376 | }; |
| 377 | |
| 378 | } // namespace Glib |
| 379 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 380 | |
| 381 | namespace Gst |
| 382 | { |
| 383 | |
| 384 | /** |
| 385 | * @var PadLinkReturn PAD_LINK_OK |
| 386 | * Link succeeded. |
| 387 | * |
| 388 | * @var PadLinkReturn PAD_LINK_WRONG_HIERARCHY |
| 389 | * Pads have no common grandparent. |
| 390 | * |
| 391 | * @var PadLinkReturn PAD_LINK_WAS_LINKED |
| 392 | * Pad was already linked. |
| 393 | * |
| 394 | * @var PadLinkReturn PAD_LINK_WRONG_DIRECTION |
| 395 | * Pads have wrong direction. |
| 396 | * |
| 397 | * @var PadLinkReturn PAD_LINK_NOFORMAT |
| 398 | * Pads do not have common format. |
| 399 | * |
| 400 | * @var PadLinkReturn PAD_LINK_NOSCHED |
| 401 | * Pads cannot cooperate in scheduling. |
| 402 | * |
| 403 | * @var PadLinkReturn PAD_LINK_REFUSED |
| 404 | * Refused for some reason. |
| 405 | * |
| 406 | * @enum PadLinkReturn |
| 407 | * |
| 408 | * Result values from gst_pad_link and friends. |
| 409 | * |
| 410 | * @ingroup gstreamermmEnums |
| 411 | */ |
| 412 | enum PadLinkReturn |
| 413 | { |
| 414 | PAD_LINK_OK = 0, |
| 415 | PAD_LINK_WRONG_HIERARCHY = -1, |
| 416 | PAD_LINK_WAS_LINKED = -2, |
| 417 | PAD_LINK_WRONG_DIRECTION = -3, |
| 418 | PAD_LINK_NOFORMAT = -4, |
| 419 | PAD_LINK_NOSCHED = -5, |
| 420 | PAD_LINK_REFUSED = -6 |
| 421 | }; |
| 422 | |
| 423 | } // namespace Gst |
| 424 | |
| 425 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 426 | namespace Glib |
| 427 | { |
| 428 | |
| 429 | template <> |
| 430 | class Value<Gst::PadLinkReturn> : public Glib::Value_Enum<Gst::PadLinkReturn> |
| 431 | { |
| 432 | public: |
| 433 | static GType value_type() G_GNUC_CONST; |
| 434 | }; |
| 435 | |
| 436 | } // namespace Glib |
| 437 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 438 | |
| 439 | namespace Gst |
| 440 | { |
| 441 | |
| 442 | /** |
| 443 | * @var PadLinkCheck PAD_LINK_CHECK_NOTHING |
| 444 | * Don't check hierarchy or caps compatibility. |
| 445 | * |
| 446 | * @var PadLinkCheck PAD_LINK_CHECK_HIERARCHY |
| 447 | * Check the pads have same parents/grandparents. |
| 448 | * Could be omitted if it is already known that the two elements that own the |
| 449 | * pads are in the same bin. |
| 450 | * |
| 451 | * @var PadLinkCheck PAD_LINK_CHECK_TEMPLATE_CAPS |
| 452 | * Check if the pads are compatible by using |
| 453 | * their template caps. This is much faster than @a GST_PAD_LINK_CHECK_CAPS, but |
| 454 | * would be unsafe e.g. if one pad has Gst::CAPS_ANY. |
| 455 | * |
| 456 | * @var PadLinkCheck PAD_LINK_CHECK_CAPS |
| 457 | * Check if the pads are compatible by comparing the |
| 458 | * caps returned by Gst::Pad::query_caps(). |
| 459 | * |
| 460 | * @var PadLinkCheck PAD_LINK_CHECK_DEFAULT |
| 461 | * The default checks done when linking |
| 462 | * pads (i.e. the ones used by Gst::Pad::link()). |
| 463 | * |
| 464 | * @enum PadLinkCheck |
| 465 | * |
| 466 | * The amount of checking to be done when linking pads. @a GST_PAD_LINK_CHECK_CAPS |
| 467 | * and @a GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are |
| 468 | * specified, expensive but safe @a GST_PAD_LINK_CHECK_CAPS are performed. |
| 469 | * |
| 470 | * <warning> |
| 471 | * Only disable some of the checks if you are 100% certain you know the link |
| 472 | * will not fail because of hierarchy/caps compatibility failures. If uncertain, |
| 473 | * use the default checks (Gst::PAD_LINK_CHECK_DEFAULT) or the regular methods |
| 474 | * for linking the pads. |
| 475 | * </warning> |
| 476 | * |
| 477 | * @ingroup gstreamermmEnums |
| 478 | * @par Bitwise operators: |
| 479 | * <tt>%PadLinkCheck operator|(PadLinkCheck, PadLinkCheck)</tt><br> |
| 480 | * <tt>%PadLinkCheck operator&(PadLinkCheck, PadLinkCheck)</tt><br> |
| 481 | * <tt>%PadLinkCheck operator^(PadLinkCheck, PadLinkCheck)</tt><br> |
| 482 | * <tt>%PadLinkCheck operator~(PadLinkCheck)</tt><br> |
| 483 | * <tt>%PadLinkCheck& operator|=(PadLinkCheck&, PadLinkCheck)</tt><br> |
| 484 | * <tt>%PadLinkCheck& operator&=(PadLinkCheck&, PadLinkCheck)</tt><br> |
| 485 | * <tt>%PadLinkCheck& operator^=(PadLinkCheck&, PadLinkCheck)</tt><br> |
| 486 | */ |
| 487 | enum PadLinkCheck |
| 488 | { |
| 489 | PAD_LINK_CHECK_NOTHING = 0x0, |
| 490 | PAD_LINK_CHECK_HIERARCHY = 1 << 0, |
| 491 | PAD_LINK_CHECK_TEMPLATE_CAPS = 1 << 1, |
| 492 | PAD_LINK_CHECK_CAPS = 1 << 2, |
| 493 | PAD_LINK_CHECK_DEFAULT = 0x5 |
| 494 | }; |
| 495 | |
| 496 | /** @ingroup gstreamermmEnums */ |
| 497 | inline PadLinkCheck operator|(PadLinkCheck lhs, PadLinkCheck rhs) |
| 498 | { return static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); } |
| 499 | |
| 500 | /** @ingroup gstreamermmEnums */ |
| 501 | inline PadLinkCheck operator&(PadLinkCheck lhs, PadLinkCheck rhs) |
| 502 | { return static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); } |
| 503 | |
| 504 | /** @ingroup gstreamermmEnums */ |
| 505 | inline PadLinkCheck operator^(PadLinkCheck lhs, PadLinkCheck rhs) |
| 506 | { return static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); } |
| 507 | |
| 508 | /** @ingroup gstreamermmEnums */ |
| 509 | inline PadLinkCheck operator~(PadLinkCheck flags) |
| 510 | { return static_cast<PadLinkCheck>(~static_cast<unsigned>(flags)); } |
| 511 | |
| 512 | /** @ingroup gstreamermmEnums */ |
| 513 | inline PadLinkCheck& operator|=(PadLinkCheck& lhs, PadLinkCheck rhs) |
| 514 | { return (lhs = static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); } |
| 515 | |
| 516 | /** @ingroup gstreamermmEnums */ |
| 517 | inline PadLinkCheck& operator&=(PadLinkCheck& lhs, PadLinkCheck rhs) |
| 518 | { return (lhs = static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); } |
| 519 | |
| 520 | /** @ingroup gstreamermmEnums */ |
| 521 | inline PadLinkCheck& operator^=(PadLinkCheck& lhs, PadLinkCheck rhs) |
| 522 | { return (lhs = static_cast<PadLinkCheck>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); } |
| 523 | |
| 524 | } // namespace Gst |
| 525 | |
| 526 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 527 | namespace Glib |
| 528 | { |
| 529 | |
| 530 | template <> |
| 531 | class Value<Gst::PadLinkCheck> : public Glib::Value_Flags<Gst::PadLinkCheck> |
| 532 | { |
| 533 | public: |
| 534 | static GType value_type() G_GNUC_CONST; |
| 535 | }; |
| 536 | |
| 537 | } // namespace Glib |
| 538 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 539 | |
| 540 | namespace Gst |
| 541 | { |
| 542 | |
| 543 | /** |
| 544 | * @var PadProbeType PAD_PROBE_TYPE_INVALID |
| 545 | * Invalid probe type. |
| 546 | * |
| 547 | * @var PadProbeType PAD_PROBE_TYPE_IDLE |
| 548 | * Probe idle pads and block. |
| 549 | * |
| 550 | * @var PadProbeType PAD_PROBE_TYPE_BLOCK |
| 551 | * Probe and block pads. |
| 552 | * |
| 553 | * @var PadProbeType PAD_PROBE_TYPE_BUFFER |
| 554 | * Probe buffers. |
| 555 | * |
| 556 | * @var PadProbeType PAD_PROBE_TYPE_BUFFER_LIST |
| 557 | * Probe buffer lists. |
| 558 | * |
| 559 | * @var PadProbeType PAD_PROBE_TYPE_EVENT_DOWNSTREAM |
| 560 | * Probe downstream events. |
| 561 | * |
| 562 | * @var PadProbeType PAD_PROBE_TYPE_EVENT_UPSTREAM |
| 563 | * Probe upstream events. |
| 564 | * |
| 565 | * @var PadProbeType PAD_PROBE_TYPE_EVENT_FLUSH |
| 566 | * Probe flush events. This probe has to be |
| 567 | * explicitly enabled and is not included in the |
| 568 | * @ @a GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or |
| 569 | * @ @a GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. |
| 570 | * |
| 571 | * @var PadProbeType PAD_PROBE_TYPE_QUERY_DOWNSTREAM |
| 572 | * Probe downstream queries. |
| 573 | * |
| 574 | * @var PadProbeType PAD_PROBE_TYPE_QUERY_UPSTREAM |
| 575 | * Probe upstream queries. |
| 576 | * |
| 577 | * @var PadProbeType PAD_PROBE_TYPE_PUSH |
| 578 | * Probe push. |
| 579 | * |
| 580 | * @var PadProbeType PAD_PROBE_TYPE_PULL |
| 581 | * Probe pull. |
| 582 | * |
| 583 | * @var PadProbeType PAD_PROBE_TYPE_BLOCKING |
| 584 | * Probe and block at the next opportunity, at data flow or when idle. |
| 585 | * |
| 586 | * @var PadProbeType PAD_PROBE_TYPE_DATA_DOWNSTREAM |
| 587 | * Probe downstream data (buffers, buffer lists, and events). |
| 588 | * |
| 589 | * @var PadProbeType PAD_PROBE_TYPE_DATA_UPSTREAM |
| 590 | * Probe upstream data (events). |
| 591 | * |
| 592 | * @var PadProbeType PAD_PROBE_TYPE_DATA_BOTH |
| 593 | * Probe upstream and downstream data (buffers, buffer lists, and events). |
| 594 | * |
| 595 | * @var PadProbeType PAD_PROBE_TYPE_BLOCK_DOWNSTREAM |
| 596 | * Probe and block downstream data (buffers, buffer lists, and events). |
| 597 | * |
| 598 | * @var PadProbeType PAD_PROBE_TYPE_BLOCK_UPSTREAM |
| 599 | * Probe and block upstream data (events). |
| 600 | * |
| 601 | * @var PadProbeType PAD_PROBE_TYPE_EVENT_BOTH |
| 602 | * Probe upstream and downstream events. |
| 603 | * |
| 604 | * @var PadProbeType PAD_PROBE_TYPE_QUERY_BOTH |
| 605 | * Probe upstream and downstream queries. |
| 606 | * |
| 607 | * @var PadProbeType PAD_PROBE_TYPE_ALL_BOTH |
| 608 | * Probe upstream events and queries and downstream buffers, buffer lists, events and queries. |
| 609 | * |
| 610 | * @var PadProbeType PAD_PROBE_TYPE_SCHEDULING |
| 611 | * Probe push and pull. |
| 612 | * |
| 613 | * @enum PadProbeType |
| 614 | * |
| 615 | * The different probing types that can occur. When either one of |
| 616 | * @a GST_PAD_PROBE_TYPE_IDLE or @a GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a |
| 617 | * blocking probe. |
| 618 | * |
| 619 | * @ingroup gstreamermmEnums |
| 620 | * @par Bitwise operators: |
| 621 | * <tt>%PadProbeType operator|(PadProbeType, PadProbeType)</tt><br> |
| 622 | * <tt>%PadProbeType operator&(PadProbeType, PadProbeType)</tt><br> |
| 623 | * <tt>%PadProbeType operator^(PadProbeType, PadProbeType)</tt><br> |
| 624 | * <tt>%PadProbeType operator~(PadProbeType)</tt><br> |
| 625 | * <tt>%PadProbeType& operator|=(PadProbeType&, PadProbeType)</tt><br> |
| 626 | * <tt>%PadProbeType& operator&=(PadProbeType&, PadProbeType)</tt><br> |
| 627 | * <tt>%PadProbeType& operator^=(PadProbeType&, PadProbeType)</tt><br> |
| 628 | */ |
| 629 | enum PadProbeType |
| 630 | { |
| 631 | PAD_PROBE_TYPE_INVALID = 0x0, |
| 632 | PAD_PROBE_TYPE_IDLE = (1 << 0), |
| 633 | PAD_PROBE_TYPE_BLOCK = (1 << 1), |
| 634 | PAD_PROBE_TYPE_BUFFER = (1 << 4), |
| 635 | PAD_PROBE_TYPE_BUFFER_LIST = (1 << 5), |
| 636 | PAD_PROBE_TYPE_EVENT_DOWNSTREAM = (1 << 6), |
| 637 | PAD_PROBE_TYPE_EVENT_UPSTREAM = (1 << 7), |
| 638 | PAD_PROBE_TYPE_EVENT_FLUSH = (1 << 8), |
| 639 | PAD_PROBE_TYPE_QUERY_DOWNSTREAM = (1 << 9), |
| 640 | PAD_PROBE_TYPE_QUERY_UPSTREAM = (1 << 10), |
| 641 | PAD_PROBE_TYPE_PUSH = (1 << 12), |
| 642 | PAD_PROBE_TYPE_PULL = (1 << 13), |
| 643 | PAD_PROBE_TYPE_BLOCKING = 0x3, |
| 644 | PAD_PROBE_TYPE_DATA_DOWNSTREAM = 0x70, |
| 645 | PAD_PROBE_TYPE_DATA_UPSTREAM = 0x80, |
| 646 | PAD_PROBE_TYPE_DATA_BOTH = 0xF0, |
| 647 | PAD_PROBE_TYPE_BLOCK_DOWNSTREAM = 0x72, |
| 648 | PAD_PROBE_TYPE_BLOCK_UPSTREAM = 0x82, |
| 649 | PAD_PROBE_TYPE_EVENT_BOTH = 0xC0, |
| 650 | PAD_PROBE_TYPE_QUERY_BOTH = 0x600, |
| 651 | PAD_PROBE_TYPE_ALL_BOTH = 0x6F0, |
| 652 | PAD_PROBE_TYPE_SCHEDULING = 0x3000 |
| 653 | }; |
| 654 | |
| 655 | /** @ingroup gstreamermmEnums */ |
| 656 | inline PadProbeType operator|(PadProbeType lhs, PadProbeType rhs) |
| 657 | { return static_cast<PadProbeType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); } |
| 658 | |
| 659 | /** @ingroup gstreamermmEnums */ |
| 660 | inline PadProbeType operator&(PadProbeType lhs, PadProbeType rhs) |
| 661 | { return static_cast<PadProbeType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); } |
| 662 | |
| 663 | /** @ingroup gstreamermmEnums */ |
| 664 | inline PadProbeType operator^(PadProbeType lhs, PadProbeType rhs) |
| 665 | { return static_cast<PadProbeType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); } |
| 666 | |
| 667 | /** @ingroup gstreamermmEnums */ |
| 668 | inline PadProbeType operator~(PadProbeType flags) |
| 669 | { return static_cast<PadProbeType>(~static_cast<unsigned>(flags)); } |
| 670 | |
| 671 | /** @ingroup gstreamermmEnums */ |
| 672 | inline PadProbeType& operator|=(PadProbeType& lhs, PadProbeType rhs) |
| 673 | { return (lhs = static_cast<PadProbeType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); } |
| 674 | |
| 675 | /** @ingroup gstreamermmEnums */ |
| 676 | inline PadProbeType& operator&=(PadProbeType& lhs, PadProbeType rhs) |
| 677 | { return (lhs = static_cast<PadProbeType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); } |
| 678 | |
| 679 | /** @ingroup gstreamermmEnums */ |
| 680 | inline PadProbeType& operator^=(PadProbeType& lhs, PadProbeType rhs) |
| 681 | { return (lhs = static_cast<PadProbeType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); } |
| 682 | |
| 683 | } // namespace Gst |
| 684 | |
| 685 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 686 | namespace Glib |
| 687 | { |
| 688 | |
| 689 | template <> |
| 690 | class Value<Gst::PadProbeType> : public Glib::Value_Flags<Gst::PadProbeType> |
| 691 | { |
| 692 | public: |
| 693 | static GType value_type() G_GNUC_CONST; |
| 694 | }; |
| 695 | |
| 696 | } // namespace Glib |
| 697 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 698 | |
| 699 | namespace Gst |
| 700 | { |
| 701 | |
| 702 | /** |
| 703 | * @var PadProbeReturn PAD_PROBE_OK |
| 704 | * Normal probe return value. This leaves the probe in |
| 705 | * place, and defers decisions about dropping or passing data to other |
| 706 | * probes, if any. If there are no other probes, the default behaviour |
| 707 | * for the probe type applies (block for blocking probes, and pass for |
| 708 | * non-blocking probes). |
| 709 | * |
| 710 | * @var PadProbeReturn PAD_PROBE_DROP |
| 711 | * Drop data in data probes. For push mode this means that |
| 712 | * the data item is not sent downstream. For pull mode, it means that |
| 713 | * the data item is not passed upstream. In both cases, no more probes |
| 714 | * are called and Gst::FLOW_OK or <tt>true</tt> is returned to the caller. |
| 715 | * |
| 716 | * @var PadProbeReturn PAD_PROBE_REMOVE |
| 717 | * Remove this probe. |
| 718 | * |
| 719 | * @var PadProbeReturn PAD_PROBE_PASS |
| 720 | * Pass the data item in the block probe and block on the |
| 721 | * next item. |
| 722 | * |
| 723 | * @var PadProbeReturn PAD_PROBE_HANDLED |
| 724 | * Data has been handled in the probe and will not be |
| 725 | * forwarded further. For events and buffers this is the same behaviour as |
| 726 | * @a GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer |
| 727 | * or event yourself). For queries it will also return <tt>true</tt> to the caller. |
| 728 | * The probe can also modify the Gst::FlowReturn value by using the |
| 729 | * Gst::PAD_PROBE_INFO_FLOW_RETURN() accessor. |
| 730 | * Note that the resulting query must contain valid entries. |
| 731 | * @newin{1,6} |
| 732 | * |
| 733 | * @enum PadProbeReturn |
| 734 | * |
| 735 | * Different return values for the Gst::SlotPadProbe. |
| 736 | * |
| 737 | * @ingroup gstreamermmEnums |
| 738 | */ |
| 739 | enum PadProbeReturn |
| 740 | { |
| 741 | PAD_PROBE_DROP, |
| 742 | PAD_PROBE_OK, |
| 743 | PAD_PROBE_REMOVE, |
| 744 | PAD_PROBE_PASS, |
| 745 | PAD_PROBE_HANDLED |
| 746 | }; |
| 747 | |
| 748 | } // namespace Gst |
| 749 | |
| 750 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 751 | namespace Glib |
| 752 | { |
| 753 | |
| 754 | template <> |
| 755 | class Value<Gst::PadProbeReturn> : public Glib::Value_Enum<Gst::PadProbeReturn> |
| 756 | { |
| 757 | public: |
| 758 | static GType value_type() G_GNUC_CONST; |
| 759 | }; |
| 760 | |
| 761 | } // namespace Glib |
| 762 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 763 | |
| 764 | namespace Gst |
| 765 | { |
| 766 | |
| 767 | |
| 768 | /** A class that represents objects contained by elements that allows links to |
| 769 | * other elements. |
| 770 | * A Gst::Element is linked to other elements via "pads", which are extremely |
| 771 | * light-weight generic link points. After two pads are retrieved from an |
| 772 | * element with Element::get_pad(), the pads can be link with link(). (For |
| 773 | * quick links, you can also use Element::link(), which will make the obvious |
| 774 | * link for you if it's straightforward.) |
| 775 | * |
| 776 | * Pads are typically created from a Gst::PadTemplate with the create() method |
| 777 | * that takes a Gst::PadTemplate. |
| 778 | * |
| 779 | * Pads without pad templates can be created with create(), which takes a |
| 780 | * direction and a name as an argument. |
| 781 | * |
| 782 | * get_parent_element() will retrieve the Gst::Element that owns the pad. |
| 783 | * |
| 784 | * A Gst::Element creating a pad will typically use the underlying C API to |
| 785 | * register callbacks for various events on the pads. |
| 786 | * |
| 787 | * Elements will use push() and pull_range() to push out or pull in a buffer. |
| 788 | * |
| 789 | * To send a Gst::Event on a pad, use send_event() and push_event(). |
| 790 | * |
| 791 | * Last reviewed on 2016-06-06 (1.8.0) |
| 792 | */ |
| 793 | |
| 794 | class Pad : public Object |
| 795 | { |
| 796 | |
| 797 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 798 | |
| 799 | public: |
| 800 | using CppObjectType = Pad; |
| 801 | using CppClassType = Pad_Class; |
| 802 | using BaseObjectType = GstPad; |
| 803 | using BaseClassType = GstPadClass; |
| 804 | |
| 805 | // noncopyable |
| 806 | Pad(const Pad&) = delete; |
| 807 | Pad& operator=(const Pad&) = delete; |
| 808 | |
| 809 | private: friend class Pad_Class; |
| 810 | static CppClassType pad_class_; |
| 811 | |
| 812 | protected: |
| 813 | explicit Pad(const Glib::ConstructParams& construct_params); |
| 814 | explicit Pad(GstPad* castitem); |
| 815 | |
| 816 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 817 | |
| 818 | public: |
| 819 | |
| 820 | Pad(Pad&& src) noexcept; |
| 821 | Pad& operator=(Pad&& src) noexcept; |
| 822 | |
| 823 | ~Pad() noexcept override; |
| 824 | |
| 825 | /** Get the GType for this class, for use with the underlying GObject type system. |
| 826 | */ |
| 827 | static GType get_type() G_GNUC_CONST; |
| 828 | |
| 829 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 830 | |
| 831 | |
| 832 | static GType get_base_type() G_GNUC_CONST; |
| 833 | #endif |
| 834 | |
| 835 | ///Provides access to the underlying C GObject. |
| 836 | GstPad* gobj() { return reinterpret_cast<GstPad*>(gobject_); } |
| 837 | |
| 838 | ///Provides access to the underlying C GObject. |
| 839 | const GstPad* gobj() const { return reinterpret_cast<GstPad*>(gobject_); } |
| 840 | |
| 841 | ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. |
| 842 | GstPad* gobj_copy(); |
| 843 | |
| 844 | private: |
| 845 | |
| 846 | |
| 847 | protected: |
| 848 | /** Constructs a Pad given a name and a direction. |
| 849 | * @param name The desired name of the pad. |
| 850 | * @param direction The desired direction of the pad. |
| 851 | */ |
| 852 | explicit Pad(const Glib::ustring& name, PadDirection direction); |
| 853 | |
| 854 | |
| 855 | /** Constructs a Pad given a direction without specifying a name. A unique |
| 856 | * name will be assigned to the pad. |
| 857 | * @param direction the direction of the pad. |
| 858 | */ |
| 859 | explicit Pad(PadDirection direction); |
| 860 | |
| 861 | /** Constructs a Pad from a PadTemplate with the specified name. |
| 862 | * @param templ The PadTemplate. |
| 863 | * @param name The desired name of the pad. |
| 864 | * @throw std::runtime_error if construction fails. |
| 865 | */ |
| 866 | Pad(const Glib::RefPtr<const Gst::PadTemplate>& templ, |
| 867 | const Glib::ustring& name); |
| 868 | |
| 869 | /** Constructs a Pad from a PadTemplate without specifying a name. A unique |
| 870 | * name will ge assigned to the pad. |
| 871 | * @param templ The PadTemplate. |
| 872 | * @throw std::runtime_error if construction fails. |
| 873 | */ |
| 874 | explicit Pad(const Glib::RefPtr<const Gst::PadTemplate>& templ); |
| 875 | |
| 876 | public: |
| 877 | /** For example, |
| 878 | * bool on_have_data(const Glib::RefPtr<Gst::Pad>& pad, const |
| 879 | * Glib::RefPtr<Gst::MiniObjec>& data);. |
| 880 | */ |
| 881 | typedef sigc::slot< PadProbeReturn, const Glib::RefPtr<Gst::Pad>&, const Gst::PadProbeInfo& > SlotProbe; |
| 882 | |
| 883 | typedef sigc::slot< Gst::FlowReturn, const Glib::RefPtr<Gst::Pad>&, /*transfer full*/ Glib::RefPtr<Gst::Buffer>& > SlotChain; |
| 884 | |
| 885 | typedef sigc::slot< gboolean, const Glib::RefPtr<Gst::Pad>&, /*transfer full*/Glib::RefPtr<Gst::Event>& > SlotEvent; |
| 886 | |
| 887 | typedef sigc::slot< gboolean, const Glib::RefPtr<Gst::Pad>&, /*transfer none*/ Glib::RefPtr<Gst::Query>& > SlotQuery; |
| 888 | |
| 889 | typedef sigc::slot< bool, const Glib::RefPtr<Gst::Pad>& > SlotActivate; |
| 890 | |
| 891 | typedef sigc::slot< bool, const Glib::RefPtr<Gst::Pad>&, Gst::PadMode, bool > SlotActivatemode; |
| 892 | |
| 893 | typedef sigc::slot< Gst::FlowReturn, const Glib::RefPtr<Gst::Pad>&, guint64, guint, Glib::RefPtr<Gst::Buffer>& > SlotGetrange; |
| 894 | |
| 895 | /** Creates a new pad with the given name in the given direction. |
| 896 | * |
| 897 | * @param name The name of the new pad. |
| 898 | * @param dir The PadDirection of the pad. |
| 899 | * @return A new Gst::Pad, or a null RefPtr<> in case of an error. MT safe. |
| 900 | */ |
| 901 | |
| 902 | static Glib::RefPtr<Pad> create(const Glib::ustring& name, PadDirection dir); |
| 903 | |
| 904 | |
| 905 | /** Creates a new pad with a guaranteed unique name (across all pads) in the |
| 906 | * given direction. |
| 907 | * |
| 908 | * @param dir The PadDirection of the pad. |
| 909 | * @return A new Gst::Pad, or a null RefPtr<> in case of an error. MT safe. |
| 910 | */ |
| 911 | |
| 912 | static Glib::RefPtr<Pad> create(PadDirection dir); |
| 913 | |
| 914 | |
| 915 | /** Creates a new pad with the given name from the given template. |
| 916 | * |
| 917 | * @param pad_template The pad template to use. |
| 918 | * |
| 919 | * @return A new Gst::Pad, or a null RefPtr<> in case of an error. |
| 920 | * @throw std::runtime_error if construction fails. |
| 921 | */ |
| 922 | |
| 923 | static Glib::RefPtr<Pad> create(const Glib::RefPtr<const Gst::PadTemplate>& pad_template); |
| 924 | |
| 925 | |
| 926 | /** Creates a new pad with a guaranteed unique name (across all pads) from |
| 927 | * the given template. |
| 928 | * |
| 929 | * @param pad_template The pad template to use. |
| 930 | * @param name The name of the pad. |
| 931 | * |
| 932 | * @return A new Gst::Pad, or a null RefPtr<> in case of an error. |
| 933 | * @throw std::runtime_error if construction fails. |
| 934 | */ |
| 935 | |
| 936 | static Glib::RefPtr<Pad> create(const Glib::RefPtr<const Gst::PadTemplate>& pad_template, const Glib::ustring& name); |
| 937 | |
| 938 | |
| 939 | Gst::PadMode get_mode() const; |
| 940 | |
| 941 | |
| 942 | /** Gets the capabilities this pad can produce or consume. |
| 943 | * Note that this method doesn't necessarily return the caps set by sending a |
| 944 | * Gst::Event::new_caps() - use get_current_caps() for that instead. |
| 945 | * gst_pad_query_caps returns all possible caps a pad can operate with, using |
| 946 | * the pad's CAPS query function, If the query fails, this function will return |
| 947 | * @a caps, if not <tt>nullptr</tt>, otherwise ANY. |
| 948 | * |
| 949 | * When called on sinkpads @a caps contains the caps that |
| 950 | * upstream could produce in the order preferred by upstream. When |
| 951 | * called on srcpads @a caps contains the caps accepted by |
| 952 | * downstream in the preferred order. @a caps might be <tt>nullptr</tt> but |
| 953 | * if it is not <tt>nullptr</tt> the returned caps will be a subset of @a caps. |
| 954 | * |
| 955 | * Note that this function does not return writable Gst::Caps, use |
| 956 | * gst_caps_make_writable() before modifying the caps. |
| 957 | * |
| 958 | * @param caps Suggested Gst::Caps, or <tt>nullptr</tt>. |
| 959 | * @return The caps of the pad with incremented ref-count. |
| 960 | */ |
| 961 | Glib::RefPtr<Gst::Caps> query_caps(Glib::RefPtr<Gst::Caps> caps); |
| 962 | |
| 963 | /** Gets the capabilities this pad can produce or consume. |
| 964 | * Note that this method doesn't necessarily return the caps set by sending a |
| 965 | * Gst::Event::new_caps() - use get_current_caps() for that instead. |
| 966 | * gst_pad_query_caps returns all possible caps a pad can operate with, using |
| 967 | * the pad's CAPS query function, If the query fails, this function will return |
| 968 | * @a caps, if not <tt>nullptr</tt>, otherwise ANY. |
| 969 | * |
| 970 | * When called on sinkpads @a caps contains the caps that |
| 971 | * upstream could produce in the order preferred by upstream. When |
| 972 | * called on srcpads @a caps contains the caps accepted by |
| 973 | * downstream in the preferred order. @a caps might be <tt>nullptr</tt> but |
| 974 | * if it is not <tt>nullptr</tt> the returned caps will be a subset of @a caps. |
| 975 | * |
| 976 | * Note that this function does not return writable Gst::Caps, use |
| 977 | * gst_caps_make_writable() before modifying the caps. |
| 978 | * |
| 979 | * @param caps Suggested Gst::Caps, or <tt>nullptr</tt>. |
| 980 | * @return The caps of the pad with incremented ref-count. |
| 981 | */ |
| 982 | Glib::RefPtr<const Gst::Caps> query_caps(Glib::RefPtr<Gst::Caps> caps) const; |
| 983 | |
| 984 | |
| 985 | /** Gets the direction of the pad. The direction of the pad is |
| 986 | * decided at construction time so this function does not take |
| 987 | * the LOCK. |
| 988 | * |
| 989 | * @return The Gst::PadDirection of the pad. |
| 990 | * |
| 991 | * MT safe. |
| 992 | */ |
| 993 | PadDirection get_direction() const; |
| 994 | |
| 995 | /** Gets the parent of @a pad, cast to a Gst::Element. If a @a pad has no parent or |
| 996 | * its parent is not an element, return <tt>nullptr</tt>. |
| 997 | * |
| 998 | * @return The parent of the pad. The |
| 999 | * caller has a reference on the parent, so unref when you're finished |
| 1000 | * with it. |
| 1001 | * |
| 1002 | * MT safe. |
| 1003 | */ |
| 1004 | Glib::RefPtr<Gst::Element> get_parent_element(); |
| 1005 | |
| 1006 | /** Gets the parent of @a pad, cast to a Gst::Element. If a @a pad has no parent or |
| 1007 | * its parent is not an element, return <tt>nullptr</tt>. |
| 1008 | * |
| 1009 | * @return The parent of the pad. The |
| 1010 | * caller has a reference on the parent, so unref when you're finished |
| 1011 | * with it. |
| 1012 | * |
| 1013 | * MT safe. |
| 1014 | */ |
| 1015 | Glib::RefPtr<const Gst::Element> get_parent_element() const; |
| 1016 | |
| 1017 | /** Gets the template for @a pad. |
| 1018 | * |
| 1019 | * @return The Gst::PadTemplate from which |
| 1020 | * this pad was instantiated, or <tt>nullptr</tt> if this pad has no |
| 1021 | * template. Unref after usage. |
| 1022 | */ |
| 1023 | Glib::RefPtr<Gst::PadTemplate> get_pad_template(); |
| 1024 | |
| 1025 | /** Gets the template for @a pad. |
| 1026 | * |
| 1027 | * @return The Gst::PadTemplate from which |
| 1028 | * this pad was instantiated, or <tt>nullptr</tt> if this pad has no |
| 1029 | * template. Unref after usage. |
| 1030 | */ |
| 1031 | Glib::RefPtr<const Gst::PadTemplate> get_pad_template() const; |
| 1032 | |
| 1033 | /** Links the source pad and the sink pad. |
| 1034 | * |
| 1035 | * @param sink_pad The sink Gst::Pad to link. |
| 1036 | * @return A result code indicating if the connection worked or |
| 1037 | * what went wrong. |
| 1038 | * |
| 1039 | * MT Safe. |
| 1040 | */ |
| 1041 | PadLinkReturn link(const Glib::RefPtr<Gst::Pad>& sink_pad); |
| 1042 | |
| 1043 | /** Unlinks the source pad from the sink pad. Will emit the Gst::Pad::signal_unlinked() |
| 1044 | * signal on both pads. |
| 1045 | * |
| 1046 | * @param sink_pad The sink Gst::Pad to unlink. |
| 1047 | * @return <tt>true</tt> if the pads were unlinked. This function returns <tt>false</tt> if |
| 1048 | * the pads were not linked together. |
| 1049 | * |
| 1050 | * MT safe. |
| 1051 | */ |
| 1052 | bool unlink(const Glib::RefPtr<Gst::Pad>& sink_pad); |
| 1053 | |
| 1054 | /** Checks if a @a pad is linked to another pad or not. |
| 1055 | * |
| 1056 | * @return <tt>true</tt> if the pad is linked, <tt>false</tt> otherwise. |
| 1057 | * |
| 1058 | * MT safe. |
| 1059 | */ |
| 1060 | bool is_linked() const; |
| 1061 | |
| 1062 | /** Checks if the source pad and the sink pad are compatible so they can be |
| 1063 | * linked. |
| 1064 | * |
| 1065 | * @param other_pad The sink Gst::Pad. |
| 1066 | * @return <tt>true</tt> if the pads can be linked. |
| 1067 | */ |
| 1068 | bool can_link(const Glib::RefPtr<const Gst::Pad>& other_pad) const; |
| 1069 | |
| 1070 | |
| 1071 | /** Gets the capabilities of the allowed media types that can flow through |
| 1072 | * @a pad and its peer. |
| 1073 | * |
| 1074 | * The allowed capabilities is calculated as the intersection of the results of |
| 1075 | * calling query_caps() on @a pad and its peer. The caller owns a reference |
| 1076 | * on the resulting caps. |
| 1077 | * |
| 1078 | * @return The allowed Gst::Caps of the |
| 1079 | * pad link. Unref the caps when you no longer need it. This |
| 1080 | * function returns <tt>nullptr</tt> when @a pad has no peer. |
| 1081 | * |
| 1082 | * MT safe. |
| 1083 | */ |
| 1084 | Glib::RefPtr<Gst::Caps> get_allowed_caps(); |
| 1085 | |
| 1086 | /** Gets the capabilities of the allowed media types that can flow through |
| 1087 | * @a pad and its peer. |
| 1088 | * |
| 1089 | * The allowed capabilities is calculated as the intersection of the results of |
| 1090 | * calling query_caps() on @a pad and its peer. The caller owns a reference |
| 1091 | * on the resulting caps. |
| 1092 | * |
| 1093 | * @return The allowed Gst::Caps of the |
| 1094 | * pad link. Unref the caps when you no longer need it. This |
| 1095 | * function returns <tt>nullptr</tt> when @a pad has no peer. |
| 1096 | * |
| 1097 | * MT safe. |
| 1098 | */ |
| 1099 | Glib::RefPtr<const Gst::Caps> get_allowed_caps() const; |
| 1100 | |
| 1101 | |
| 1102 | /** Gets the capabilities for @a pad's template. |
| 1103 | * |
| 1104 | * @return The Gst::Caps of this pad template. |
| 1105 | * Unref after usage. |
| 1106 | */ |
| 1107 | Glib::RefPtr<Gst::Caps> get_pad_template_caps(); |
| 1108 | |
| 1109 | /** Gets the capabilities for @a pad's template. |
| 1110 | * |
| 1111 | * @return The Gst::Caps of this pad template. |
| 1112 | * Unref after usage. |
| 1113 | */ |
| 1114 | Glib::RefPtr<const Gst::Caps> get_pad_template_caps() const; |
| 1115 | |
| 1116 | gulong add_probe(PadProbeType mask, const SlotProbe& slot); |
| 1117 | |
| 1118 | |
| 1119 | /** Remove the probe with @a id from @a pad. |
| 1120 | * |
| 1121 | * MT safe. |
| 1122 | * |
| 1123 | * @param id The probe id to remove. |
| 1124 | */ |
| 1125 | void remove_probe(gulong id); |
| 1126 | |
| 1127 | |
| 1128 | /** Gets the peer of @a pad. This function refs the peer pad so |
| 1129 | * you need to unref it after use. |
| 1130 | * |
| 1131 | * @return The peer Gst::Pad. Unref after usage. |
| 1132 | * |
| 1133 | * MT safe. |
| 1134 | */ |
| 1135 | Glib::RefPtr<Gst::Pad> get_peer(); |
| 1136 | |
| 1137 | /** Gets the peer of @a pad. This function refs the peer pad so |
| 1138 | * you need to unref it after use. |
| 1139 | * |
| 1140 | * @return The peer Gst::Pad. Unref after usage. |
| 1141 | * |
| 1142 | * MT safe. |
| 1143 | */ |
| 1144 | Glib::RefPtr<const Gst::Pad> get_peer() const; |
| 1145 | |
| 1146 | |
| 1147 | /** A helper function you can use that sets the FIXED_CAPS flag |
| 1148 | * This way the default CAPS query will always return the negotiated caps |
| 1149 | * or in case the pad is not negotiated, the padtemplate caps. |
| 1150 | * |
| 1151 | * The negotiated caps are the caps of the last CAPS event that passed on the |
| 1152 | * pad. Use this function on a pad that, once it negotiated to a CAPS, cannot |
| 1153 | * be renegotiated to something else. |
| 1154 | */ |
| 1155 | void use_fixed_caps(); |
| 1156 | |
| 1157 | /** Query if a pad is active |
| 1158 | * |
| 1159 | * @return <tt>true</tt> if the pad is active. |
| 1160 | * |
| 1161 | * MT safe. |
| 1162 | */ |
| 1163 | bool is_active() const; |
| 1164 | |
| 1165 | |
| 1166 | /** Checks if the pad is blocked or not. This function returns the |
| 1167 | * last requested state of the pad. It is not certain that the pad |
| 1168 | * is actually blocking at this point (see is_blocking()). |
| 1169 | * |
| 1170 | * @return <tt>true</tt> if the pad is blocked. |
| 1171 | * |
| 1172 | * MT safe. |
| 1173 | */ |
| 1174 | bool is_blocked() const; |
| 1175 | |
| 1176 | /** Checks if the pad is blocking or not. This is a guaranteed state |
| 1177 | * of whether the pad is actually blocking on a Gst::Buffer or a Gst::Event. |
| 1178 | * |
| 1179 | * @return <tt>true</tt> if the pad is blocking. |
| 1180 | * |
| 1181 | * MT safe. |
| 1182 | */ |
| 1183 | bool is_blocking() const; |
| 1184 | |
| 1185 | |
| 1186 | /** Mark a pad for needing reconfiguration. The next call to |
| 1187 | * check_reconfigure() will return <tt>true</tt> after this call. |
| 1188 | */ |
| 1189 | void mark_reconfigure(); |
| 1190 | |
| 1191 | /** Check the Gst::PAD_FLAG_NEED_RECONFIGURE flag on @a pad and return <tt>true</tt> |
| 1192 | * if the flag was set. |
| 1193 | * |
| 1194 | * @return <tt>true</tt> is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on @a pad. |
| 1195 | */ |
| 1196 | bool needs_reconfigure() const; |
| 1197 | |
| 1198 | /** Check and clear the Gst::PAD_FLAG_NEED_RECONFIGURE flag on @a pad and return <tt>true</tt> |
| 1199 | * if the flag was set. |
| 1200 | * |
| 1201 | * @return <tt>true</tt> is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @a pad. |
| 1202 | */ |
| 1203 | bool check_reconfigure(); |
| 1204 | |
| 1205 | |
| 1206 | /** Check if @a pad has caps set on it with a Gst::EVENT_CAPS event. |
| 1207 | * |
| 1208 | * @return <tt>true</tt> when @a pad has caps associated with it. |
| 1209 | */ |
| 1210 | bool has_current_caps() const; |
| 1211 | |
| 1212 | |
| 1213 | /** Creates a stream-id for the source Gst::Pad @a pad by combining the |
| 1214 | * upstream information with the optional @a stream_id of the stream |
| 1215 | * of @a pad. @a pad must have a parent Gst::Element and which must have zero |
| 1216 | * or one sinkpad. @a stream_id can only be <tt>nullptr</tt> if the parent element |
| 1217 | * of @a pad has only a single source pad. |
| 1218 | * |
| 1219 | * This function generates an unique stream-id by getting the upstream |
| 1220 | * stream-start event stream ID and appending @a stream_id to it. If the |
| 1221 | * element has no sinkpad it will generate an upstream stream-id by |
| 1222 | * doing an URI query on the element and in the worst case just uses |
| 1223 | * a random number. Source elements that don't implement the URI |
| 1224 | * handler interface should ideally generate a unique, deterministic |
| 1225 | * stream-id manually instead. |
| 1226 | * |
| 1227 | * Since stream IDs are sorted alphabetically, any numbers in the |
| 1228 | * stream ID should be printed with a fixed number of characters, |
| 1229 | * preceded by 0's, such as by using the format \\%03u instead of \\%u. |
| 1230 | * |
| 1231 | * @param parent Parent Gst::Element of @a pad. |
| 1232 | * @param stream_id The stream-id. |
| 1233 | * @return A stream-id for @a pad. |
| 1234 | */ |
| 1235 | Glib::ustring create_stream_id(const Glib::RefPtr<Gst::Element>& parent, const Glib::ustring& stream_id); |
| 1236 | |
| 1237 | /** Returns the current stream-id for the @a pad, or <tt>nullptr</tt> if none has been |
| 1238 | * set yet, i.e.\ the pad has not received a stream-start event yet. |
| 1239 | * |
| 1240 | * This is a convenience wrapper around get_sticky_event() and |
| 1241 | * Gst::Event::parse_stream_start(). |
| 1242 | * |
| 1243 | * The returned stream-id string should be treated as an opaque string, its |
| 1244 | * contents should not be interpreted. |
| 1245 | * |
| 1246 | * @return A newly-allocated copy of the stream-id for |
| 1247 | * @a pad, or <tt>nullptr</tt>. |
| 1248 | */ |
| 1249 | Glib::ustring get_stream_id() const; |
| 1250 | |
| 1251 | |
| 1252 | /** Set the offset that will be applied to the running time of @a pad. |
| 1253 | * |
| 1254 | * @param offset The offset. |
| 1255 | */ |
| 1256 | void set_offset(gint64 offset); |
| 1257 | |
| 1258 | /** Get the offset applied to the running time of @a pad. @a pad has to be a source |
| 1259 | * pad. |
| 1260 | * |
| 1261 | * @return The offset. |
| 1262 | */ |
| 1263 | gint64 get_offset() const; |
| 1264 | |
| 1265 | |
| 1266 | /** Set the given private data gpointer on the pad. |
| 1267 | * This function can only be used by the element that owns the pad. |
| 1268 | * No locking is performed in this function. |
| 1269 | * |
| 1270 | * @param priv The private data to attach to the pad. |
| 1271 | */ |
| 1272 | void set_element_private(gpointer priv); |
| 1273 | |
| 1274 | /** Gets the private data of a pad. |
| 1275 | * No locking is performed in this function. |
| 1276 | * |
| 1277 | * @return A #gpointer to the private data. |
| 1278 | */ |
| 1279 | gpointer get_element_private(); |
| 1280 | |
| 1281 | |
| 1282 | //This is handwritten because conversion from Glib::RefPtr<Gst::Buffer>& to |
| 1283 | //GstBuffer** is difficult. |
| 1284 | /** When pad is flushing this function returns Gst::FLOW_WRONG_STATE |
| 1285 | * immediatly. Calls the getrange function of pad. If pad has no getrange |
| 1286 | * function installed this function returns Gst::FLOW_NOT_SUPPORTED. |
| 1287 | * |
| 1288 | * This is a lowlevel function. Usually pull_range() is used. This function |
| 1289 | * is designed to be used with a source pad only. |
| 1290 | * |
| 1291 | * @param offset The start offset of the buffer. |
| 1292 | * @param size The length of the buffer. |
| 1293 | * @param buffer An unitialized Glib::RefPtr<> in which to store the |
| 1294 | * Gst::Buffer. |
| 1295 | * @return A Gst::FlowReturn from the pad (Gst::FLOW_NOT_SUPPORTED if pad is |
| 1296 | * not a source pad). MT safe. |
| 1297 | */ |
| 1298 | FlowReturn get_range(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer); |
| 1299 | |
| 1300 | |
| 1301 | /** Check if the given pad accepts the caps. |
| 1302 | * |
| 1303 | * @param caps A Gst::Caps to check on the pad. |
| 1304 | * @return <tt>true</tt> if the pad can accept the caps. |
| 1305 | */ |
| 1306 | bool query_accept_caps(const Glib::RefPtr<const Gst::Caps>& caps) const; |
| 1307 | |
| 1308 | /** Calls query_caps() for all internally linked pads of @a pad and returns |
| 1309 | * the intersection of the results. |
| 1310 | * |
| 1311 | * This function is useful as a default caps query function for an element |
| 1312 | * that can handle any stream format, but requires all its pads to have |
| 1313 | * the same caps. Two such elements are tee and adder. |
| 1314 | * |
| 1315 | * @param query A CAPS Gst::Query. |
| 1316 | * @return <tt>true</tt> if @a query could be executed. |
| 1317 | */ |
| 1318 | bool proxy_query_caps(const Glib::RefPtr<Gst::Query>& query) const; |
| 1319 | |
| 1320 | /** Checks if all internally linked pads of @a pad accepts the caps in @a query and |
| 1321 | * returns the intersection of the results. |
| 1322 | * |
| 1323 | * This function is useful as a default accept caps query function for an element |
| 1324 | * that can handle any stream format, but requires caps that are acceptable for |
| 1325 | * all opposite pads. |
| 1326 | * |
| 1327 | * @param query An ACCEPT_CAPS Gst::Query. |
| 1328 | * @return <tt>true</tt> if @a query could be executed. |
| 1329 | */ |
| 1330 | bool proxy_query_accept_caps(const Glib::RefPtr<Gst::Query>& query) const; |
| 1331 | |
| 1332 | /** Check if the peer of @a pad accepts @a caps. If @a pad has no peer, this function |
| 1333 | * returns <tt>true</tt>. |
| 1334 | * |
| 1335 | * @param caps A Gst::Caps to check on the pad. |
| 1336 | * @return <tt>true</tt> if the peer of @a pad can accept the caps or @a pad has no peer. |
| 1337 | */ |
| 1338 | bool peer_query_accept_caps(const Glib::RefPtr<const Gst::Caps>& caps) const; |
| 1339 | |
| 1340 | /** Queries the peer of a given sink pad for the stream position. |
| 1341 | * |
| 1342 | * @param format The Gst::Format requested. |
| 1343 | * @param cur A location in which to store the current |
| 1344 | * position, or <tt>nullptr</tt>. |
| 1345 | * @return <tt>true</tt> if the query could be performed. |
| 1346 | */ |
| 1347 | bool peer_query_position(Gst::Format format, gint64& cur) const; |
| 1348 | |
| 1349 | /** Queries the peer pad of a given sink pad for the total stream duration. |
| 1350 | * |
| 1351 | * @param format The Gst::Format requested. |
| 1352 | * @param duration A location in which to store the total |
| 1353 | * duration, or <tt>nullptr</tt>. |
| 1354 | * @return <tt>true</tt> if the query could be performed. |
| 1355 | */ |
| 1356 | bool peer_query_duration(Gst::Format format, gint64& duration) const; |
| 1357 | |
| 1358 | /** Pushes a buffer to the peer of @a pad. |
| 1359 | * |
| 1360 | * This function will call installed block probes before triggering any |
| 1361 | * installed data probes. |
| 1362 | * |
| 1363 | * The function proceeds calling chain() on the peer pad and returns |
| 1364 | * the value from that function. If @a pad has no peer, Gst::FLOW_NOT_LINKED will |
| 1365 | * be returned. |
| 1366 | * |
| 1367 | * In all cases, success or failure, the caller loses its reference to @a buffer |
| 1368 | * after calling this function. |
| 1369 | * |
| 1370 | * @param buffer The Gst::Buffer to push returns GST_FLOW_ERROR |
| 1371 | * if not. |
| 1372 | * @return A Gst::FlowReturn from the peer pad. |
| 1373 | * |
| 1374 | * MT safe. |
| 1375 | */ |
| 1376 | FlowReturn push(Glib::RefPtr<Gst::Buffer>&& buffer); |
| 1377 | |
| 1378 | |
| 1379 | /** Sends the event to the peer of the given pad. This function is |
| 1380 | * mainly used by elements to send events to their peer |
| 1381 | * elements. |
| 1382 | * |
| 1383 | * This function takes ownership of the provided event so you should |
| 1384 | * Gst::Event::ref() it if you want to reuse the event after this call. |
| 1385 | * |
| 1386 | * @param event The Gst::Event to send to the pad. |
| 1387 | * @return <tt>true</tt> if the event was handled. |
| 1388 | * |
| 1389 | * MT safe. |
| 1390 | */ |
| 1391 | bool push_event(Glib::RefPtr<Gst::Event>&& event); |
| 1392 | |
| 1393 | /// A push_event() convenience overload. Allows to re-use @a event parameter after function call. |
| 1394 | bool push_event(const Glib::RefPtr<Gst::Event>& event); |
| 1395 | |
| 1396 | /** Pulls a buffer from the peer pad. This function will first trigger the |
| 1397 | * pad block signal if it was installed. This method works only on sink |
| 1398 | * pads. |
| 1399 | * |
| 1400 | * When pad is not linked Gst::FLOW_NOT_LINKED is returned else this function |
| 1401 | * returns the result of get_range() on the peer pad. |
| 1402 | * |
| 1403 | * @a buffer's caps must either be unset or the same as what is already |
| 1404 | * configured on pad. Renegotiation within a running pull-mode pipeline is |
| 1405 | * not supported. |
| 1406 | * |
| 1407 | * @param offset The start offset of the buffer. |
| 1408 | * @param size The length of the buffer. |
| 1409 | * @param buffer An uninitialized Glib::RefPtr<> in which to hold the |
| 1410 | * Gst::Buffer. |
| 1411 | * @return A Gst::FlowReturn from the peer pad (Gst::FLOW_ERROR if pad is not |
| 1412 | * a sink pad). When this function returns Gst::FLOW_OK, buffer will contain |
| 1413 | * a valid Gst::Buffer. @a buffer may not be used when any other return value |
| 1414 | * than Gst::FLOW_OK is returned. MT safe. |
| 1415 | */ |
| 1416 | FlowReturn pull_range(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer); |
| 1417 | |
| 1418 | |
| 1419 | /** Sends the event to the pad. This function can be used |
| 1420 | * by applications to send events in the pipeline. |
| 1421 | * |
| 1422 | * If @a pad is a source pad, @a event should be an upstream event. If @a pad is a |
| 1423 | * sink pad, @a event should be a downstream event. For example, you would not |
| 1424 | * send a Gst::EVENT_EOS on a src pad; EOS events only propagate downstream. |
| 1425 | * Furthermore, some downstream events have to be serialized with data flow, |
| 1426 | * like EOS, while some can travel out-of-band, like Gst::EVENT_FLUSH_START. If |
| 1427 | * the event needs to be serialized with data flow, this function will take the |
| 1428 | * pad's stream lock while calling its event function. |
| 1429 | * |
| 1430 | * To find out whether an event type is upstream, downstream, or downstream and |
| 1431 | * serialized, see Gst::EventTypeFlags, Gst::Event::type_get_flags(), |
| 1432 | * Gst::EVENT_IS_UPSTREAM, Gst::EVENT_IS_DOWNSTREAM, and |
| 1433 | * Gst::EVENT_IS_SERIALIZED. Note that in practice that an application or |
| 1434 | * plugin doesn't need to bother itself with this information; the core handles |
| 1435 | * all necessary locks and checks. |
| 1436 | * |
| 1437 | * This function takes ownership of the provided event so you should |
| 1438 | * Gst::Event::ref() it if you want to reuse the event after this call. |
| 1439 | * |
| 1440 | * @param event The Gst::Event to send to the pad. |
| 1441 | * @return <tt>true</tt> if the event was handled. |
| 1442 | */ |
| 1443 | bool send_event(Glib::RefPtr<Gst::Event>&& event); |
| 1444 | |
| 1445 | /// A send_event() convenience overload. Allows to re-use @a event parameter after function call. |
| 1446 | bool send_event(const Glib::RefPtr<Gst::Event>& event); |
| 1447 | |
| 1448 | |
| 1449 | /** Activates or deactivates the given pad in @a mode via dispatching to the |
| 1450 | * pad's activatemodefunc. For use from within pad activation functions only. |
| 1451 | * |
| 1452 | * If you don't know what this is, you probably don't want to call it. |
| 1453 | * |
| 1454 | * @param mode The requested activation mode. |
| 1455 | * @param active Whether or not the pad should be active. |
| 1456 | * @return <tt>true</tt> if the operation was successful. |
| 1457 | * |
| 1458 | * MT safe. |
| 1459 | */ |
| 1460 | bool activate_mode(Gst::PadMode mode, bool active = true); |
| 1461 | |
| 1462 | /** Invokes the default event handler for the given pad. |
| 1463 | * |
| 1464 | * The EOS event will pause the task associated with @a pad before it is forwarded |
| 1465 | * to all internally linked pads, |
| 1466 | * |
| 1467 | * The event is sent to all pads internally linked to @a pad. This function |
| 1468 | * takes ownership of @a event. |
| 1469 | * |
| 1470 | * @param parent The parent of @a pad or <tt>nullptr</tt>. |
| 1471 | * @param event The Gst::Event to handle. |
| 1472 | * @return <tt>true</tt> if the event was sent successfully. |
| 1473 | */ |
| 1474 | bool event_default(const Glib::RefPtr<Gst::Object>& parent, Glib::RefPtr<Gst::Event>&& event); |
| 1475 | |
| 1476 | /// A event_default() convenience overload. |
| 1477 | bool event_default(Glib::RefPtr<Gst::Event>&& event); |
| 1478 | |
| 1479 | /** Dispatches a query to a pad. The query should have been allocated by the |
| 1480 | * caller via one of the type-specific allocation functions. The element that |
| 1481 | * the pad belongs to is responsible for filling the query with an appropriate |
| 1482 | * response, which should then be parsed with a type-specific query parsing |
| 1483 | * function. |
| 1484 | * |
| 1485 | * Again, the caller is responsible for both the allocation and deallocation of |
| 1486 | * the query structure. |
| 1487 | * |
| 1488 | * Please also note that some queries might need a running pipeline to work. |
| 1489 | * |
| 1490 | * @param query The Gst::Query to perform. |
| 1491 | * @return <tt>true</tt> if the query could be performed. |
| 1492 | */ |
| 1493 | bool query(const Glib::RefPtr<Gst::Query>& query) const; |
| 1494 | |
| 1495 | /** Performs query() on the peer of @a pad. |
| 1496 | * |
| 1497 | * The caller is responsible for both the allocation and deallocation of |
| 1498 | * the query structure. |
| 1499 | * |
| 1500 | * @param query The Gst::Query to perform. |
| 1501 | * @return <tt>true</tt> if the query could be performed. This function returns <tt>false</tt> |
| 1502 | * if @a pad has no peer. |
| 1503 | */ |
| 1504 | bool peer_query(const Glib::RefPtr<Gst::Query>& query) const; |
| 1505 | |
| 1506 | /** Gets the capabilities of the peer connected to this pad. Similar to |
| 1507 | * query_caps(). |
| 1508 | * |
| 1509 | * When called on srcpads @a filter contains the caps that |
| 1510 | * upstream could produce in the order preferred by upstream. When |
| 1511 | * called on sinkpads @a filter contains the caps accepted by |
| 1512 | * downstream in the preferred order. @a filter might be <tt>nullptr</tt> but |
| 1513 | * if it is not <tt>nullptr</tt> the returned caps will be a subset of @a filter. |
| 1514 | * |
| 1515 | * @param filter A Gst::Caps filter, or <tt>nullptr</tt>. |
| 1516 | * @return The caps of the peer pad with incremented |
| 1517 | * ref-count. When there is no peer pad, this function returns @a filter or, |
| 1518 | * when @a filter is <tt>nullptr</tt>, ANY caps. |
| 1519 | */ |
| 1520 | Glib::RefPtr<Gst::Caps> peer_query_caps(const Glib::RefPtr<Gst::Caps>& filter) const; |
| 1521 | |
| 1522 | /** Invokes the default query handler for the given pad. |
| 1523 | * The query is sent to all pads internally linked to @a pad. Note that |
| 1524 | * if there are many possible sink pads that are internally linked to |
| 1525 | * @a pad, only one will be sent the query. |
| 1526 | * Multi-sinkpad elements should implement custom query handlers. |
| 1527 | * |
| 1528 | * @param parent The parent of @a pad or <tt>nullptr</tt>. |
| 1529 | * @param query The Gst::Query to handle. |
| 1530 | * @return <tt>true</tt> if the query was performed successfully. |
| 1531 | */ |
| 1532 | bool query_default(const Glib::RefPtr<Gst::Object>& parent, const Glib::RefPtr<Gst::Query>& query) const; |
| 1533 | |
| 1534 | /// A query_default() convenience overload. |
| 1535 | bool query_default(const Glib::RefPtr<Gst::Query>& query) const; |
| 1536 | |
| 1537 | /** Queries a pad for the stream position. |
| 1538 | * |
| 1539 | * @param format The Gst::Format requested. |
| 1540 | * @param position A location in which to store the current position, or <tt>nullptr</tt>. |
| 1541 | * @return <tt>true</tt> if the query could be performed. |
| 1542 | */ |
| 1543 | bool query_position(Format format, gint64& position) const; |
| 1544 | |
| 1545 | /** Queries a pad for the stream position parsing only the format. |
| 1546 | * @param format A reference to the Gst::Format asked for. On return contains |
| 1547 | * the Gst::Format used. |
| 1548 | * @return true if the query could be performed. |
| 1549 | */ |
| 1550 | bool query_position(Format& format) const; |
| 1551 | |
| 1552 | |
| 1553 | /** Queries a pad for the total stream duration. |
| 1554 | * |
| 1555 | * @param format The Gst::Format requested. |
| 1556 | * @param duration A location in which to store the total |
| 1557 | * duration, or <tt>nullptr</tt>. |
| 1558 | * @return <tt>true</tt> if the query could be performed. |
| 1559 | */ |
| 1560 | bool query_duration(Format format, gint64& duration) const; |
| 1561 | |
| 1562 | /** Queries a pad for the total stream duration parsing only the format. |
| 1563 | * @param format A reference to the Gst::Format asked for. On return contains |
| 1564 | * the GstFormat used. |
| 1565 | * @return true if the query could be performed. |
| 1566 | */ |
| 1567 | bool query_duration(Format& format) const; |
| 1568 | |
| 1569 | |
| 1570 | /** Queries a pad to convert @a src_value in @a src_format to @a dst_format. |
| 1571 | * |
| 1572 | * @param src_format A Gst::Format to convert from. |
| 1573 | * @param src_value A value to convert. |
| 1574 | * @param dst_format The Gst::Format to convert to. |
| 1575 | * @param dst_value A pointer to the result. |
| 1576 | * @return <tt>true</tt> if the query could be performed. |
| 1577 | */ |
| 1578 | bool query_convert(Format src_format, gint64 src_value, Format dst_format, gint64& dst_value) const; |
| 1579 | |
| 1580 | |
| 1581 | /** Queries the peer pad of a given sink pad to convert @a src_value in @a src_format |
| 1582 | * to @a dst_format. |
| 1583 | * |
| 1584 | * @param src_format A Gst::Format to convert from. |
| 1585 | * @param src_value A value to convert. |
| 1586 | * @param dst_format The Gst::Format to convert to. |
| 1587 | * @param dst_value A pointer to the result. |
| 1588 | * @return <tt>true</tt> if the query could be performed. |
| 1589 | */ |
| 1590 | bool peer_query_convert(Format src_format, gint64 src_value, Format dst_format, gint64& dst_value) const; |
| 1591 | |
| 1592 | |
| 1593 | /** Gets an iterator for the pads to which the given pad is linked to inside |
| 1594 | * of the parent element. |
| 1595 | * |
| 1596 | * Each Gst::Pad element yielded by the iterator will have its refcount increased, |
| 1597 | * so unref after use. |
| 1598 | * |
| 1599 | * Free-function: gst_iterator_free |
| 1600 | * |
| 1601 | * @return A new Gst::Iterator of Gst::Pad |
| 1602 | * or <tt>nullptr</tt> when the pad does not have an iterator function |
| 1603 | * configured. Use Gst::Iterator::free() after usage. |
| 1604 | */ |
| 1605 | Gst::Iterator<Gst::Pad> iterate_internal_links(); |
| 1606 | |
| 1607 | /** Gets an iterator for the pads to which the given pad is linked to inside |
| 1608 | * of the parent element. |
| 1609 | * |
| 1610 | * Each Gst::Pad element yielded by the iterator will have its refcount increased, |
| 1611 | * so unref after use. |
| 1612 | * |
| 1613 | * Free-function: gst_iterator_free |
| 1614 | * |
| 1615 | * @return A new Gst::Iterator of Gst::Pad |
| 1616 | * or <tt>nullptr</tt> when the pad does not have an iterator function |
| 1617 | * configured. Use Gst::Iterator::free() after usage. |
| 1618 | */ |
| 1619 | Gst::Iterator<const Gst::Pad> iterate_internal_links() const; |
| 1620 | |
| 1621 | /** Iterate the list of pads to which the given pad is linked to inside of |
| 1622 | * the parent element. |
| 1623 | * This is the default handler, and thus returns an iterator of all of the |
| 1624 | * pads inside the parent element with opposite direction. |
| 1625 | * |
| 1626 | * The caller must free this iterator after use with Gst::Iterator::free(). |
| 1627 | * |
| 1628 | * @param parent The parent of @a pad or <tt>nullptr</tt>. |
| 1629 | * @return A Gst::Iterator of Gst::Pad, or <tt>nullptr</tt> if @a pad |
| 1630 | * has no parent. Unref each returned pad with Gst::Object::unref(). |
| 1631 | */ |
| 1632 | Gst::Iterator<Gst::Pad> iterate_internal_links_default(const Glib::RefPtr<Gst::Object>& parent); |
| 1633 | |
| 1634 | /// A iterate_internal_links_default() convenience overload. |
| 1635 | Gst::Iterator<Gst::Pad> iterate_internal_links_default(); |
| 1636 | |
| 1637 | /** Iterate the list of pads to which the given pad is linked to inside of |
| 1638 | * the parent element. |
| 1639 | * This is the default handler, and thus returns an iterator of all of the |
| 1640 | * pads inside the parent element with opposite direction. |
| 1641 | * |
| 1642 | * The caller must free this iterator after use with Gst::Iterator::free(). |
| 1643 | * |
| 1644 | * @param parent The parent of @a pad or <tt>nullptr</tt>. |
| 1645 | * @return A Gst::Iterator of Gst::Pad, or <tt>nullptr</tt> if @a pad |
| 1646 | * has no parent. Unref each returned pad with Gst::Object::unref(). |
| 1647 | */ |
| 1648 | Gst::Iterator<const Gst::Pad> iterate_internal_links_default(const Glib::RefPtr<Gst::Object>& parent) const; |
| 1649 | |
| 1650 | /// A iterate_internal_links_default() convenience overload. |
| 1651 | Gst::Iterator<const Gst::Pad> iterate_internal_links_default() const; |
| 1652 | |
| 1653 | /** Chain a buffer to @a pad. |
| 1654 | * |
| 1655 | * The function returns Gst::FLOW_FLUSHING if the pad was flushing. |
| 1656 | * |
| 1657 | * If the buffer type is not acceptable for @a pad (as negotiated with a |
| 1658 | * preceding GST_EVENT_CAPS event), this function returns |
| 1659 | * Gst::FLOW_NOT_NEGOTIATED. |
| 1660 | * |
| 1661 | * The function proceeds calling the chain function installed on @a pad (see |
| 1662 | * gst_pad_set_chain_function()) and the return value of that function is |
| 1663 | * returned to the caller. Gst::FLOW_NOT_SUPPORTED is returned if @a pad has no |
| 1664 | * chain function. |
| 1665 | * |
| 1666 | * In all cases, success or failure, the caller loses its reference to @a buffer |
| 1667 | * after calling this function. |
| 1668 | * |
| 1669 | * @param buffer The Gst::Buffer to send, return GST_FLOW_ERROR |
| 1670 | * if not. |
| 1671 | * @return A Gst::FlowReturn from the pad. |
| 1672 | * |
| 1673 | * MT safe. |
| 1674 | */ |
| 1675 | Gst::FlowReturn chain(Glib::RefPtr<Gst::Buffer>&& buffer); |
| 1676 | |
| 1677 | |
| 1678 | /** Gets the capabilities currently configured on @a pad with the last |
| 1679 | * Gst::EVENT_CAPS event. |
| 1680 | * |
| 1681 | * @return The current caps of the pad with |
| 1682 | * incremented ref-count or <tt>nullptr</tt> when pad has no caps. Unref after usage. |
| 1683 | */ |
| 1684 | Glib::RefPtr<Gst::Caps> get_current_caps(); |
| 1685 | |
| 1686 | /** Pause the task of @a pad. This function will also wait until the |
| 1687 | * function executed by the task is finished if this function is not |
| 1688 | * called from the task function. |
| 1689 | * |
| 1690 | * @return A <tt>true</tt> if the task could be paused or <tt>false</tt> when the pad |
| 1691 | * has no task. |
| 1692 | */ |
| 1693 | bool pause_task(); |
| 1694 | |
| 1695 | /** Stop the task of @a pad. This function will also make sure that the |
| 1696 | * function executed by the task will effectively stop if not called |
| 1697 | * from the GstTaskFunction. |
| 1698 | * |
| 1699 | * This function will deadlock if called from the GstTaskFunction of |
| 1700 | * the task. Use Gst::Task::pause() instead. |
| 1701 | * |
| 1702 | * Regardless of whether the pad has a task, the stream lock is acquired and |
| 1703 | * released so as to ensure that streaming through this pad has finished. |
| 1704 | * |
| 1705 | * @return A <tt>true</tt> if the task could be stopped or <tt>false</tt> on error. |
| 1706 | */ |
| 1707 | bool stop_task(); |
| 1708 | |
| 1709 | /** Activates or deactivates the given pad. |
| 1710 | * Normally called from within core state change functions. |
| 1711 | * |
| 1712 | * If @a active, makes sure the pad is active. If it is already active, either in |
| 1713 | * push or pull mode, just return. Otherwise dispatches to the pad's activate |
| 1714 | * function to perform the actual activation. |
| 1715 | * |
| 1716 | * If not @a active, calls activate_mode() with the pad's current mode |
| 1717 | * and a <tt>false</tt> argument. |
| 1718 | * |
| 1719 | * @param active Whether or not the pad should be active. |
| 1720 | * @return <tt>true</tt> if the operation was successful. |
| 1721 | * |
| 1722 | * MT safe. |
| 1723 | */ |
| 1724 | bool set_active(bool active = true); |
| 1725 | |
| 1726 | |
| 1727 | /** Gets the Gst::FlowReturn return from the last data passed by this pad. |
| 1728 | */ |
| 1729 | Gst::FlowReturn get_last_flow_return() const; |
| 1730 | |
| 1731 | |
| 1732 | /** Returns a new reference of the sticky event of type @a event_type |
| 1733 | * from the event. |
| 1734 | * |
| 1735 | * @param event_type The Gst::EventType that should be retrieved. |
| 1736 | * @param idx The index of the event. |
| 1737 | * @return A Gst::Event of type |
| 1738 | * @a event_type or <tt>nullptr</tt> when no event of @a event_type was on |
| 1739 | * @a pad. Unref after usage. |
| 1740 | */ |
| 1741 | Glib::RefPtr<Gst::Event> get_sticky_event(Gst::EventType event_type, guint idx) const; |
| 1742 | |
| 1743 | static GstFlowReturn Pad_Chain_gstreamermm_callback(GstPad* pad, GstObject* parent, GstBuffer *buffer); |
| 1744 | void set_chain_function(const SlotChain& slot); |
| 1745 | |
| 1746 | static gboolean Pad_Event_gstreamermm_callback(GstPad* pad, GstObject* parent, GstEvent* event); |
| 1747 | void set_event_function(const SlotEvent& slot); |
| 1748 | |
| 1749 | static gboolean Pad_Query_gstreamermm_callback(GstPad* pad, GstObject* parent, GstQuery* query); |
| 1750 | void set_query_function(const SlotQuery& slot); |
| 1751 | |
| 1752 | static gboolean Pad_Activate_gstreamermm_callback(GstPad* pad, GstObject* parent); |
| 1753 | void set_activate_function(const SlotActivate& slot); |
| 1754 | |
| 1755 | static gboolean Pad_Activatemode_gstreamermm_callback(GstPad* pad, GstObject* parent, GstPadMode mode, gboolean active); |
| 1756 | void set_activatemode_function(const SlotActivatemode& slot); |
| 1757 | |
| 1758 | static GstFlowReturn Pad_Getrange_gstreamermm_callback(GstPad* pad, GstObject* parent, guint64 offset, guint length, GstBuffer **buffer); |
| 1759 | void set_getrange_function(const SlotGetrange& slot); |
| 1760 | |
| 1761 | |
| 1762 | //C API specific pad callback setting functions are ignored. |
| 1763 | |
| 1764 | |
| 1765 | /** |
| 1766 | * @par Slot Prototype: |
| 1767 | * <tt>void on_my_%linked(const Glib::RefPtr<Gst::Pad>& peer_pad)</tt> |
| 1768 | * |
| 1769 | * Signals that a pad has been linked to the peer pad. |
| 1770 | * |
| 1771 | * @param peer_pad The peer pad that has been connected. |
| 1772 | */ |
| 1773 | |
| 1774 | Glib::SignalProxy< void,const Glib::RefPtr<Gst::Pad>& > signal_linked(); |
| 1775 | |
| 1776 | |
| 1777 | /** |
| 1778 | * @par Slot Prototype: |
| 1779 | * <tt>void on_my_%unlinked(const Glib::RefPtr<Gst::Pad>& peer_pad)</tt> |
| 1780 | * |
| 1781 | * Signals that a pad has been unlinked from the peer pad. |
| 1782 | * |
| 1783 | * @param peer_pad The peer pad that has been disconnected. |
| 1784 | */ |
| 1785 | |
| 1786 | Glib::SignalProxy< void,const Glib::RefPtr<Gst::Pad>& > signal_unlinked(); |
| 1787 | |
| 1788 | |
| 1789 | /** The capabilities of the pad. |
| 1790 | * |
| 1791 | * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, |
| 1792 | * or receive notification when the value of the property changes. |
| 1793 | */ |
| 1794 | Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > property_caps() const; |
| 1795 | |
| 1796 | |
| 1797 | /** The direction of the pad. |
| 1798 | * |
| 1799 | * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, |
| 1800 | * or receive notification when the value of the property changes. |
| 1801 | */ |
| 1802 | Glib::PropertyProxy_ReadOnly< PadDirection > property_direction() const; |
| 1803 | |
| 1804 | |
| 1805 | /** The GstPadTemplate of this pad. |
| 1806 | * |
| 1807 | * @return A PropertyProxy that allows you to get or set the value of the property, |
| 1808 | * or receive notification when the value of the property changes. |
| 1809 | */ |
| 1810 | Glib::PropertyProxy< PadTemplate > property_template() ; |
| 1811 | |
| 1812 | /** The GstPadTemplate of this pad. |
| 1813 | * |
| 1814 | * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, |
| 1815 | * or receive notification when the value of the property changes. |
| 1816 | */ |
| 1817 | Glib::PropertyProxy_ReadOnly< PadTemplate > property_template() const; |
| 1818 | |
| 1819 | /** The running time offset of the pad. |
| 1820 | * |
| 1821 | * @return A PropertyProxy that allows you to get or set the value of the property, |
| 1822 | * or receive notification when the value of the property changes. |
| 1823 | */ |
| 1824 | Glib::PropertyProxy< gint64 > property_offset() ; |
| 1825 | |
| 1826 | /** The running time offset of the pad. |
| 1827 | * |
| 1828 | * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, |
| 1829 | * or receive notification when the value of the property changes. |
| 1830 | */ |
| 1831 | Glib::PropertyProxy_ReadOnly< gint64 > property_offset() const; |
| 1832 | |
| 1833 | |
| 1834 | /** |
| 1835 | * Checks whether pad is a ghostpad. |
| 1836 | */ |
| 1837 | bool is_ghost_pad() const; |
| 1838 | bool is_proxy_pad() const; |
| 1839 | |
| 1840 | /** |
| 1841 | * Handle exceptions occuring in callback methods |
| 1842 | */ |
| 1843 | void exception_handler(); |
| 1844 | |
| 1845 | private: |
| 1846 | SlotChain slot_chain; |
| 1847 | SlotEvent slot_event; |
| 1848 | SlotQuery slot_query; |
| 1849 | SlotActivate slot_activate; |
| 1850 | SlotActivatemode slot_activatemode; |
| 1851 | SlotGetrange slot_getrange; |
| 1852 | |
| 1853 | |
| 1854 | public: |
| 1855 | |
| 1856 | public: |
| 1857 | //C++ methods used to invoke GTK+ virtual functions: |
| 1858 | |
| 1859 | protected: |
| 1860 | //GTK+ Virtual Functions (override these to change behaviour): |
| 1861 | |
| 1862 | //Default Signal Handlers:: |
| 1863 | /// This is a default handler for the signal signal_linked(). |
| 1864 | virtual void on_linked(const Glib::RefPtr<Gst::Pad>& peer_pad); |
| 1865 | /// This is a default handler for the signal signal_unlinked(). |
| 1866 | virtual void on_unlinked(const Glib::RefPtr<Gst::Pad>& peer_pad); |
| 1867 | |
| 1868 | |
| 1869 | }; |
| 1870 | |
| 1871 | /*! A gstreamermm dynamic Gst::Pad example. |
| 1872 | * @example basics/dynamic_pads.cc |
| 1873 | */ |
| 1874 | |
| 1875 | class PadProbeInfo |
| 1876 | { |
| 1877 | public: |
| 1878 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 1879 | using CppObjectType = PadProbeInfo; |
| 1880 | using BaseObjectType = GstPadProbeInfo; |
| 1881 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 1882 | |
| 1883 | private: |
| 1884 | |
| 1885 | |
| 1886 | public: |
| 1887 | PadProbeInfo(); |
| 1888 | explicit PadProbeInfo(GstPadProbeInfo& castitem, |
| 1889 | bool take_ownership = false); |
| 1890 | explicit PadProbeInfo(GstPadProbeInfo* castitem, |
| 1891 | bool take_copy = false); |
| 1892 | PadProbeInfo(const PadProbeInfo& other); |
| 1893 | virtual ~PadProbeInfo(); |
| 1894 | |
| 1895 | GstPadProbeInfo* gobj() { return gobj_; }; |
| 1896 | |
| 1897 | const GstPadProbeInfo* gobj() const { return gobj_; }; |
| 1898 | |
| 1899 | gulong get_id() const; |
| 1900 | |
| 1901 | /** @return The Gst::Event from the probe. |
| 1902 | */ |
| 1903 | Glib::RefPtr<Gst::Event> get_event(); |
| 1904 | |
| 1905 | /** @return The Gst::Event from the probe. |
| 1906 | */ |
| 1907 | const Glib::RefPtr<Gst::Event> get_event() const; |
| 1908 | |
| 1909 | /** @return The Gst::Query from the probe. |
| 1910 | */ |
| 1911 | Glib::RefPtr<Gst::Query> get_query(); |
| 1912 | |
| 1913 | /** @return The Gst::Query from the probe. |
| 1914 | */ |
| 1915 | const Glib::RefPtr<Gst::Query> get_query() const; |
| 1916 | |
| 1917 | /** @return The Gst::Buffer from the probe. |
| 1918 | */ |
| 1919 | Glib::RefPtr<Gst::Buffer> get_buffer(); |
| 1920 | |
| 1921 | /** @return The Gst::Buffer from the probe. |
| 1922 | */ |
| 1923 | const Glib::RefPtr<Gst::Buffer> get_buffer() const; |
| 1924 | |
| 1925 | /** @return The Gst::BufferList from the probe. |
| 1926 | */ |
| 1927 | Glib::RefPtr<Gst::BufferList> get_buffer_list(); |
| 1928 | |
| 1929 | /** @return The Gst::BufferList from the probe. |
| 1930 | */ |
| 1931 | const Glib::RefPtr<Gst::BufferList> get_buffer_list() const; |
| 1932 | |
| 1933 | PadProbeType get_type() const; |
| 1934 | protected: |
| 1935 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 1936 | GstPadProbeInfo* gobj_; |
| 1937 | bool take_ownership; |
| 1938 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 1939 | |
| 1940 | |
| 1941 | }; |
| 1942 | |
| 1943 | } // namespace Gst |
| 1944 | |
| 1945 | namespace Glib |
| 1946 | { |
| 1947 | Gst::PadProbeInfo wrap(GstPadProbeInfo* probe_info, bool take_copy); |
| 1948 | |
| 1949 | } // namespace Glib |
| 1950 | |
| 1951 | |
| 1952 | namespace Glib |
| 1953 | { |
| 1954 | /** A Glib::wrap() method for this object. |
| 1955 | * |
| 1956 | * @param object The C instance. |
| 1957 | * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
| 1958 | * @result A C++ instance that wraps this C instance. |
| 1959 | * |
| 1960 | * @relates Gst::Pad |
| 1961 | */ |
| 1962 | Glib::RefPtr<Gst::Pad> wrap(GstPad* object, bool take_copy = false); |
| 1963 | } |
| 1964 | |
| 1965 | |
| 1966 | #endif /* _GSTREAMERMM_PAD_H */ |
| 1967 |