[tracker] tracker-extract-gstreamer: Also provide nmm:length for audio files
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract-gstreamer: Also provide nmm:length for audio files
- Date: Wed, 30 Dec 2009 17:02:01 +0000 (UTC)
commit b864d30d9420860777879fde14584f16a12661bf
Author: Jürg Billeter <j bitron ch>
Date: Wed Dec 30 18:00:08 2009 +0100
tracker-extract-gstreamer: Also provide nmm:length for audio files
Fixes NB#132761.
src/tracker-extract/tracker-extract-gstreamer.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 9e16335..15e8c83 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -384,6 +384,9 @@ 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);
+ if (extractor->mime == EXTRACT_MIME_AUDIO) {
+ add_time_gst_tag (metadata, uri, "nmm:length", extractor->tagcache, GST_TAG_DURATION);
+ }
}
add_int_gst_tag (metadata, uri, "nfo:height", extractor->tagcache, GST_TAG_HEIGHT);
@@ -410,6 +413,9 @@ extract_stream_metadata_decodebin (MetadataExtractor *extractor,
if (extractor->duration >= 0) {
add_int64_info (metadata, uri, "nfo:duration", extractor->duration);
+ if (extractor->mime == EXTRACT_MIME_AUDIO) {
+ add_int64_info (metadata, uri, "nmm:length", extractor->duration);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]