mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
zxing: add support for zxing-c++ 2.0
format is a C++ string in 2.0 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3693>
This commit is contained in:
parent
a1bfd8668c
commit
9835032727
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue