index.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_INDEX_H
00004 #define _GSTREAMERMM_INDEX_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gst/gstindex.h>
00031 #include <gstreamermm/object.h>
00032 #include <gstreamermm/format.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GstIndex GstIndex;
00037 typedef struct _GstIndexClass GstIndexClass;
00038 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00039 
00040 
00041 namespace Gst
00042 { class Index_Class; } // namespace Gst
00043 namespace Gst
00044 {
00045 
00051 enum IndexCertainty
00052 {
00053   INDEX_UNKNOWN,
00054   INDEX_CERTAIN,
00055   INDEX_FUZZY
00056 };
00057 
00058 } // namespace Gst
00059 
00060 
00061 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00062 namespace Glib
00063 {
00064 
00065 template <>
00066 class Value<Gst::IndexCertainty> : public Glib::Value_Enum<Gst::IndexCertainty>
00067 {
00068 public:
00069   static GType value_type() G_GNUC_CONST;
00070 };
00071 
00072 } // namespace Glib
00073 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00074 
00075 
00076 namespace Gst
00077 {
00078 
00082 enum IndexEntryType
00083 {
00084   INDEX_ENTRY_ID,
00085   INDEX_ENTRY_ASSOCIATION,
00086   INDEX_ENTRY_OBJECT,
00087   INDEX_ENTRY_FORMAT
00088 };
00089 
00090 } // namespace Gst
00091 
00092 
00093 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00094 namespace Glib
00095 {
00096 
00097 template <>
00098 class Value<Gst::IndexEntryType> : public Glib::Value_Enum<Gst::IndexEntryType>
00099 {
00100 public:
00101   static GType value_type() G_GNUC_CONST;
00102 };
00103 
00104 } // namespace Glib
00105 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00106 
00107 
00108 namespace Gst
00109 {
00110 
00114 enum IndexLookupMethod
00115 {
00116   INDEX_LOOKUP_EXACT,
00117   INDEX_LOOKUP_BEFORE,
00118   INDEX_LOOKUP_AFTER
00119 };
00120 
00121 } // namespace Gst
00122 
00123 
00124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00125 namespace Glib
00126 {
00127 
00128 template <>
00129 class Value<Gst::IndexLookupMethod> : public Glib::Value_Enum<Gst::IndexLookupMethod>
00130 {
00131 public:
00132   static GType value_type() G_GNUC_CONST;
00133 };
00134 
00135 } // namespace Glib
00136 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00137 
00138 
00139 namespace Gst
00140 {
00141 
00153 enum AssocFlags
00154 {
00155   ASSOCIATION_FLAG_NONE = 0,
00156   ASSOCIATION_FLAG_KEY_UNIT = 1 << 0,
00157   ASSOCIATION_FLAG_DELTA_UNIT = 1 << 1,
00158   ASSOCIATION_FLAG_LAST = 1 << 8
00159 };
00160 
00162 inline AssocFlags operator|(AssocFlags lhs, AssocFlags rhs)
00163   { return static_cast<AssocFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00164 
00166 inline AssocFlags operator&(AssocFlags lhs, AssocFlags rhs)
00167   { return static_cast<AssocFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00168 
00170 inline AssocFlags operator^(AssocFlags lhs, AssocFlags rhs)
00171   { return static_cast<AssocFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00172 
00174 inline AssocFlags operator~(AssocFlags flags)
00175   { return static_cast<AssocFlags>(~static_cast<unsigned>(flags)); }
00176 
00178 inline AssocFlags& operator|=(AssocFlags& lhs, AssocFlags rhs)
00179   { return (lhs = static_cast<AssocFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00180 
00182 inline AssocFlags& operator&=(AssocFlags& lhs, AssocFlags rhs)
00183   { return (lhs = static_cast<AssocFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00184 
00186 inline AssocFlags& operator^=(AssocFlags& lhs, AssocFlags rhs)
00187   { return (lhs = static_cast<AssocFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00188 
00189 } // namespace Gst
00190 
00191 
00192 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00193 namespace Glib
00194 {
00195 
00196 template <>
00197 class Value<Gst::AssocFlags> : public Glib::Value_Flags<Gst::AssocFlags>
00198 {
00199 public:
00200   static GType value_type() G_GNUC_CONST;
00201 };
00202 
00203 } // namespace Glib
00204 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00205 
00206 
00207 namespace Gst
00208 {
00209 
00213 enum IndexResolverMethod
00214 {
00215   INDEX_RESOLVER_CUSTOM,
00216   INDEX_RESOLVER_GTYPE,
00217   INDEX_RESOLVER_PATH
00218 };
00219 
00220 } // namespace Gst
00221 
00222 
00223 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00224 namespace Glib
00225 {
00226 
00227 template <>
00228 class Value<Gst::IndexResolverMethod> : public Glib::Value_Enum<Gst::IndexResolverMethod>
00229 {
00230 public:
00231   static GType value_type() G_GNUC_CONST;
00232 };
00233 
00234 } // namespace Glib
00235 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00236 
00237 
00238 namespace Gst
00239 {
00240 
00244 enum IndexFlags
00245 {
00246   INDEX_WRITABLE = GST_OBJECT_FLAG_LAST << 0,
00247   INDEX_READABLE = GST_OBJECT_FLAG_LAST << 1,
00248   INDEX_FLAG_LAST = GST_OBJECT_FLAG_LAST << 8
00249 };
00250 
00251 } // namespace Gst
00252 
00253 
00254 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00255 namespace Glib
00256 {
00257 
00258 template <>
00259 class Value<Gst::IndexFlags> : public Glib::Value_Enum<Gst::IndexFlags>
00260 {
00261 public:
00262   static GType value_type() G_GNUC_CONST;
00263 };
00264 
00265 } // namespace Glib
00266 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00267 
00268 
00269 namespace Gst
00270 {
00271 
00272 
00275 class IndexEntry
00276 {
00277   public:
00278 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00279   typedef IndexEntry CppObjectType;
00280   typedef GstIndexEntry BaseObjectType;
00281 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00282 
00283   IndexEntry();
00284 
00285   // Use make_a_copy=true when getting it directly from a struct.
00286   explicit IndexEntry(GstIndexEntry* castitem, bool make_a_copy = false);
00287 
00288   IndexEntry(const IndexEntry& src);
00289   IndexEntry& operator=(const IndexEntry& src);
00290 
00291   ~IndexEntry();
00292 
00293   GstIndexEntry*       gobj()       { return gobject_; }
00294   const GstIndexEntry* gobj() const { return gobject_; }
00295 
00297   GstIndexEntry* gobj_copy() const;
00298 
00299 protected:
00300   GstIndexEntry* gobject_;
00301 
00302 private:
00303 
00304 public:
00305   
00312   bool assoc_map(Format format, gint64& value) const;
00313 
00314 
00315 };
00316 
00319 class IndexGroup
00320 {
00321   public:
00322 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00323   typedef IndexGroup CppObjectType;
00324   typedef GstIndexGroup BaseObjectType;
00325 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00326 
00327 private:
00328 
00329 
00330 };
00331 
00334 class IndexAssociation
00335 {
00336   public:
00337 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00338   typedef IndexAssociation CppObjectType;
00339   typedef GstIndexAssociation BaseObjectType;
00340 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00341 
00342 private:
00343 
00344 
00345 };
00346 
00347 
00351 class Index : public Object 
00352 {
00353   
00354 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00355 
00356 public:
00357   typedef Index CppObjectType;
00358   typedef Index_Class CppClassType;
00359   typedef GstIndex BaseObjectType;
00360   typedef GstIndexClass BaseClassType;
00361 
00362 private:  friend class Index_Class;
00363   static CppClassType index_class_;
00364 
00365 private:
00366   // noncopyable
00367   Index(const Index&);
00368   Index& operator=(const Index&);
00369 
00370 protected:
00371   explicit Index(const Glib::ConstructParams& construct_params);
00372   explicit Index(GstIndex* castitem);
00373 
00374 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00375 
00376 public:
00377   virtual ~Index();
00378 
00379 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00380   static GType get_type()      G_GNUC_CONST;
00381   static GType get_base_type() G_GNUC_CONST;
00382 #endif
00383 
00385   GstIndex*       gobj()       { return reinterpret_cast<GstIndex*>(gobject_); }
00386 
00388   const GstIndex* gobj() const { return reinterpret_cast<GstIndex*>(gobject_); }
00389 
00391   GstIndex* gobj_copy();
00392 
00393 private:
00394 
00395 
00396 protected:
00397   Index();
00398 
00399 public:
00400   
00401   bool is_readable() const;
00402   
00403   bool is_writable() const;
00404   
00410   void commit(int id);
00411   
00415   gint get_group() const;
00416   
00421   gint new_group();
00422   
00428   bool set_group(int group_number);
00429   
00433   void set_certainty(IndexCertainty certainty);
00434   
00438   IndexCertainty set_certainty() const;
00439   
00451   bool get_writer_id(const Glib::RefPtr<Gst::Object>& writer, int& id) const;
00452   
00460   IndexEntry add_format(int id, Format format);
00461   
00469   IndexEntry add_association(int id, AssocFlags flags, int n, const IndexAssociation& list);
00470   
00476   IndexEntry add_id(int id, const Glib::ustring& description);
00477 
00478   //TODO: Reorder parameters to allow default values?
00479   
00489   IndexEntry get_assoc_entry(int id, IndexLookupMethod method, AssocFlags flags, Format format, gint64 value) const;
00490 
00496   typedef sigc::slot<bool, const Glib::RefPtr<Index>&, IndexEntry> SlotFilter;
00497 
00498   void set_filter(const SlotFilter& slot);
00499 
00506   typedef sigc::slot<bool, const Glib::RefPtr<Index>&, const Glib::RefPtr<Gst::Object>&, Glib::ustring&> SlotResolver;
00507 
00508   void set_resolver(const SlotResolver& slot);
00509 
00510   
00516   Glib::SignalProxy1< void,const IndexEntry& > signal_entry_added();
00517 
00518 
00519   #ifdef GLIBMM_PROPERTIES_ENABLED
00520 
00526   Glib::PropertyProxy<Gst::Index::SlotResolver> property_resolver() ;
00527 #endif //#GLIBMM_PROPERTIES_ENABLED
00528 
00529 #ifdef GLIBMM_PROPERTIES_ENABLED
00530 
00536   Glib::PropertyProxy_ReadOnly<Gst::Index::SlotResolver> property_resolver() const;
00537 #endif //#GLIBMM_PROPERTIES_ENABLED
00538 
00539 
00540 public:
00541 
00542 public:
00543   //C++ methods used to invoke GTK+ virtual functions:
00544 #ifdef GLIBMM_VFUNCS_ENABLED
00545 #endif //GLIBMM_VFUNCS_ENABLED
00546 
00547 protected:
00548   //GTK+ Virtual Functions (override these to change behaviour):
00549 #ifdef GLIBMM_VFUNCS_ENABLED
00550 #endif //GLIBMM_VFUNCS_ENABLED
00551 
00552   //Default Signal Handlers::
00553 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00554   virtual void on_entry_added(const IndexEntry& entry);
00555 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00556 
00557 
00558 };
00559 
00560 }//namespace Gst
00561 
00562 
00563 namespace Glib
00564 {
00565 
00574 Gst::IndexEntry wrap(GstIndexEntry* object, bool take_copy = false);
00575 
00576 } // namespace Glib
00577 
00578 
00579 namespace Glib
00580 {
00589   Glib::RefPtr<Gst::Index> wrap(GstIndex* object, bool take_copy = false);
00590 }
00591 
00592 
00593 #endif /* _GSTREAMERMM_INDEX_H */
00594 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4