[gstreamermm] Renamed internal array of tags, tagStrings, to _tag_strings.
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Subject: [gstreamermm] Renamed internal array of tags, tagStrings, to _tag_strings.
- Date: Fri, 29 May 2009 13:16:51 -0400 (EDT)
commit 8e669913e092ce46cc1b03b7ced28f679c97bf20
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Fri May 29 13:12:45 2009 -0400
Renamed internal array of tags, tagStrings, to _tag_strings.
---
ChangeLog | 8 ++++++++
gstreamer/src/taglist.ccg | 15 +++++++--------
gstreamer/src/taglist.hg | 5 ++---
gstreamer/src/tagsetter.ccg | 4 ++--
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 832697f..de44670 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-29 José Alburquerque <jaalburqu svn gnome org>
+
+ * gstreamer/src/taglist.ccg:
+ * gstreamer/src/taglist.hg:
+ * gstreamer/src/tagsetter.ccg: Renamed internal array of tags,
+ tagStrings, to _tag_strings. Also removed unneeded array size in
+ declarations.
+
2009-05-28 José Alburquerque <jaalburqu svn gnome org>
* tools/m4/ctocpp_gstreamermm.m4: Add a C to C++ type translation for
diff --git a/gstreamer/src/taglist.ccg b/gstreamer/src/taglist.ccg
index 87b9be8..25b4fee 100644
--- a/gstreamer/src/taglist.ccg
+++ b/gstreamer/src/taglist.ccg
@@ -41,9 +41,8 @@ static void TagList_foreach_gstreamermm_callback(const GstTagList* list, const g
namespace Gst
{
-// The size should be the last enum in Gst::Tag + 1. Make sure the order here
-// is the same order as in Gst:Tag.
-const char* tagStrings[TAG_GEO_LOCATION_ELEVATION + 1] =
+// Make sure the order here is the same order as in Gst:Tag.
+const char* _tag_strings[] =
{
GST_TAG_TITLE,
GST_TAG_TITLE_SORTNAME,
@@ -101,20 +100,20 @@ const char* tagStrings[TAG_GEO_LOCATION_ELEVATION + 1] =
std::ostream& operator<<(std::ostream& stream, Tag tag)
{
- stream << tagStrings[tag];
+ stream << _tag_strings[tag];
return stream;
}
void TagList::add(Tag tag, const Glib::ValueBase& value, TagMergeMode mode)
{
//TODO: The gst_tag_list_add_values() documentation says nothing about ending the ... with NULL.
- gst_tag_list_add_values(gobj(), (GstTagMergeMode) mode, tagStrings[tag],
+ gst_tag_list_add_values(gobj(), (GstTagMergeMode) mode, _tag_strings[tag],
value.gobj(), (void*)0);
}
void TagList::add(Tag tag, const char* data, TagMergeMode mode)
{
- gst_tag_list_add(gobj(), (GstTagMergeMode) mode, tagStrings[tag], data,
+ gst_tag_list_add(gobj(), (GstTagMergeMode) mode, _tag_strings[tag], data,
(void*)0);
}
@@ -128,14 +127,14 @@ void TagList::foreach(const SlotForeach& slot)
bool TagList::get(Tag tag, Glib::ValueBase& dest) const
{
return gst_tag_list_copy_value(dest.gobj(), const_cast<GstTagList*>(gobj()),
- tagStrings[tag]);
+ _tag_strings[tag]);
}
bool TagList::get(Tag tag, guint index, Glib::ValueBase& value) const
{
const GValue* gst_value =
gst_tag_list_get_value_index(const_cast<GstTagList*>(gobj()),
- tagStrings[tag], index);
+ _tag_strings[tag], index);
if(gst_value)
{
value.init(gst_value);
diff --git a/gstreamer/src/taglist.hg b/gstreamer/src/taglist.hg
index 27bb289..b1c4b1a 100644
--- a/gstreamer/src/taglist.hg
+++ b/gstreamer/src/taglist.hg
@@ -297,8 +297,7 @@ TAG_GEO_LOCATION_ELEVATION
std::ostream& operator<<(std::ostream& stream, Tag tag);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-// The size should be the last enum of Gst::Tag (above) + 1.
-extern const char* tagStrings[TAG_GEO_LOCATION_ELEVATION + 1];
+extern const char* _tag_strings[];
#endif
/** A List of tags and values used to describe media metadata.
@@ -364,7 +363,7 @@ public:
#m4begin
dnl See .ccg implementation for how this conversion works.
- _CONVERSION(`Tag', `const gchar*', `tagStrings[$3]')
+ _CONVERSION(`Tag', `const gchar*', `_tag_strings[$3]')
#m4end
_WRAP_METHOD(void remove_tag(Tag tag), gst_tag_list_remove_tag)
diff --git a/gstreamer/src/tagsetter.ccg b/gstreamer/src/tagsetter.ccg
index 6ed8ce2..eabf439 100644
--- a/gstreamer/src/tagsetter.ccg
+++ b/gstreamer/src/tagsetter.ccg
@@ -24,12 +24,12 @@ void TagSetter::add_tag(Tag tag, const Glib::ValueBase& value,
TagMergeMode mode)
{
gst_tag_setter_add_tag_values(gobj(), (GstTagMergeMode) mode,
- tagStrings[tag], value.gobj(), (void*)0);
+ _tag_strings[tag], value.gobj(), (void*)0);
}
void TagSetter::add_tag(Tag tag, const char* data, TagMergeMode mode)
{
- gst_tag_setter_add_tags(gobj(), (GstTagMergeMode) mode, tagStrings[tag],
+ gst_tag_setter_add_tags(gobj(), (GstTagMergeMode) mode, _tag_strings[tag],
data, (void*)0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]