gstreamermm: registry.h Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files

# registry.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_REGISTRY_H
    00004 #define _GSTREAMERMM_REGISTRY_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00026  */
    00027
    00028 #include <gst/gstregistry.h>
    00029 #include <gstreamermm/object.h>
    00030 #include <gstreamermm/plugin.h>
    00031 #include <gstreamermm/pluginfeature.h>
    00032
    00033
    00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00035 typedef struct _GstRegistry GstRegistry;
    00036 typedef struct _GstRegistryClass GstRegistryClass;
    00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00038
    00039
    00040 namespace Gst
    00041 { class Registry_Class; } // namespace Gst
    00042 namespace Gst
    00043 {
    00044
    00045 class Plugin;
    00046 class PluginFeature;
    00047
    00104 class Registry : public Object
    00105 {
    00106
    00107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00108
    00109 public:
    00110   typedef Registry CppObjectType;
    00111   typedef Registry_Class CppClassType;
    00112   typedef GstRegistry BaseObjectType;
    00113   typedef GstRegistryClass BaseClassType;
    00114
    00115 private:  friend class Registry_Class;
    00116   static CppClassType registry_class_;
    00117
    00118 private:
    00119   // noncopyable
    00120   Registry(const Registry&);
    00121   Registry& operator=(const Registry&);
    00122
    00123 protected:
    00124   explicit Registry(const Glib::ConstructParams& construct_params);
    00125   explicit Registry(GstRegistry* castitem);
    00126
    00127 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00128
    00129 public:
    00130   virtual ~Registry();
    00131
    00132 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00133   static GType get_type()      G_GNUC_CONST;
    00134   static GType get_base_type() G_GNUC_CONST;
    00135 #endif
    00136
    00138   GstRegistry*       gobj()       { return reinterpret_cast<GstRegistry*>(gobject_); }
    00139
    00141   const GstRegistry* gobj() const { return reinterpret_cast<GstRegistry*>(gobject_); }
    00142
    00144   GstRegistry* gobj_copy();
    00145
    00146 private:
    00147
    00148
    00149 public:
    00150
    00155   static Glib::RefPtr<Gst::Registry> get_default();
    00156
    00157
    00165   Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(GType type);
    00166
    00167
    00175   Glib::ListHandle< Glib::RefPtr<const Gst::PluginFeature> > get_feature_list(GType type) const;
    00176
    00177
    00183   Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(const Glib::ustring& name);
    00184
    00190   Glib::ListHandle< Glib::RefPtr<const Gst::PluginFeature> > get_feature_list(const Glib::ustring& name) const;
    00191
    00192
    00198   Glib::ListHandle< Glib::ustring > get_path_list() const;
    00199
    00200
    00207   Glib::ListHandle< Glib::RefPtr<Gst::Plugin> > get_plugin_list();
    00208
    00209
    00216   Glib::ListHandle< Glib::RefPtr<const Gst::Plugin> > get_plugin_list() const;
    00217
    00218
    00226   bool add_plugin(const Glib::RefPtr<Gst::Plugin>& plugin);
    00227
    00233   void remove_plugin(const Glib::RefPtr<Gst::Plugin>& plugin);
    00234
    00244   Glib::ListHandle< Glib::RefPtr<Gst::Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first);
    00245
    00246
    00256   Glib::ListHandle< Glib::RefPtr<const Gst::Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first) const;
    00257
    00267   Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first);
    00268
    00269
    00279   Glib::ListHandle< Glib::RefPtr<const Gst::PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first) const;
    00280
    00281
    00290   Glib::RefPtr<Gst::Plugin> find_plugin(const Glib::ustring& name);
    00291
    00300   Glib::RefPtr<const Gst::Plugin> find_plugin(const Glib::ustring& name) const;
    00301
    00310   Glib::RefPtr<Gst::PluginFeature> find_feature(const Glib::ustring& name, GType type);
    00311
    00320   Glib::RefPtr<const Gst::PluginFeature> find_feature(const Glib::ustring& name, GType type) const;
    00321
    00329   Glib::RefPtr<Gst::PluginFeature> lookup_feature(const Glib::ustring& name);
    00330
    00338   Glib::RefPtr<const Gst::PluginFeature> lookup_feature(const Glib::ustring& name) const;
    00339
    00345   void add_path(const Glib::ustring& path);
    00346
    00353   void scan_path(const Glib::ustring& path);
    00354   // binary or xml registry cache depends on USE_BINARY_REGISTRY def in
    00355   // gstregistry.h
    00356
    00357 #ifdef USE_BINARY_REGISTRY
    00358
    00363   bool binary_read_cache(const Glib::ustring& location);
    00364
    00365
    00371   void binary_write_cache(const Glib::ustring& location) const;
    00372 #else
    00373
    00378   bool xml_read_cache(const Glib::ustring& location);
    00379
    00380
    00387   bool xml_write_cache(const Glib::ustring& location) const;
    00388
    00389 #endif
    00390
    00391
    00398   Glib::RefPtr<Gst::Plugin> lookup(const Glib::ustring& filename);
    00399
    00406   Glib::RefPtr<const Gst::Plugin> lookup(const Glib::ustring& filename) const;
    00407
    00413   void remove_feature(const Glib::RefPtr<Gst::PluginFeature>& feature);
    00414
    00422   void add_feature(const Glib::RefPtr<Gst::PluginFeature>& feature);
    00423
    00434   static bool check_feature_version(const Glib::ustring& feature_name, guint min_major, guint min_minor, guint min_micro);
    00435
    00436
    00444   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::PluginFeature>& > signal_feature_added();
    00445
    00446
    00454   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Plugin>& > signal_plugin_added();
    00455
    00456
    00457 public:
    00458
    00459 public:
    00460   //C++ methods used to invoke GTK+ virtual functions:
    00461 #ifdef GLIBMM_VFUNCS_ENABLED
    00462 #endif //GLIBMM_VFUNCS_ENABLED
    00463
    00464 protected:
    00465   //GTK+ Virtual Functions (override these to change behaviour):
    00466 #ifdef GLIBMM_VFUNCS_ENABLED
    00467 #endif //GLIBMM_VFUNCS_ENABLED
    00468
    00469   //Default Signal Handlers::
    00470 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00471   virtual void on_feature_added(const Glib::RefPtr<Gst::PluginFeature>& feature);
    00472   virtual void on_plugin_added(const Glib::RefPtr<Gst::Plugin>& plugin);
    00473 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00474
    00475
    00476 };
    00477
    00478 } // namespace Gst
    00479
    00480
    00481 namespace Glib
    00482 {
    00491   Glib::RefPtr<Gst::Registry> wrap(GstRegistry* object, bool take_copy = false);
    00492 }
    00493
    00494
    00495 #endif /* _GSTREAMERMM_REGISTRY_H */
    00496