/* gstreamermm - a C++ wrapper for gstreamer * * Copyright 2014-2016 The gstreamermm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include _DEFS(gstreamermm,gst) namespace Gst { /** * A set of features in caps * * Gst::CapsFeatures can optionally be set on a Gst::Caps to add requirements * for additional features for a specific Gst::Structure. Caps structures with * the same name but with a non-equal set of caps features are not compatible. * If a pad supports multiple sets of features it has to add multiple equal * structures with different feature sets to the caps. * * Empty Gst::CapsFeatures are equivalent with the Gst::CapsFeatures that only * contain Gst::CapsFeatures::memory_system_memory(). ANY Gst::CapsFeatures as * created by Gst::CapsFeatures::create_any() are equal to any other Gst::CapsFeatures * and can be used to specify that any Gst::CapsFeatures would be supported, e.g. * for elements that don't touch buffer memory. Gst::Caps with ANY Gst::CapsFeatures * are considered non-fixed and during negotiation some Gst::CapsFeatures have * to be selected. * * Examples for caps features would be the requirement of a specific Gst::Memory * types or the requirement of having a specific Gst::Meta on the buffer. Features * are given as a string of the format "memory:GstMemoryTypeName" or * "meta:GstMetaAPIName". * * Last reviewed on 2016-05-16 (1.8.0) * * Since: 1.2 */ class CapsFeatures { _CLASS_BOXEDTYPE(CapsFeatures, GstCapsFeatures, gst_caps_features_new_empty, gst_caps_features_copy, gst_caps_features_free) _IGNORE(gst_caps_features_new_id_valist) _IGNORE(gst_caps_features_new_valist) _IGNORE(gst_caps_features_new_empty) _IGNORE(gst_caps_features_copy) _IGNORE(gst_caps_features_free) public: /** * Creates a new Gst::CapsFeatures with the given features. * * @param features name of features to set. */ explicit CapsFeatures(std::initializer_list features); _WRAP_METHOD(static Gst::CapsFeatures create_any(), gst_caps_features_new_any) _WRAP_METHOD(static Gst::CapsFeatures create_from_string(const Glib::ustring& features), gst_caps_features_from_string) _WRAP_METHOD(Glib::ustring to_string() const, gst_caps_features_to_string) _WRAP_METHOD(bool set_parent_refcount(gint *refcount), gst_caps_features_set_parent_refcount) _WRAP_METHOD(bool is_equal(const Gst::CapsFeatures& features2) const, gst_caps_features_is_equal) _WRAP_METHOD(bool is_any() const, gst_caps_features_is_any) _WRAP_METHOD(bool contains(const Glib::ustring& feature) const, gst_caps_features_contains) _WRAP_METHOD(bool contains(GQuark feature) const, gst_caps_features_contains_id) _WRAP_METHOD(guint get_size() const, gst_caps_features_get_size) _WRAP_METHOD(Glib::ustring get_nth(guint i) const, gst_caps_features_get_nth) _WRAP_METHOD(GQuark get_nth_id(guint i) const, gst_caps_features_get_nth_id) _WRAP_METHOD(void add(const Glib::ustring& feature), gst_caps_features_add) _WRAP_METHOD(void add(GQuark feature), gst_caps_features_add_id) _WRAP_METHOD(void remove(const Glib::ustring& feature), gst_caps_features_remove) _WRAP_METHOD(void remove(GQuark feature), gst_caps_features_remove_id) /** Constant for system memory feature name. */ static Glib::ustring memory_system_memory(); }; }