Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multimedia/gstreamer1-plugins-zxing: Create a port.
PR: 269383 Reviewed by: tcberner Differential Revision: https://reviews.freebsd.org/D38442 (cherry picked from commit 9619693)
- Loading branch information
Showing
8 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_gstzxing.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- ext/zxing/gstzxing.cpp.orig 2022-12-19 23:34:46 UTC | ||
+++ ext/zxing/gstzxing.cpp | ||
@@ -368,7 +368,7 @@ 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 (), | ||
+ result.text ().c_str (), | ||
ToString (result.format ())); | ||
} else { | ||
goto out; | ||
@@ -396,7 +396,7 @@ gst_zxing_transform_frame_ip (GstVideoFilter * vfilter | ||
"running-time", G_TYPE_UINT64, running_time, | ||
"type", G_TYPE_STRING, ToString (result.format ()), | ||
"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 */ |
22 changes: 22 additions & 0 deletions
22
multimedia/gstreamer1-plugins-bad/files/patch-ext_zxing_meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,8 @@ BAD_GST_ALL_PLUGINS+= \ | |
winscreencap \ | ||
x265 \ | ||
y4m \ | ||
zbar | ||
zbar \ | ||
zxing | ||
|
||
BAD_GST_ENABLED_PLUGINS?= | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/gstreamer-%%VERSION%%/libgstzxing.so |