00001
00002
00003 #ifndef _GSTREAMERMM_REGISTRY_H
00004 #define _GSTREAMERMM_REGISTRY_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/gstregistry.h>
00031 #include <gstreamermm/object.h>
00032 #include <gstreamermm/plugin.h>
00033 #include <gstreamermm/pluginfeature.h>
00034
00035
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GstRegistry GstRegistry;
00038 typedef struct _GstRegistryClass GstRegistryClass;
00039 #endif
00040
00041
00042 namespace Gst
00043 { class Registry_Class; }
00044 namespace Gst
00045 {
00046
00047 class Plugin;
00048 class PluginFeature;
00049
00106 class Registry : public Object
00107 {
00108
00109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00110
00111 public:
00112 typedef Registry CppObjectType;
00113 typedef Registry_Class CppClassType;
00114 typedef GstRegistry BaseObjectType;
00115 typedef GstRegistryClass BaseClassType;
00116
00117 private: friend class Registry_Class;
00118 static CppClassType registry_class_;
00119
00120 private:
00121
00122 Registry(const Registry&);
00123 Registry& operator=(const Registry&);
00124
00125 protected:
00126 explicit Registry(const Glib::ConstructParams& construct_params);
00127 explicit Registry(GstRegistry* castitem);
00128
00129 #endif
00130
00131 public:
00132 virtual ~Registry();
00133
00134 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00135 static GType get_type() G_GNUC_CONST;
00136 static GType get_base_type() G_GNUC_CONST;
00137 #endif
00138
00140 GstRegistry* gobj() { return reinterpret_cast<GstRegistry*>(gobject_); }
00141
00143 const GstRegistry* gobj() const { return reinterpret_cast<GstRegistry*>(gobject_); }
00144
00146 GstRegistry* gobj_copy();
00147
00148 private:
00149
00150
00151 public:
00152
00157 static Glib::RefPtr<Registry> get_default();
00158
00159
00167 Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(GType type);
00168
00173 Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(const Glib::ustring& name);
00174
00175
00176
00177
00183 Glib::ListHandle< Glib::ustring > get_path_list();
00184
00185
00192 Glib::ListHandle< Glib::RefPtr<Plugin> > get_plugin_list();
00193
00194
00202 bool add_plugin(const Glib::RefPtr<Plugin>& plugin);
00203
00209 void remove_plugin(const Glib::RefPtr<Plugin>& plugin);
00210
00220 Glib::ListHandle< Glib::RefPtr<Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first);
00221
00231 Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first);
00232
00233
00242 Glib::RefPtr<Plugin> find_plugin(const Glib::ustring& name);
00243
00252 Glib::RefPtr<PluginFeature> find_feature(const Glib::ustring& name, GType type);
00253
00261 Glib::RefPtr<PluginFeature> lookup_feature(const Glib::ustring& name);
00262
00268 void add_path(const Glib::ustring& path);
00269
00276 void scan_path(const Glib::ustring& path);
00277
00278
00279
00280 #ifdef USE_BINARY_REGISTRY
00281
00286 bool binary_read_cache(const Glib::ustring& location);
00287
00293 void binary_write_cache(const Glib::ustring& location);
00294 #else
00295
00300 bool xml_read_cache(const Glib::ustring& location);
00301
00308 bool xml_write_cache(const Glib::ustring& location);
00309 #endif
00310
00311
00318 Glib::RefPtr<Plugin> lookup(const Glib::ustring& filename);
00319
00325 void remove_feature(const Glib::RefPtr<PluginFeature>& feature);
00326
00334 void add_feature(const Glib::RefPtr<PluginFeature>& feature);
00335
00346 static bool check_feature_version(const Glib::ustring& feature_name, guint min_major, guint min_minor, guint min_micro);
00347
00355 Glib::SignalProxy1< void,const Glib::RefPtr<PluginFeature>& > signal_feature_added();
00356
00357
00365 Glib::SignalProxy1< void,const Glib::RefPtr<Plugin>& > signal_plugin_added();
00366
00367
00368 public:
00369
00370 public:
00371
00372 #ifdef GLIBMM_VFUNCS_ENABLED
00373 #endif //GLIBMM_VFUNCS_ENABLED
00374
00375 protected:
00376
00377 #ifdef GLIBMM_VFUNCS_ENABLED
00378 #endif //GLIBMM_VFUNCS_ENABLED
00379
00380
00381 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00382 virtual void on_feature_added(const Glib::RefPtr<PluginFeature>& feature);
00383 virtual void on_plugin_added(const Glib::RefPtr<Plugin>& plugin);
00384 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00385
00386
00387 };
00388
00389 }
00390
00391
00392 namespace Glib
00393 {
00402 Glib::RefPtr<Gst::Registry> wrap(GstRegistry* object, bool take_copy = false);
00403 }
00404
00405
00406 #endif
00407