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 #include <gst/gsttagsetter.h>
00029 #include <glibmm/interface.h>
00030 #include <gstreamermm/enums.h>
00031 #include <gstreamermm/taglist.h>
00032
00033
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GstTagSetter GstTagSetter;
00036 typedef struct _GstTagSetterClass GstTagSetterClass;
00037 #endif
00038
00039
00040 namespace Gst
00041 { class TagSetter_Class; }
00042 namespace Gst
00043 {
00044
00061 class TagSetter : public Glib::Interface
00062 {
00063
00064 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00065
00066 public:
00067 typedef TagSetter CppObjectType;
00068 typedef TagSetter_Class CppClassType;
00069 typedef GstTagSetter BaseObjectType;
00070 typedef GstTagSetterIFace BaseClassType;
00071
00072 private:
00073 friend class TagSetter_Class;
00074 static CppClassType tagsetter_class_;
00075
00076
00077 TagSetter(const TagSetter&);
00078 TagSetter& operator=(const TagSetter&);
00079
00080 protected:
00081 TagSetter();
00082
00089 explicit TagSetter(const Glib::Interface_Class& interface_class);
00090
00091 public:
00092
00093
00094
00095 explicit TagSetter(GstTagSetter* castitem);
00096
00097 protected:
00098 #endif
00099
00100 public:
00101 virtual ~TagSetter();
00102
00103 static void add_interface(GType gtype_implementer);
00104
00105 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00106 static GType get_type() G_GNUC_CONST;
00107 static GType get_base_type() G_GNUC_CONST;
00108 #endif
00109
00111 GstTagSetter* gobj() { return reinterpret_cast<GstTagSetter*>(gobject_); }
00112
00114 const GstTagSetter* gobj() const { return reinterpret_cast<GstTagSetter*>(gobject_); }
00115
00116 private:
00117
00118
00119 public:
00120
00126 void reset_tags();
00127
00132 void merge_tags(const Gst::TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND);
00133
00140 void add_tag(const Glib::ustring& tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND);
00141
00142
00150 template <class DataType>
00151 void add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
00152
00159 void add_tag(const Glib::ustring& tag, const char* data, TagMergeMode mode=TAG_MERGE_PREPEND);
00160
00161
00162
00163
00168 const Gst::TagList get_tag_list() const;
00169
00170
00176 void set_tag_merge_mode(TagMergeMode mode);
00177
00182 TagMergeMode get_tag_merge_mode() const;
00183
00184
00185
00186
00187 public:
00188
00189 public:
00190
00191 #ifdef GLIBMM_VFUNCS_ENABLED
00192 #endif //GLIBMM_VFUNCS_ENABLED
00193
00194 protected:
00195
00196 #ifdef GLIBMM_VFUNCS_ENABLED
00197 #endif //GLIBMM_VFUNCS_ENABLED
00198
00199
00200 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00201 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00202
00203
00204 };
00205
00206 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00207
00208
00209
00210 template <class DataType>
00211 void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode)
00212 {
00213 typedef Glib::Value<DataType> ValueType;
00214
00215 ValueType value;
00216 value.init(ValueType::value_type());
00217 value.set(data);
00218 this->add_tag(tag, (Glib::ValueBase)(value), mode);
00219 }
00220
00221 #endif
00222
00223 }
00224
00225
00226 namespace Glib
00227 {
00236 Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
00237
00238 }
00239
00240
00241 #endif
00242