Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177811453
D38442.1795339904.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
5 KB
Referenced Files
None
Subscribers
None
D38442.1795339904.diff
View Options
diff --git a/Mk/Uses/gstreamer.mk b/Mk/Uses/gstreamer.mk
--- a/Mk/Uses/gstreamer.mk
+++ b/Mk/Uses/gstreamer.mk
@@ -51,7 +51,8 @@
_GST1_PLUGINS_multimedia= aom assrender bad dash dts dv dvdread \
editing-services gnonlin good hls libav libde265 \
mpeg2dec mpeg2enc mplex mm openh264 resindvd rtmp \
- smoothstreaming theora ttml ugly v4l2 vpx x264 x265
+ smoothstreaming theora ttml ugly v4l2 vpx x264 x265 \
+ zxing
_GST1_PLUGINS_net= srtp
_GST1_PLUGINS_security= dtls
_GST1_PLUGINS_sysutils= cdio
@@ -360,6 +361,9 @@
gst-x265_PORT= multimedia/gstreamer${_GST_VER}-plugins-x265
gst-x265_IMPL= bad
+gst-zxing_PORT= textproc/gstreamer${_GST_VER}-plugins-zxing
+gst-zxing_IMPL= bad
+
#==== Net Plugins Section
gst-srtp_PORT= net/gstreamer${_GST_VER}-plugins-srtp
diff --git a/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_gstzxing.cpp b/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_gstzxing.cpp
new file mode 100644
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_gstzxing.cpp
@@ -0,0 +1,25 @@
+--- ext/zxing/gstzxing.cpp.orig 2022-12-19 23:34:46 UTC
++++ ext/zxing/gstzxing.cpp
+@@ -368,8 +368,8 @@ gst_zxing_transform_frame_ip (GstVideoFilter * vfilter
+ auto result = ReadBarcode ({(unsigned char *)data, width, height, zxing->image_format}, hints);
+ if (result.isValid ()) {
+ GST_DEBUG_OBJECT (zxing, "Symbol found. Text: %s Format: %s",
+- TextUtfEncoding::ToUtf8 (result.text ()).c_str (),
+- ToString (result.format ()));
++ result.text ().c_str (),
++ ToString (result.format ()).c_str());
+ } else {
+ goto out;
+ }
+@@ -394,9 +394,9 @@ gst_zxing_transform_frame_ip (GstVideoFilter * vfilter
+ "timestamp", G_TYPE_UINT64, timestamp,
+ "stream-time", G_TYPE_UINT64, stream_time,
+ "running-time", G_TYPE_UINT64, running_time,
+- "type", G_TYPE_STRING, ToString (result.format ()),
++ "type", G_TYPE_STRING, ToString (result.format ()).c_str(),
+ "symbol", G_TYPE_STRING,
+- TextUtfEncoding::ToUtf8 (result.text ()).c_str (), NULL);
++ result.text ().c_str (), NULL);
+
+ if (zxing->attach_frame) {
+ /* create a sample from image */
diff --git a/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_meson.build b/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_meson.build
new file mode 100644
--- /dev/null
+++ b/multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_meson.build
@@ -0,0 +1,22 @@
+--- ext/zxing/meson.build.orig 2022-12-19 23:34:46 UTC
++++ ext/zxing/meson.build
+@@ -2,16 +2,17 @@ zxing_sources = [
+ 'gstzxing.cpp',
+ 'gstzxingplugin.c',
+ ]
+-zxing_dep = dependency('zxing', version : '>= 1.1.1', required : get_option('zxing'))
++zxing_dep = dependency('zxing', version : '>= 1.4.0', required : get_option('zxing'))
+ if zxing_dep.found()
+ gstzxing = library('gstzxing',
+ zxing_sources,
+ c_args : gst_plugins_bad_args,
++ cpp_args: '-DZX_USE_UTF8',
+ include_directories : [configinc],
+ dependencies : [gstvideo_dep, zxing_dep],
+ install : true,
+ install_dir : plugins_install_dir,
+- override_options : ['cpp_std=c++11'],
++ override_options : ['cpp_std=c++17'],
+ )
+ pkgconfig.generate(gstzxing, install_dir : plugins_pkgconfig_install_dir)
+ plugins += [gstzxing]
diff --git a/multimedia/gstreamer1-plugins/Makefile.common b/multimedia/gstreamer1-plugins/Makefile.common
--- a/multimedia/gstreamer1-plugins/Makefile.common
+++ b/multimedia/gstreamer1-plugins/Makefile.common
@@ -209,7 +209,8 @@
winscreencap \
x265 \
y4m \
- zbar
+ zbar \
+ zxing
BAD_GST_ENABLED_PLUGINS?=
diff --git a/textproc/Makefile b/textproc/Makefile
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -254,6 +254,7 @@
SUBDIR += groonga
SUBDIR += gsed
SUBDIR += gspell
+ SUBDIR += gstreamer1-plugins-zxing
SUBDIR += gtk-doc
SUBDIR += gtkspell
SUBDIR += gtkspell3
diff --git a/textproc/gstreamer1-plugins-zxing/Makefile b/textproc/gstreamer1-plugins-zxing/Makefile
new file mode 100644
--- /dev/null
+++ b/textproc/gstreamer1-plugins-zxing/Makefile
@@ -0,0 +1,17 @@
+PORTREVISION= 0
+CATEGORIES= textproc multimedia
+
+COMMENT= GStreamer plugin for QR recognition
+
+LIB_DEPENDS= libZXing.so:textproc/zxing-cpp
+
+USES+= compiler:c++17-lang
+
+GST_PLUGIN= zxing
+DIST= bad
+
+MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins
+
+PLIST= ${.CURDIR}/pkg-plist
+
+.include "${MASTERDIR}/Makefile"
diff --git a/textproc/gstreamer1-plugins-zxing/distinfo b/textproc/gstreamer1-plugins-zxing/distinfo
new file mode 100644
--- /dev/null
+++ b/textproc/gstreamer1-plugins-zxing/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1675876341
+SHA256 (gst-plugins-bad-1.20.5.tar.xz) = f431214b0754d7037adcde93c3195106196588973e5b32dcb24938805f866363
+SIZE (gst-plugins-bad-1.20.5.tar.xz) = 6237720
+SHA256 (7cfc3130a7906c199861d2ef331a07d749a4b769.patch) = 4e30a1899652d46e20ca54cd463f8d41cbd80efd0c686698285e06e01a615fd7
+SIZE (7cfc3130a7906c199861d2ef331a07d749a4b769.patch) = 2574
diff --git a/textproc/gstreamer1-plugins-zxing/pkg-plist b/textproc/gstreamer1-plugins-zxing/pkg-plist
new file mode 100644
--- /dev/null
+++ b/textproc/gstreamer1-plugins-zxing/pkg-plist
@@ -0,0 +1 @@
+lib/gstreamer-%%VERSION%%/libgstzxing.so
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 9:31 AM (27 m, 39 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41904960
Default Alt Text
D38442.1795339904.diff (5 KB)
Attached To
Mode
D38442: multimedia/gstreamer1-plugins-zxing: Create a port.
Attached
Detach File
Event Timeline