00001
00002
00003 #ifndef _GSTREAMERMM_TAGSETTER_H
00004 #define _GSTREAMERMM_TAGSETTER_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/gsttagsetter.h>
00031 #include <glibmm/interface.h>
00032 #include <gstreamermm/enums.h>
00033 #include <gstreamermm/taglist.h>
00034
00035
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GstTagSetter GstTagSetter;
00038 typedef struct _GstTagSetterClass GstTagSetterClass;
00039 #endif
00040
00041
00042 namespace Gst
00043 { class TagSetter_Class; }
00044 namespace Gst
00045 {
00046
00062 class TagSetter : public Glib::Interface
00063 {
00064
00065 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00066
00067 public:
00068 typedef TagSetter CppObjectType;
00069 typedef TagSetter_Class CppClassType;
00070 typedef GstTagSetter BaseObjectType;
00071 typedef GstTagSetterIFace BaseClassType;
00072
00073 private:
00074 friend class TagSetter_Class;
00075 static CppClassType tagsetter_class_;
00076
00077
00078 TagSetter(const TagSetter&);
00079 TagSetter& operator=(const TagSetter&);
00080
00081 protected:
00082 TagSetter();
00083
00090 explicit TagSetter(const Glib::Interface_Class& interface_class);
00091
00092 public:
00093
00094
00095
00096 explicit TagSetter(GstTagSetter* castitem);
00097
00098 protected:
00099 #endif
00100
00101 public:
00102 virtual ~TagSetter();
00103
00104 static void add_interface(GType gtype_implementer);
00105
00106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00107 static GType get_type() G_GNUC_CONST;
00108 static GType get_base_type() G_GNUC_CONST;
00109 #endif
00110
00112 GstTagSetter* gobj() { return reinterpret_cast<GstTagSetter*>(gobject_); }
00113
00115 const GstTagSetter* gobj() const { return reinterpret_cast<GstTagSetter*>(gobject_); }
00116
00117 private:
00118
00119
00120 public:
00121
00126 void merge_tags(const Gst::TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND);
00127
00134 void add_tag(const Glib::ustring& tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND);
00135
00136
00144 template <class DataType>
00145 void add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
00146
00153 void add_tag(const Glib::ustring& tag, const char* data, TagMergeMode mode=TAG_MERGE_PREPEND);
00154
00155
00160 Gst::TagList get_tag_list();
00161
00167 void set_tag_merge_mode(TagMergeMode mode);
00168
00173 TagMergeMode qet_tag_merge_mode();
00174
00175
00176
00177
00178 public:
00179
00180 public:
00181
00182 #ifdef GLIBMM_VFUNCS_ENABLED
00183 #endif //GLIBMM_VFUNCS_ENABLED
00184
00185 protected:
00186
00187 #ifdef GLIBMM_VFUNCS_ENABLED
00188 #endif //GLIBMM_VFUNCS_ENABLED
00189
00190
00191 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00192 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00193
00194
00195 };
00196
00197 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00198
00199
00200
00201 template <class DataType>
00202 void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode)
00203 {
00204 typedef Glib::Value<DataType> ValueType;
00205
00206 ValueType value;
00207 value.init(ValueType::value_type());
00208 value.set(data);
00209 this->add_tag(tag, (Glib::ValueBase)(value), mode);
00210 }
00211
00212 #endif
00213
00214 }
00215
00216
00217 namespace Glib
00218 {
00227 Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
00228
00229 }
00230
00231
00232 #endif
00233