00001
00002
00003 #ifndef _GSTMM_CAPS_H
00004 #define _GSTMM_CAPS_H
00005
00006
00007 #include <glibmm.h>
00008
00009 #include <gst/gstcaps.h>
00010
00011
00012 namespace Gst
00013 {
00014
00015 struct Structure;
00016
00017 class Caps
00018 {
00019 public:
00020 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00021 typedef Caps CppObjectType;
00022 typedef GstCaps BaseObjectType;
00023 #endif
00024
00025
00026
00027 void reference() const;
00028 void unreference() const;
00029
00031 GstCaps* gobj();
00032
00034 const GstCaps* gobj() const;
00035
00037 GstCaps* gobj_copy() const;
00038
00039 protected:
00040
00041 Caps();
00042 void operator delete(void*, size_t);
00043
00044 private:
00045
00046 Caps(const Caps&);
00047 Caps& operator=(const Caps&);
00048
00049
00050 public:
00051
00052
00053 static Glib::RefPtr<Caps> create_empty();
00054 static Glib::RefPtr<Caps> create_any();
00055 static Glib::RefPtr<Caps> create_full(Structure&);
00056
00057
00058 Glib::RefPtr<Caps> copy() const;
00059
00060
00061 Glib::RefPtr<Caps> copy_nth(guint);
00062
00063 void append(const Glib::RefPtr<Caps>& caps);
00064
00065 void merge(const Glib::RefPtr<Caps>& caps);
00066
00067 void append_structure(Structure& structure);
00068
00069 void merge_structure(Structure& structure);
00070
00071
00072 Structure* get_structure(guint idx);
00073
00074
00075 void remove_structure(guint idx);
00076
00077 guint get_size() const;
00078
00079
00080 void simple_valist(char* field, const va_list& varargs);
00081
00082 bool is_any() const;
00083
00084 bool is_empty() const;
00085
00086 bool is_fixed() const;
00087
00088 bool is_equal(const Glib::RefPtr<Caps>& other_caps) const;
00089
00090 bool is_equal_fixed(const Glib::RefPtr<Caps>& other_caps) const;
00091
00092 bool is_always_compatible(const Glib::RefPtr<Caps>& other_caps) const;
00093
00094 bool is_subset(const Glib::RefPtr<Caps>& superset_caps) const;
00095
00096 Glib::RefPtr<Caps> intersect(const Glib::RefPtr<Caps>& other_caps) const;
00097
00098 Glib::RefPtr<Caps> unions(const Glib::RefPtr<Caps>& other_caps) const;
00099
00100 Glib::RefPtr<Caps> normalize();
00101
00102 bool do_simplify();
00103
00104 xmlNodePtr save_thyself(const xmlNodePtr& parent);
00105
00106 static Glib::RefPtr<Caps> load_thyself(xmlNodePtr parent);
00107
00108
00109 Glib::ustring to_string() const;
00110
00111
00112 static Glib::RefPtr<Caps> from_string(const Glib::ustring& string);
00113
00114
00115 Glib::RefPtr<Caps> subtract(const Glib::RefPtr<Caps>& subtrahend_caps);
00116
00117 Glib::RefPtr<Caps> make_writable();
00118
00119 void truncate();
00120
00121
00122 protected:
00123 GstCaps * cobj_;
00124
00125
00126 };
00127
00128 }
00129
00130
00131 namespace Glib
00132 {
00133
00142 Glib::RefPtr<Gst::Caps> wrap(GstCaps* object, bool take_copy = false);
00143
00144 }
00145
00146
00147 #endif
00148