You are not logged in.

#1 2021-03-28 15:03:02

icar
Member
Registered: 2020-07-31
Posts: 108

[Package request] Decoder

I stumbled upon https://gitlab.gnome.org/bilelmoussaoui/decoder/ and I really like it, but they don't offer build instructions, only a flatpak link.

I could do a try-and-error approach following some meson packages already in the AUR as an example, but since I don't know anything about this system, I'd rather ask here if someone who does would want to create this package and maintain it.

Thanks.

Offline

#2 2021-03-28 18:50:12

loqs
Member
Registered: 2014-03-06
Posts: 13,176

Re: [Package request] Decoder

Does this PKGBUILD work for you?  Build tested only.

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Your Name <youremail@domain.com>
pkgname=decoder-git
pkgver=0.1.0.r5.g83124d9
pkgrel=1
pkgdesc="Scan and Generate QR Codes"
arch=('x86_64')
url="https://gitlab.gnome.org/bilelmoussaoui/decoder"
license=('GPL3')
depends=('gtk4' 'libadwaita-git' 'zbar')
makedepends=('git' 'meson' 'rust')
provides=('decoder')
conflicts=('decoder')
source=("$pkgname::git+https://gitlab.gnome.org/bilelmoussaoui/decoder.git")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$pkgname"
  cargo update -p zbar-rust --precise 0.0.16 #needed to use zbar > 0.20
}

build() {
  meson --prefix /usr $pkgname build
  meson compile -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

Offline

#3 2021-03-29 09:48:20

icar
Member
Registered: 2020-07-31
Posts: 108

Re: [Package request] Decoder

╰─? RUST_BACKTRACE=full decoder
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: BoolError { message: "Failed to create element from factory name", filename: "/home/icar/Baixades/decoder-git/src/build/target/cargo-home/git/checkouts/gstreamer-rs-79e52a2d27eb91a3/72f191b/gstreamer/src/auto/element_factory.rs", function: "gstreamer::auto::element_factory", line: 195 }', src/widgets/camera.rs:134:70
stack backtrace:
   0:     0x5624a1b3de20 - <unknown>
   1:     0x5624a1b5c2ec - <unknown>
   2:     0x5624a1b3a762 - <unknown>
   3:     0x5624a1b40045 - <unknown>
   4:     0x5624a1b3fba3 - <unknown>
   5:     0x5624a1b407e1 - <unknown>
   6:     0x5624a1b40327 - <unknown>
   7:     0x5624a1b3e2bc - <unknown>
   8:     0x5624a1b40289 - <unknown>
   9:     0x5624a1b5acb1 - <unknown>
  10:     0x5624a1b5aad3 - <unknown>
  11:     0x5624a1950a6a - <unknown>
  12:     0x5624a196d6ae - <unknown>
  13:     0x7f2ae456466a - g_type_create_instance
  14:     0x7f2ae454d5fe - <unknown>
  15:     0x7f2ae454e46d - g_object_new_with_properties
  16:     0x7f2ae454ee52 - g_object_new
  17:     0x7f2ae49f3523 - <unknown>
  18:     0x7f2ae49f77ec - <unknown>
  19:     0x7f2ae49faa14 - <unknown>
  20:     0x7f2ae49f448f - <unknown>
  21:     0x7f2ae49fb6a3 - <unknown>
  22:     0x7f2ae49efdba - gtk_builder_extend_with_template
  23:     0x7f2ae4bec42c - gtk_widget_init_template
  24:     0x7f2ae456466a - g_type_create_instance
  25:     0x7f2ae454d5fe - <unknown>
  26:     0x7f2ae454e6c1 - g_object_newv
  27:     0x5624a1a98292 - <unknown>
  28:     0x5624a1a97c71 - <unknown>
  29:     0x5624a195931f - <unknown>
  30:     0x5624a18f112c - <unknown>
  31:     0x5624a18ebaed - <unknown>
  32:     0x5624a19512bb - <unknown>
  33:     0x7f2ae455c096 - g_signal_emit_valist
  34:     0x7f2ae455c210 - g_signal_emit
  35:     0x7f2ae4653019 - <unknown>
  36:     0x5624a19519e1 - <unknown>
  37:     0x7f2ae465319a - g_application_run
  38:     0x5624a18ea76e - <unknown>
  39:     0x5624a1902d5d - <unknown>
  40:     0x5624a1904eb3 - <unknown>
  41:     0x5624a195db59 - <unknown>
  42:     0x5624a1b40c07 - <unknown>
  43:     0x5624a1902ea8 - <unknown>
  44:     0x7f2ae3de8b25 - __libc_start_main
  45:     0x5624a18e007e - <unknown>
  46:                0x0 - <unknown>

Seems like it's trying to find something where I built the package. Some option is not correct

Offline

#4 2021-03-29 09:58:55

progandy
Member
Registered: 2012-05-17
Posts: 4,227

Re: [Package request] Decoder

More likely you are missing some gstreamer plugins.
You need gst-plugins-base (for videoconvert, glsinkbin), and gst-plugins-bad (for zbar)
https://gitlab.gnome.org/bilelmoussaoui … mera.rs#L8

Edit: The software has been updated for gtk4 and needs gtk4glsink. I have no idea which package contains that.
Edit: That hasn't been merged yet: https://gitlab.freedesktop.org/gstreame … quests/767 According to the merge request the gtk3 and gtk4 plugins cannot be installed at the same time, so a system with both gtk3 and gtk4 applications has to choose which are allowed to use the gstreamer plugin ...

As an alternative you may look at CoBang in the AUR (decoding only)

Last edited by progandy (2021-03-29 10:16:27)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2021-03-29 10:32:38

icar
Member
Registered: 2020-07-31
Posts: 108

Re: [Package request] Decoder

I have both gst-plugins-base and gst-plugins-bad.

How can I select which gstreamer plugin to use? For what I understand from that MR, sink=gtk4glsink must be specified somewhere.

I'll take a look at that alternative, but I really dig the design of Decoder.

Thanks to both of you!

Offline

#6 2021-03-29 10:39:22

progandy
Member
Registered: 2012-05-17
Posts: 4,227

Re: [Package request] Decoder

Decoder tries to use gtk4glsink and crashes because that is not available and decoder has bad error handling.
To get the gtk4 plugin, you'd have to manually compile gst-plugins-good with the code from the merge request and disable the gtk3 plugin. That will cause problems with other gtk3 applications that want to use gstreamer.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB