Skip to content

smpte_subtitle_asset.cc Ambiguos overload error has appeared again #10

@cfenell

Description

@cfenell

Hi, the previously solved ambiguos overload error in smpte_subtitle_asset.cc:112 has appeared again on my rolling release Arch system. So opening a new issue about the same problem.
I'm installing it from AUR. PKGBUILD and patch files included.

     ../src/smpte_subtitle_asset.cc:112:83: error: call of overloaded ‘make_shared<dcp::DecryptionContext>      (boost::optional<dcp::Key>, dcp::Standard)’ is ambiguous
  112 |                         read_mxf_resources (reader, make_shared<DecryptionContext>(optional<Key>(), Standard::SMPTE));
# Maintainer: Markus Kalb <mk@filmkreis.tu-darmstadt.de>
# Maintainer: Benjamin Radel <aur@radel.tk>
# Contributor: Stefan Karner <stefan.karner@student.tuwien.ac.at>
pkgname=libdcp-git
pkgver=1.8.27.r1.gb36f9bf7
pkgrel=1
_branch=v1.8.x
pkgdesc="A small C++ library which can create and read Digital Cinema Packages using JPEG2000 and WAV files"
arch=('i686' 'x86_64')
url="https://carlh.net/libdcp"
license=('GPL')
depends=('libxml++2.6' 'xmlsec' 'imagemagick' 'openjpeg2>=2.5' 'libcxml-git' 'libsigc++>=2.0' 'boost-libs>=1.72.0' 'libasdcp-cth-git')
makedepends=('git' 'python' 'boost>=1.72.0' 'gcc' 'pkg-config')
provides=('libdcp')
conflicts=('libdcp')
source=("${pkgname}::git+git://git.carlh.net/git/libdcp.git#branch=${_branch}"
	"0001-fix-compile-with-openjp25.patch")
sha256sums=('SKIP'
            '671046a87eaf567ca94cde72a92497239155d7cb12450ee12b41b2eed13c78fb')

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


prepare() {
  cd $srcdir/${pkgname}
  ### Patch libdcp for openjpeg>2.5 ###
  for p in "${source[@]}"; do
    if [[ "$p" =~ \.patch$ ]]; then
      echo "Applying patch ${p##*/}"
      patch -p1 -N -i "${srcdir}/${p##*/}"
    fi
  done
}

build() {
  ### Configure libdcp ###
  cd "${srcdir}/${pkgname}"
  python waf configure --prefix=/usr --disable-tests
  python waf build
}

package() {
  cd "${srcdir}/${pkgname}"
  python waf install --destdir=$pkgdir
  cd "${pkgdir}"
  if [ -d usr/lib64   ]
    then
       mv usr/lib64 usr/lib
    fi
}
--- a/src/j2k_transcode.cc	2022-05-17 10:07:44.525679224 +0200
+++ b/src/j2k_transcode.cc	2022-05-17 10:04:18.846330309 +0200
@@ -46,7 +46,7 @@
 #include <openjpeg.h>
 #include <cmath>
 #include <iostream>
-
+#include <string>
 
 using std::min;
 using std::pow;
@@ -315,10 +315,13 @@
 	parameters.max_comp_size = parameters.max_cs_size / 1.25;
 	parameters.tcp_numlayers = 1;
 	parameters.tcp_mct = 1;
-	parameters.numgbits = fourk ? 2 : 1;
+	string numgbits = "GUARD_BITS=";
+	numgbits.append(std::to_string(fourk ? 2 : 1));
+	const char* extraopt[] { numgbits.data(), nullptr };
 
 	/* Setup the encoder parameters using the current image and user parameters */
 	opj_setup_encoder (encoder, &parameters, xyz->opj_image());
+	opj_encoder_set_extra_options(encoder, extraopt);
 
 	auto stream = opj_stream_default_create (OPJ_FALSE);
 	if (!stream) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions