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 #include <gstreamermm/structurevalue.h>
00035
00036
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GstTagSetter GstTagSetter;
00039 typedef struct _GstTagSetterClass GstTagSetterClass;
00040 #endif
00041
00042
00043 namespace Gst
00044 { class TagSetter_Class; }
00045 namespace Gst
00046 {
00047
00063 class TagSetter : public Glib::Interface
00064 {
00065
00066 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00067
00068 public:
00069 typedef TagSetter CppObjectType;
00070 typedef TagSetter_Class CppClassType;
00071 typedef GstTagSetter BaseObjectType;
00072 typedef GstTagSetterIFace BaseClassType;
00073
00074 private:
00075 friend class TagSetter_Class;
00076 static CppClassType tagsetter_class_;
00077
00078
00079 TagSetter(const TagSetter&);
00080 TagSetter& operator=(const TagSetter&);
00081
00082 protected:
00083 TagSetter();
00084
00091 explicit TagSetter(const Glib::Interface_Class& interface_class);
00092
00093 public:
00094
00095
00096
00097 explicit TagSetter(GstTagSetter* castitem);
00098
00099 protected:
00100 #endif
00101
00102 public:
00103 virtual ~TagSetter();
00104
00105 static void add_interface(GType gtype_implementer);
00106
00107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00108 static GType get_type() G_GNUC_CONST;
00109 static GType get_base_type() G_GNUC_CONST;
00110 #endif
00111
00113 GstTagSetter* gobj() { return reinterpret_cast<GstTagSetter*>(gobject_); }
00114
00116 const GstTagSetter* gobj() const { return reinterpret_cast<GstTagSetter*>(gobject_); }
00117
00118 private:
00119
00120
00121 public:
00122
00127 void merge_tags(const TagList& list, TagMergeMode mode=TAG_MERGE_PREPEND);
00128
00135 void add_tag(const Glib::ustring& tag, const Glib::ValueBase& value, TagMergeMode mode=TAG_MERGE_PREPEND);
00136
00137
00144 template <class DataType>
00145 void add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
00146
00147
00152 TagList get_tag_list();
00153
00159 void set_tag_merge_mode(TagMergeMode mode);
00160
00165 TagMergeMode qet_tag_merge_mode();
00166
00167
00168
00169
00170 public:
00171
00172 public:
00173
00174 #ifdef GLIBMM_VFUNCS_ENABLED
00175 #endif //GLIBMM_VFUNCS_ENABLED
00176
00177 protected:
00178
00179 #ifdef GLIBMM_VFUNCS_ENABLED
00180 #endif //GLIBMM_VFUNCS_ENABLED
00181
00182
00183 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00184 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00185
00186
00187 };
00188
00189 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00190
00191
00192
00193 template <class DataType>
00194 void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode)
00195 {
00196 typedef typename Gst::StructureValue<DataType> type_cppdata;
00197 typedef typename type_cppdata::ValueType ValueType;
00198
00199 ValueType value;
00200 value.init(ValueType::value_type());
00201 value.set(data);
00202 this->add_tag(tag, (Glib::ValueBase)(value), mode);
00203 }
00204
00205 #endif
00206
00207 }
00208
00209
00210 namespace Glib
00211 {
00220 Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
00221
00222 }
00223
00224
00225 #endif
00226