[tracker] Fixes NB#173206, Also merge manufacturer correct for videos
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes NB#173206, Also merge manufacturer correct for videos
- Date: Tue, 8 Jun 2010 14:32:54 +0000 (UTC)
commit be187ba412fc18443b42f6b6fea09cfa1c013d9d
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Jun 8 17:28:53 2010 +0300
Fixes NB#173206, Also merge manufacturer correct for videos
src/tracker-extract/tracker-extract-gstreamer.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 8c719c7..c0f5eac 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -79,6 +79,10 @@ long long int llroundl(long double x);
#define GST_TAG_DEVICE_MODEL "device-model"
#endif
+#ifndef GST_TAG_DEVICE_MANUFACTURER
+#define GST_TAG_DEVICE_MANUFACTURER "device-manufacturer"
+#endif
+
#ifndef GST_TAG_DEVICE_MAKE
#define GST_TAG_DEVICE_MAKE "device-make"
#endif
@@ -496,7 +500,7 @@ extract_metadata (MetadataExtractor *extractor,
gchar **scount)
{
const gchar *temp;
- gchar *s, *make = NULL, *model = NULL, *make_model = NULL;
+ gchar *s, *make = NULL, *model = NULL, *manuf = NULL, *make_model = NULL;
gboolean ret;
gint count;
gboolean needs_audio = FALSE;
@@ -755,13 +759,22 @@ extract_metadata (MetadataExtractor *extractor,
gst_tag_list_get_string (extractor->tagcache, GST_TAG_DEVICE_MODEL, &model);
gst_tag_list_get_string (extractor->tagcache, GST_TAG_DEVICE_MAKE, &make);
+ gst_tag_list_get_string (extractor->tagcache, GST_TAG_DEVICE_MANUFACTURER, &manuf);
- if (make && model) {
+ if (make && model && manuf) {
+ make_model = tracker_merge_const (" ", 3, manuf, make, model);
+ } else if (make && model) {
make_model = tracker_merge_const (" ", 2, make, model);
- } else if (make) {
- make_model = g_strdup (make);
+ } else if (make && manuf) {
+ make_model = tracker_merge_const (" ", 2, manuf, make);
+ } else if (model && manuf) {
+ make_model = tracker_merge_const (" ", 2, manuf, model);
} else if (model) {
make_model = g_strdup (model);
+ } else if (make) {
+ make_model = g_strdup (make);
+ } else if (manuf) {
+ make_model = g_strdup (manuf);
}
if (make_model) {
@@ -772,6 +785,7 @@ extract_metadata (MetadataExtractor *extractor,
g_free (make);
g_free (model);
+ g_free (manuf);
if (extractor->is_content_encrypted) {
tracker_sparql_builder_predicate (metadata, "nfo:isContentEncrypted");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]