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
00120 class Plugin : public Object
00121 {
00122
00123 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00124
00125 public:
00126 typedef Plugin CppObjectType;
00127 typedef Plugin_Class CppClassType;
00128 typedef GstPlugin BaseObjectType;
00129 typedef GstPluginClass BaseClassType;
00130
00131 private: friend class Plugin_Class;
00132 static CppClassType plugin_class_;
00133
00134 private:
00135
00136 Plugin(const Plugin&);
00137 Plugin& operator=(const Plugin&);
00138
00139 protected:
00140 explicit Plugin(const Glib::ConstructParams& construct_params);
00141 explicit Plugin(GstPlugin* castitem);
00142
00143 #endif
00144
00145 public:
00146 virtual ~Plugin();
00147
00148 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00149 static GType get_type() G_GNUC_CONST;
00150 static GType get_base_type() G_GNUC_CONST;
00151 #endif
00152
00154 GstPlugin* gobj() { return reinterpret_cast<GstPlugin*>(gobject_); }
00155
00157 const GstPlugin* gobj() const { return reinterpret_cast<GstPlugin*>(gobject_); }
00158
00160 GstPlugin* gobj_copy();
00161
00162 private:
00163
00164
00165 public:
00171 typedef sigc::slot< bool, const Glib::RefPtr<Gst::Plugin>& > SlotInit;
00172
00178 typedef sigc::slot< bool, const Glib::RefPtr<Gst::Plugin>& > SlotFilter;
00179
00180
00181 static Glib::QueryQuark error_quark();
00182
00186 Glib::ustring get_name() const;
00187
00191 Glib::ustring get_description() const;
00192
00196 Glib::ustring get_filename() const;
00197
00201 Glib::ustring get_license() const;
00202
00206 Glib::ustring get_package() const;
00207
00211 Glib::ustring get_origin() const;
00212
00216 Glib::ustring get_source() const;
00217
00221 Glib::ustring get_version() const;
00222
00223
00229 GModule* get_module();
00230
00236 const GModule* get_module() const;
00237
00238
00242 bool is_loaded() const;
00243
00252 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00253 static Glib::RefPtr<Gst::Plugin> load_file(const Glib::ustring& filename);
00254 #else
00255 static Glib::RefPtr<Gst::Plugin> load_file(const Glib::ustring& filename, std::auto_ptr<Glib::Error>& error);
00256 #endif //GLIBMM_EXCEPTIONS_ENABLED
00257
00258
00271 Glib::RefPtr<Gst::Plugin> load();
00272
00277 static Glib::RefPtr<Gst::Plugin> load_by_name(const Glib::ustring& name);
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296 public:
00297
00298 public:
00299
00300 #ifdef GLIBMM_VFUNCS_ENABLED
00301 #endif //GLIBMM_VFUNCS_ENABLED
00302
00303 protected:
00304
00305 #ifdef GLIBMM_VFUNCS_ENABLED
00306 #endif //GLIBMM_VFUNCS_ENABLED
00307
00308
00309 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00310 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00311
00312
00313 };
00314
00315 }
00316
00317
00318 namespace Glib
00319 {
00328 Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
00329 }
00330
00331
00332 #endif
00333