00001
00002
00003 #ifndef _GSTREAMERMM_PLUGIN_H
00004 #define _GSTREAMERMM_PLUGIN_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/gstplugin.h>
00031 #include <gstreamermm/object.h>
00032
00033
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GstPlugin GstPlugin;
00036 typedef struct _GstPluginClass GstPluginClass;
00037 #endif
00038
00039
00040 namespace Gst
00041 { class Plugin_Class; }
00042 namespace Gst
00043 {
00044
00051 class PluginError : public Glib::Error
00052 {
00053 public:
00054 enum Code
00055 {
00056 MODULE,
00057 DEPENDENCIES,
00058 NAME_MISMATCH
00059 };
00060
00061 PluginError(Code error_code, const Glib::ustring& error_message);
00062 explicit PluginError(GError* gobject);
00063 Code code() const;
00064
00065 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00066 private:
00067
00068 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00069 static void throw_func(GError* gobject);
00070 #else
00071
00072 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00073 #endif //GLIBMM_EXCEPTIONS_ENABLED
00074
00075 friend void wrap_init();
00076 #endif
00077 };
00078
00079 }
00080
00081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00082 namespace Glib
00083 {
00084
00085 template <>
00086 class Value<Gst::PluginError::Code> : public Glib::Value_Enum<Gst::PluginError::Code>
00087 {
00088 public:
00089 static GType value_type() G_GNUC_CONST;
00090 };
00091
00092 }
00093 #endif
00094
00095
00096 namespace Gst
00097 {
00098
00099
00124 class Plugin : public Object
00125 {
00126
00127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00128
00129 public:
00130 typedef Plugin CppObjectType;
00131 typedef Plugin_Class CppClassType;
00132 typedef GstPlugin BaseObjectType;
00133 typedef GstPluginClass BaseClassType;
00134
00135 private: friend class Plugin_Class;
00136 static CppClassType plugin_class_;
00137
00138 private:
00139
00140 Plugin(const Plugin&);
00141 Plugin& operator=(const Plugin&);
00142
00143 protected:
00144 explicit Plugin(const Glib::ConstructParams& construct_params);
00145 explicit Plugin(GstPlugin* castitem);
00146
00147 #endif
00148
00149 public:
00150 virtual ~Plugin();
00151
00152 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00153 static GType get_type() G_GNUC_CONST;
00154 static GType get_base_type() G_GNUC_CONST;
00155 #endif
00156
00158 GstPlugin* gobj() { return reinterpret_cast<GstPlugin*>(gobject_); }
00159
00161 const GstPlugin* gobj() const { return reinterpret_cast<GstPlugin*>(gobject_); }
00162
00164 GstPlugin* gobj_copy();
00165
00166 private:
00167
00168
00169 public:
00175 typedef sigc::slot< bool, const Glib::RefPtr<Plugin>& > SlotInit;
00176
00182 typedef sigc::slot< bool, const Glib::RefPtr<Plugin>& > SlotFilter;
00183
00184
00185 static Glib::QueryQuark error_quark();
00186
00190 Glib::ustring get_name() const;
00191
00195 Glib::ustring get_description() const;
00196
00200 Glib::ustring get_filename() const;
00201
00205 Glib::ustring get_license() const;
00206
00210 Glib::ustring get_package() const;
00211
00215 Glib::ustring get_origin() const;
00216
00220 Glib::ustring get_source() const;
00221
00225 Glib::ustring get_version() const;
00226
00227
00233 GModule* get_module() const;
00234
00235
00239 bool is_loaded() const;
00240
00249 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00250 static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename);
00251 #else
00252 static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename, std::auto_ptr<Glib::Error>& error);
00253 #endif //GLIBMM_EXCEPTIONS_ENABLED
00254
00255
00268 Glib::RefPtr<Plugin> load();
00269
00274 static Glib::RefPtr<Plugin> load_by_name(const Glib::ustring& name);
00275
00276
00280 static void free(Glib::ListHandle< Glib::RefPtr<Plugin> >);
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295 public:
00296
00297 public:
00298
00299 #ifdef GLIBMM_VFUNCS_ENABLED
00300 #endif //GLIBMM_VFUNCS_ENABLED
00301
00302 protected:
00303
00304 #ifdef GLIBMM_VFUNCS_ENABLED
00305 #endif //GLIBMM_VFUNCS_ENABLED
00306
00307
00308 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00309 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00310
00311
00312 };
00313
00314 }
00315
00316
00317 namespace Glib
00318 {
00327 Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
00328 }
00329
00330
00331 #endif
00332