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
00100
00101
00125 class Plugin : public Object
00126 {
00127
00128 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00129
00130 public:
00131 typedef Plugin CppObjectType;
00132 typedef Plugin_Class CppClassType;
00133 typedef GstPlugin BaseObjectType;
00134 typedef GstPluginClass BaseClassType;
00135
00136 private: friend class Plugin_Class;
00137 static CppClassType plugin_class_;
00138
00139 private:
00140
00141 Plugin(const Plugin&);
00142 Plugin& operator=(const Plugin&);
00143
00144 protected:
00145 explicit Plugin(const Glib::ConstructParams& construct_params);
00146 explicit Plugin(GstPlugin* castitem);
00147
00148 #endif
00149
00150 public:
00151 virtual ~Plugin();
00152
00153 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00154 static GType get_type() G_GNUC_CONST;
00155 static GType get_base_type() G_GNUC_CONST;
00156 #endif
00157
00159 GstPlugin* gobj() { return reinterpret_cast<GstPlugin*>(gobject_); }
00160
00162 const GstPlugin* gobj() const { return reinterpret_cast<GstPlugin*>(gobject_); }
00163
00165 GstPlugin* gobj_copy();
00166
00167 private:
00168
00169
00170 public:
00176 typedef sigc::slot< bool, const Glib::RefPtr<Plugin>& > SlotFilter;
00177
00178
00179 static Glib::QueryQuark error_quark();
00180
00184 Glib::ustring get_name() const;
00185
00189 Glib::ustring get_description() const;
00190
00194 Glib::ustring get_filename() const;
00195
00199 Glib::ustring get_license() const;
00200
00204 Glib::ustring get_package() const;
00205
00209 Glib::ustring get_origin() const;
00210
00214 Glib::ustring get_source() const;
00215
00219 Glib::ustring get_version() const;
00220
00221
00227 GModule* get_module() const;
00228
00229
00233 bool is_loaded() const;
00234
00243 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00244 static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename);
00245 #else
00246 static Glib::RefPtr<Plugin> load_file(const Glib::ustring& filename, std::auto_ptr<Glib::Error>& error);
00247 #endif //GLIBMM_EXCEPTIONS_ENABLED
00248
00249
00262 Glib::RefPtr<Plugin> load();
00263
00268 static Glib::RefPtr<Plugin> load_by_name(const Glib::ustring& name);
00269
00270
00274 static void free(Glib::ListHandle< Glib::RefPtr<Plugin> >);
00275
00276
00277 public:
00278
00279 public:
00280
00281 #ifdef GLIBMM_VFUNCS_ENABLED
00282 #endif //GLIBMM_VFUNCS_ENABLED
00283
00284 protected:
00285
00286 #ifdef GLIBMM_VFUNCS_ENABLED
00287 #endif //GLIBMM_VFUNCS_ENABLED
00288
00289
00290 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00291 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00292
00293
00294 };
00295
00296 }
00297
00298
00299 namespace Glib
00300 {
00309 Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
00310 }
00311
00312
00313 #endif
00314