[shotwell/wip/remove-deprecated: 2/2] Remove deprecated GStreamer call




commit dde3eaf4d30e64ec0dfbc24c6dcb921b11078a2f
Author: Jens Georg <mail jensge org>
Date:   Sat Oct 8 10:49:57 2022 +0200

    Remove deprecated GStreamer call

 meson.build                                       |  4 ++--
 src/video-support/VideoMetadataReaderProcess.vala | 16 +++++++++++-----
 2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index e1865c32..40bc1d04 100644
--- a/meson.build
+++ b/meson.build
@@ -56,8 +56,8 @@ xml = dependency('libxml-2.0')
 gdk = dependency('gdk-3.0', version : '>= 3.22')
 gdk_pixbuf = dependency('gdk-pixbuf-2.0')
 sqlite = dependency('sqlite3', version : '>= 3.5.9')
-gstreamer = dependency('gstreamer-1.0', version : '>= 1.0')
-gstreamer_pbu = dependency('gstreamer-pbutils-1.0', version : '>= 1.0')
+gstreamer = dependency('gstreamer-1.0', version : '>= 1.20')
+gstreamer_pbu = dependency('gstreamer-pbutils-1.0', version : '>= 1.20')
 gphoto2 = dependency('libgphoto2', version : '>= 2.5.0')
 gudev = dependency('gudev-1.0', version : '>= 145', required: false)
 gexiv2 = dependency('gexiv2', version: '>= 0.12.3')
diff --git a/src/video-support/VideoMetadataReaderProcess.vala 
b/src/video-support/VideoMetadataReaderProcess.vala
index cba61837..cc7bfd3e 100644
--- a/src/video-support/VideoMetadataReaderProcess.vala
+++ b/src/video-support/VideoMetadataReaderProcess.vala
@@ -32,11 +32,17 @@ int main(string[] args) {
         // TODO: Note that TAG_DATE can be changed to TAG_DATE_TIME in the future
         // (and the corresponding output struct) in order to implement #2836.
         Date? video_date = null;
-        if (info.get_tags() != null && info.get_tags().get_date(Gst.Tags.DATE, out video_date)) {
-            // possible for get_date() to return true and a null Date
-            if (video_date != null) {
-                timestamp = new GLib.DateTime.local(video_date.get_year(), video_date.get_month(),
-                    video_date.get_day(), 0, 0, 0);
+        var containers = info.get_container_streams();
+        foreach (var container in containers) {
+            if (container.get_tags() != null && container.get_tags().get_date(Gst.Tags.DATE, out 
video_date)) {
+                // possible for get_date() to return true and a null Date
+                if (video_date != null) {
+                    timestamp = new GLib.DateTime.local(video_date.get_year(), video_date.get_month(),
+                        video_date.get_day(), 0, 0, 0);
+
+                    // first one wins
+                    break;
+                }
             }
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]