[tracker] tracker-extract: Fixed aspect-ratio property in GStreamer tagreadbin extractor
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Fixed aspect-ratio property in GStreamer tagreadbin extractor
- Date: Thu, 4 Mar 2010 17:13:09 +0000 (UTC)
commit 31b5b91e3a8a3a784c7dd8b7fa23dfdaec4f47a6
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Mar 4 18:11:05 2010 +0100
tracker-extract: Fixed aspect-ratio property in GStreamer tagreadbin extractor
Fixes NB#156571
src/tracker-extract/tracker-extract-gstreamer.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 0330067..7490b95 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -272,6 +272,8 @@ add_fraction_gst_tag (TrackerSparqlBuilder *metadata,
tracker_sparql_builder_predicate (metadata, key);
tracker_sparql_builder_object_double (metadata, (gdouble) f);
+
+ g_value_unset (&n);
}
}
@@ -407,8 +409,10 @@ extract_stream_metadata_tagreadbin (MetadataExtractor *extractor,
add_int_gst_tag (metadata, uri, "nfo:channels", extractor->tagcache, GST_TAG_CHANNEL);
add_int_gst_tag (metadata, uri, "nfo:sampleRate", extractor->tagcache, GST_TAG_RATE);
add_time_gst_tag (metadata, uri, "nfo:duration", extractor->tagcache, GST_TAG_DURATION);
- } else {
- add_int_gst_tag (metadata, uri, "nfo:aspectRatio", extractor->tagcache, GST_TAG_PIXEL_RATIO);
+ }
+
+ if (extractor->mime == EXTRACT_MIME_IMAGE || extractor->mime == EXTRACT_MIME_VIDEO) {
+ add_fraction_gst_tag (metadata, uri, "nfo:aspectRatio", extractor->tagcache, GST_TAG_PIXEL_RATIO);
}
add_int_gst_tag (metadata, uri, "nfo:height", extractor->tagcache, GST_TAG_HEIGHT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]