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 #include <gst/gstplugin.h>
00029 #include <gstreamermm/object.h>
00030
00031
00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00033 typedef struct _GstPlugin GstPlugin;
00034 typedef struct _GstPluginClass GstPluginClass;
00035 #endif
00036
00037
00038 namespace Gst
00039 { class Plugin_Class; }
00040 namespace Gst
00041 {
00042
00049 class PluginError : public Glib::Error
00050 {
00051 public:
00052 enum Code
00053 {
00054 MODULE,
00055 DEPENDENCIES,
00056 NAME_MISMATCH
00057 };
00058
00059 PluginError(Code error_code, const Glib::ustring& error_message);
00060 explicit PluginError(GError* gobject);
00061 Code code() const;
00062
00063 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00064 private:
00065
00066 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00067 static void throw_func(GError* gobject);
00068 #else
00069
00070 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00071 #endif //GLIBMM_EXCEPTIONS_ENABLED
00072
00073 friend void wrap_init();
00074 #endif
00075 };
00076
00077 }
00078
00079 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00080 namespace Glib
00081 {
00082
00083 template <>
00084 class Value<Gst::PluginError::Code> : public Glib::Value_Enum<Gst::PluginError::Code>
00085 {
00086 public:
00087 static GType value_type() G_GNUC_CONST;
00088 };
00089
00090 }
00091 #endif
00092
00093
00094 namespace Gst
00095 {
00096
00097
00121 class Plugin : public Object
00122 {
00123
00124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00125
00126 public:
00127 typedef Plugin CppObjectType;
00128 typedef Plugin_Class CppClassType;
00129 typedef GstPlugin BaseObjectType;
00130 typedef GstPluginClass BaseClassType;
00131
00132 private: friend class Plugin_Class;
00133 static CppClassType plugin_class_;
00134
00135 private:
00136
00137 Plugin(const Plugin&);
00138 Plugin& operator=(const Plugin&);
00139
00140 protected:
00141 explicit Plugin(const Glib::ConstructParams& construct_params);
00142 explicit Plugin(GstPlugin* castitem);
00143
00144 #endif
00145
00146 public:
00147 virtual ~Plugin();
00148
00149 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00150 static GType get_type() G_GNUC_CONST;
00151 static GType get_base_type() G_GNUC_CONST;
00152 #endif
00153
00155 GstPlugin* gobj() { return reinterpret_cast<GstPlugin*>(gobject_); }
00156
00158 const GstPlugin* gobj() const { return reinterpret_cast<GstPlugin*>(gobject_); }
00159
00161 GstPlugin* gobj_copy();
00162
00163 private:
00164
00165
00166 public:
00172 typedef sigc::slot< bool, const Glib::RefPtr<Gst::Plugin>& > SlotInit;
00173
00179 typedef sigc::slot< bool, const Glib::RefPtr<Gst::Plugin>& > SlotFilter;
00180
00181
00182 static Glib::QueryQuark error_quark();
00183
00187 Glib::ustring get_name() const;
00188
00192 Glib::ustring get_description() const;
00193
00197 Glib::ustring get_filename() const;
00198
00202 Glib::ustring get_license() const;
00203
00207 Glib::ustring get_package() const;
00208
00212 Glib::ustring get_origin() const;
00213
00217 Glib::ustring get_source() const;
00218
00222 Glib::ustring get_version() const;
00223
00224
00230 GModule* get_module();
00231
00237 const GModule* get_module() const;
00238
00239
00243 bool is_loaded() const;
00244
00253 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00254 static Glib::RefPtr<Gst::Plugin> load_file(const Glib::ustring& filename);
00255 #else
00256 static Glib::RefPtr<Gst::Plugin> load_file(const Glib::ustring& filename, std::auto_ptr<Glib::Error>& error);
00257 #endif //GLIBMM_EXCEPTIONS_ENABLED
00258
00259
00272 Glib::RefPtr<Gst::Plugin> load();
00273
00278 static Glib::RefPtr<Gst::Plugin> load_by_name(const Glib::ustring& name);
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297 public:
00298
00299 public:
00300
00301 #ifdef GLIBMM_VFUNCS_ENABLED
00302 #endif //GLIBMM_VFUNCS_ENABLED
00303
00304 protected:
00305
00306 #ifdef GLIBMM_VFUNCS_ENABLED
00307 #endif //GLIBMM_VFUNCS_ENABLED
00308
00309
00310 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00311 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00312
00313
00314 };
00315
00316 }
00317
00318
00319 namespace Glib
00320 {
00329 Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
00330 }
00331
00332
00333 #endif
00334