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
00143 template <class DataType>
00144 void add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode=TAG_MERGE_PREPEND);
00145
00146
00151 TagList get_tag_list();
00152
00158 void set_tag_merge_mode(TagMergeMode mode);
00159
00164 TagMergeMode qet_tag_merge_mode();
00165
00166
00167 public:
00168
00169 public:
00170
00171 #ifdef GLIBMM_VFUNCS_ENABLED
00172 #endif //GLIBMM_VFUNCS_ENABLED
00173
00174 protected:
00175
00176 #ifdef GLIBMM_VFUNCS_ENABLED
00177 #endif //GLIBMM_VFUNCS_ENABLED
00178
00179
00180 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00181 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00182
00183
00184 };
00185
00186 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00187
00188
00189
00190 template <class DataType>
00191 void TagSetter::add_tag(const Glib::ustring& tag, const DataType& data, TagMergeMode mode)
00192 {
00193 typedef typename Gst::StructureValue<DataType> type_cppdata;
00194 typedef typename type_cppdata::ValueType ValueType;
00195
00196 ValueType value;
00197 value.init(ValueType::value_type());
00198 value.set(data);
00199 this->add_tag(tag, (Glib::ValueBase)(value), mode);
00200 }
00201
00202 #endif
00203
00204 }
00205
00206
00207 namespace Glib
00208 {
00217 Glib::RefPtr<Gst::TagSetter> wrap(GstTagSetter* object, bool take_copy = false);
00218
00219 }
00220
00221
00222 #endif
00223