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<Gst::Registry> get_default();
00158
00159
00167 Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(GType type);
00168
00174 Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(const Glib::ustring& name);
00175
00176
00182 Glib::ListHandle< Glib::ustring > get_path_list();
00183
00184
00191 Glib::ListHandle< Glib::RefPtr<Gst::Plugin> > get_plugin_list();
00192
00193
00201 bool add_plugin(const Glib::RefPtr<Gst::Plugin>& plugin);
00202
00208 void remove_plugin(const Glib::RefPtr<Gst::Plugin>& plugin);
00209
00219 Glib::ListHandle< Glib::RefPtr<Gst::Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first);
00220
00221
00231 Glib::ListHandle< Glib::RefPtr<Gst::PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first);
00232
00233
00242 Glib::RefPtr<Gst::Plugin> find_plugin(const Glib::ustring& name);
00243
00252 Glib::RefPtr<Gst::PluginFeature> find_feature(const Glib::ustring& name, GType type);
00253
00261 Glib::RefPtr<Gst::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
00288
00294 void binary_write_cache(const Glib::ustring& location);
00295 #else
00296
00301 bool xml_read_cache(const Glib::ustring& location);
00302
00303
00310 bool xml_write_cache(const Glib::ustring& location);
00311
00312 #endif
00313
00314
00321 Glib::RefPtr<Gst::Plugin> lookup(const Glib::ustring& filename);
00322
00328 void remove_feature(const Glib::RefPtr<Gst::PluginFeature>& feature);
00329
00337 void add_feature(const Glib::RefPtr<Gst::PluginFeature>& feature);
00338
00349 static bool check_feature_version(const Glib::ustring& feature_name, guint min_major, guint min_minor, guint min_micro);
00350
00351
00359 Glib::SignalProxy1< void,const Glib::RefPtr<Gst::PluginFeature>& > signal_feature_added();
00360
00361
00369 Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Plugin>& > signal_plugin_added();
00370
00371
00372 public:
00373
00374 public:
00375
00376 #ifdef GLIBMM_VFUNCS_ENABLED
00377 #endif //GLIBMM_VFUNCS_ENABLED
00378
00379 protected:
00380
00381 #ifdef GLIBMM_VFUNCS_ENABLED
00382 #endif //GLIBMM_VFUNCS_ENABLED
00383
00384
00385 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00386 virtual void on_feature_added(const Glib::RefPtr<Gst::PluginFeature>& feature);
00387 virtual void on_plugin_added(const Glib::RefPtr<Gst::Plugin>& plugin);
00388 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00389
00390
00391 };
00392
00393 }
00394
00395
00396 namespace Glib
00397 {
00406 Glib::RefPtr<Gst::Registry> wrap(GstRegistry* object, bool take_copy = false);
00407 }
00408
00409
00410 #endif
00411