- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# plugin.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_PLUGIN_H
    00004 #define _GSTREAMERMM_PLUGIN_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    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 /* DOXYGEN_SHOULD_SKIP_THIS */
    00036
    00037
    00038 namespace Gst
    00039 { class Plugin_Class; } // namespace Gst
    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   //When not using exceptions, we just pass the Exception object around without throwing it:
    00070   static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
    00071 #endif //GLIBMM_EXCEPTIONS_ENABLED
    00072
    00073   friend void wrap_init(); // uses throw_func()
    00074 #endif
    00075 };
    00076
    00077 } // namespace Gst
    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 } // namespace Glib
    00091 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    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   // noncopyable
    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 /* DOXYGEN_SHOULD_SKIP_THIS */
    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   // Don't wrap gst_plugin_list_free because Glib::ListHandle<> already takes
    00281   // care of freeing.
    00282
    00283
    00284 //TODO: Include if bug #545787 is accepted; remove if not.
    00285 /*
    00286   bool register_static(int major_version, int minor_version,
    00287     const Glib::ustring& name, const Glib::ustring& description,
    00288     const SlotInit& init_slot, const Glib::ustring& version,
    00289     const Glib::ustring& license, const Glib::ustring& source,
    00290     const Glib::ustring& package, const Glib::ustring& origin);
    00291 */
    00292
    00293   //gst_plugin_name_filter is a C API convenience function which tells if a
    00294   //plugin has a given name so ignore it.
    00295
    00296
    00297 public:
    00298
    00299 public:
    00300   //C++ methods used to invoke GTK+ virtual functions:
    00301 #ifdef GLIBMM_VFUNCS_ENABLED
    00302 #endif //GLIBMM_VFUNCS_ENABLED
    00303
    00304 protected:
    00305   //GTK+ Virtual Functions (override these to change behaviour):
    00306 #ifdef GLIBMM_VFUNCS_ENABLED
    00307 #endif //GLIBMM_VFUNCS_ENABLED
    00308
    00309   //Default Signal Handlers::
    00310 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00311 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00312
    00313
    00314 };
    00315
    00316 } // namespace Gst
    00317
    00318
    00319 namespace Glib
    00320 {
    00329   Glib::RefPtr<Gst::Plugin> wrap(GstPlugin* object, bool take_copy = false);
    00330 }
    00331
    00332
    00333 #endif /* _GSTREAMERMM_PLUGIN_H */
    00334