mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-27 00:10:29 +00:00
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From cb168ab9441b3748f13aa846817e8d1b996d6bee Mon Sep 17 00:00:00 2001
|
|
From: Antonio Rojas <arojas@archlinux.org>
|
|
Date: Sat, 7 Jan 2023 16:18:03 +0100
|
|
Subject: [PATCH] Support zxing-c++ 2.0
|
|
|
|
format is a C++ string in 2.0
|
|
---
|
|
subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp b/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp
|
|
index 7836dbbcf18..a8a0f7b49aa 100644
|
|
--- a/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp
|
|
+++ b/subprojects/gst-plugins-bad/ext/zxing/gstzxing.cpp
|
|
@@ -62,6 +62,7 @@
|
|
|
|
#include "ReadBarcode.h"
|
|
#include "TextUtfEncoding.h"
|
|
+#include "ZXVersion.h"
|
|
|
|
using namespace ZXing;
|
|
|
|
@@ -369,7 +370,11 @@ gst_zxing_transform_frame_ip (GstVideoFilter * vfilter, GstVideoFrame * frame)
|
|
if (result.isValid ()) {
|
|
GST_DEBUG_OBJECT (zxing, "Symbol found. Text: %s Format: %s",
|
|
result.text ().c_str (),
|
|
+#if ZXING_VERSION_MAJOR >= 2
|
|
+ ToString (result.format ()).c_str ());
|
|
+#else
|
|
ToString (result.format ()));
|
|
+#endif
|
|
} else {
|
|
goto out;
|
|
}
|
|
@@ -394,7 +399,11 @@ gst_zxing_transform_frame_ip (GstVideoFilter * vfilter, GstVideoFrame * frame)
|
|
"timestamp", G_TYPE_UINT64, timestamp,
|
|
"stream-time", G_TYPE_UINT64, stream_time,
|
|
"running-time", G_TYPE_UINT64, running_time,
|
|
+#if ZXING_VERSION_MAJOR >= 2
|
|
+ "type", G_TYPE_STRING, ToString (result.format ()).c_str (),
|
|
+#else
|
|
"type", G_TYPE_STRING, ToString (result.format ()),
|
|
+#endif
|
|
"symbol", G_TYPE_STRING,
|
|
result.text ().c_str (), NULL);
|
|
|
|
--
|
|
GitLab
|