diff options
author | 2016-12-13 13:53:06 +0900 | |
---|---|---|
committer | 2016-12-13 13:57:48 +0900 | |
commit | 3cbb4dd435f3cee4e706a01c07b509f7327fff80 (patch) | |
tree | a6103f13d793fd1b997cbaa0df80a4678784bff5 /recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch | |
parent | 7551ca17700f3faadeb1406af4f0717109e4444c (diff) |
Adding backport patches of Qt5 to show cover art
To show cover art in qtmultimedia, the backport
patches(listed below) are needed.
https://codereview.qt-project.org/179542
https://codereview.qt-project.org/165950
https://codereview.qt-project.org/165951
Change-Id: I638d824a3c8c4c632c4347538653830921c5e956
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch')
-rw-r--r-- | recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch b/recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch new file mode 100644 index 000000000..252838fc0 --- /dev/null +++ b/recipes-qt/qt5/qtmultimedia/0001-GStreamer-support-date-time-type-in-metadata.patch @@ -0,0 +1,51 @@ +From d0ac492e3023545adad8008a3ebcac2a297dc783 Mon Sep 17 00:00:00 2001 +From: Tasuku Suzuki <tasuku.suzuki@qt.io> +Date: Sun, 24 Jul 2016 00:23:10 +0900 +Subject: [PATCH] GStreamer: support date time type in metadata + +Change-Id: Ica57abfc0a60b401be88662483d35699d4f76321 +Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> +--- + src/gsttools/qgstutils.cpp | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp +index b5299f1..831ba96 100644 +--- a/src/gsttools/qgstutils.cpp ++++ b/src/gsttools/qgstutils.cpp +@@ -40,6 +40,7 @@ + #include "qgstutils_p.h" + + #include <QtCore/qdatetime.h> ++#include <QtCore/qtimezone.h> + #include <QtCore/qdir.h> + #include <QtCore/qbytearray.h> + #include <QtCore/qvariant.h> +@@ -123,6 +124,24 @@ static void addTagToMap(const GstTagList *list, + if (!map->contains("year")) + map->insert("year", year); + } ++#if GST_CHECK_VERSION(1,0,0) ++ } else if (G_VALUE_TYPE(&val) == GST_TYPE_DATE_TIME) { ++ const GstDateTime *dateTime = (const GstDateTime *)g_value_get_boxed(&val); ++ int year = gst_date_time_has_year(dateTime) ? gst_date_time_get_year(dateTime) : 0; ++ int month = gst_date_time_has_month(dateTime) ? gst_date_time_get_month(dateTime) : 0; ++ int day = gst_date_time_has_day(dateTime) ? gst_date_time_get_day(dateTime) : 0; ++ if (gst_date_time_has_time(dateTime)) { ++ int hour = gst_date_time_get_hour(dateTime); ++ int minute = gst_date_time_get_minute(dateTime); ++ int second = gst_date_time_get_second(dateTime); ++ float tz = gst_date_time_get_time_zone_offset(dateTime); ++ map->insert(QByteArray(tag), QDateTime(QDate(year,month,day), QTime(hour, minute, second), QTimeZone(tz * 60 * 60))); ++ } else if (year > 0 && month > 0 && day > 0) { ++ map->insert(QByteArray(tag), QDate(year,month,day)); ++ } ++ if (!map->contains("year") && year > 0) ++ map->insert("year", year); ++#endif + } else if (G_VALUE_TYPE(&val) == GST_TYPE_FRACTION) { + int nom = gst_value_get_fraction_numerator(&val); + int denom = gst_value_get_fraction_denominator(&val); +-- +2.7.4 + |