summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-03-19 15:10:07 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-03-24 15:18:53 -0300
commite875577b0ff8d8fd06411059ad182e6cc55177e1 (patch)
tree4866a85064be7287f2c270e12b4665d8338d5774
parentf9c6a0886e22388954c893c9153180cd110fc7b8 (diff)
tags: Add new _USER_RATING tag
Adds a new tag for user favorite media rating. User rating informs how much (from 0 to 100) a user 'likes' a media. Having an percent uint range for this is easy to map into other scales, like some players that allow users to attribute 'stars' to its media. API: GST_TAG_USER_RATING Fixes #520697
-rw-r--r--docs/gst/gstreamer-sections.txt1
-rw-r--r--gst/gsttaglist.c4
-rw-r--r--gst/gsttaglist.h10
3 files changed, 15 insertions, 0 deletions
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt
index aa7d3f4a13..20882124c7 100644
--- a/docs/gst/gstreamer-sections.txt
+++ b/docs/gst/gstreamer-sections.txt
@@ -2190,6 +2190,7 @@ GST_TAG_SHOW_SEASON_NUMBER
GST_TAG_LYRICS
GST_TAG_COMPOSER_SORTNAME
GST_TAG_GROUPING
+GST_TAG_USER_RATING
gst_tag_register
gst_tag_merge_use_first
diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c
index 5fb9d8c77e..fab96f3a00 100644
--- a/gst/gsttaglist.c
+++ b/gst/gsttaglist.c
@@ -323,6 +323,10 @@ _gst_tag_initialize (void)
_("Groups related media that spans multiple tracks, like the different "
"pieces of a concerto. It is a higher level than a track, "
"but lower than an album"), NULL);
+ gst_tag_register (GST_TAG_USER_RATING, GST_TAG_FLAG_META, G_TYPE_UINT,
+ _("user rating"),
+ _("Rating attributed by a user. The higher the rank, "
+ "the more the user likes this media"), NULL);
}
/**
diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h
index 65b3442369..99749a088e 100644
--- a/gst/gsttaglist.h
+++ b/gst/gsttaglist.h
@@ -879,6 +879,16 @@ gboolean gst_tag_list_get_buffer_index (const GstTagList * list,
* Since: 0.10.26
*/
#define GST_TAG_GROUPING "grouping"
+/**
+ * GST_TAG_USER_RATING
+ *
+ * Rating attributed by a person (likely the application user).
+ * The higher the value, the more the user likes this media
+ * (unsigned int from 0 to 100)
+ *
+ * Since: 0.10.29
+ */
+#define GST_TAG_USER_RATING "user-rating"
G_END_DECLS