00001
00002
00003 #ifndef _GSTREAMERMM_CAPS_H
00004 #define _GSTREAMERMM_CAPS_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gst/gstcaps.h>
00031 #include <gstreamermm/structure.h>
00032
00033
00034 namespace Gst
00035 {
00036
00037 struct Structure;
00038
00059 class Caps
00060 {
00061 public:
00062 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00063 typedef Caps CppObjectType;
00064 typedef GstCaps BaseObjectType;
00065 #endif
00066
00067 static Glib::RefPtr<Caps> create();
00068
00069
00070 void reference() const;
00071 void unreference() const;
00072
00074 GstCaps* gobj();
00075
00077 const GstCaps* gobj() const;
00078
00080 GstCaps* gobj_copy() const;
00081
00082 protected:
00083
00084 Caps();
00085 void operator delete(void*, size_t);
00086
00087 private:
00088
00089 Caps(const Caps&);
00090 Caps& operator=(const Caps&);
00091
00092
00093 public:
00099 static Glib::RefPtr<Caps> create_any();
00100
00106 static Glib::RefPtr<Caps> create_simple(const Glib::ustring& media_type);
00107
00114 static Glib::RefPtr<Caps> create(Structure& first_struct);
00115
00116
00127 Glib::RefPtr<Caps> copy() const;
00128
00134 Glib::RefPtr<Caps> copy_nth(guint nth);
00135
00141 void append(const Glib::RefPtr<Caps>& caps);
00142
00151 void merge(const Glib::RefPtr<Caps>& caps);
00152
00158 void append_structure(Structure& structure);
00159
00165 void merge_structure(Structure& structure);
00166
00172 const Structure* get_structure(guint idx) const;
00173
00174
00179 void remove_structure(guint idx);
00180
00184 guint size() const;
00185
00192 void set_simple(const Glib::ustring& name, const Glib::ValueBase& value);
00193
00194
00201 void set_simple_valist(char* field, const va_list& varargs);
00202
00203
00207 bool is_any() const;
00208
00212 bool empty() const;
00213
00219 bool is_fixed() const;
00220
00229 bool equals(const Glib::RefPtr<Caps>& other_caps) const;
00230
00236 bool equals_fixed(const Glib::RefPtr<Caps>& other_caps) const;
00237
00244 bool is_always_compatible(const Glib::RefPtr<Caps>& other_caps) const;
00245
00252 bool is_subset(const Glib::RefPtr<Caps>& superset_caps) const;
00253
00259 Glib::RefPtr<Caps> get_intersect(const Glib::RefPtr<Caps>& other_caps) const;
00260
00266 Glib::RefPtr<Caps> get_union(const Glib::RefPtr<Caps>& other_caps) const;
00267
00273 Glib::RefPtr<Caps> normalize();
00274
00281 bool simplify();
00282
00287 xmlNodePtr save(const xmlNodePtr& parent) const;
00288
00293 static Glib::RefPtr<Caps> load(xmlNodePtr parent);
00294
00295
00306 Glib::ustring to_string() const;
00307
00308
00313 static Glib::RefPtr<Caps> from_string(const Glib::ustring& string);
00314
00315
00322 Glib::RefPtr<Caps> subtract(const Glib::RefPtr<const Caps>& subtrahend_caps);
00323
00327 Glib::RefPtr<Caps> make_writable();
00328
00332 void truncate();
00333
00334
00335 };
00336
00337 }
00338
00339
00340 namespace Glib
00341 {
00342
00351 Glib::RefPtr<Gst::Caps> wrap(GstCaps* object, bool take_copy = false);
00352
00353 }
00354
00355
00356 #endif
00357