Update to 1.6.5
Switch to use QT5 Add patch to fix build with recent update to graphics/glew PR: 223426 Submitted by: zeising Approved by: maintainer timeout
This commit is contained in:
parent
5598792853
commit
7614763208
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454455
@ -2,10 +2,9 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= bino
|
PORTNAME= bino
|
||||||
PORTVERSION= 1.4.2
|
PORTVERSION= 1.6.5
|
||||||
PORTREVISION= 12
|
|
||||||
CATEGORIES= multimedia
|
CATEGORIES= multimedia
|
||||||
MASTER_SITES= http://download.savannah.nongnu.org/releases/bino/ http://levsha.me/ports/distfiles/
|
MASTER_SITES= https://download.savannah.nongnu.org/releases/bino/
|
||||||
|
|
||||||
MAINTAINER= i@levsha.me
|
MAINTAINER= i@levsha.me
|
||||||
COMMENT= 3D video player with multi-display support
|
COMMENT= 3D video player with multi-display support
|
||||||
@ -17,14 +16,17 @@ LIB_DEPENDS= libass.so:multimedia/libass \
|
|||||||
libavformat.so:multimedia/ffmpeg \
|
libavformat.so:multimedia/ffmpeg \
|
||||||
libopenal.so:audio/openal-soft
|
libopenal.so:audio/openal-soft
|
||||||
|
|
||||||
USES= desktop-file-utils gmake pkgconfig tar:xz
|
USES= autoreconf desktop-file-utils gmake iconv pkgconfig tar:xz
|
||||||
USE_GL= glew
|
USE_GL= gl glu glew
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
INSTALLS_ICONS= yes
|
INSTALLS_ICONS= yes
|
||||||
USE_QT4= moc_build opengl rcc_build
|
USE_QT5= buildtools_build core gui opengl widgets
|
||||||
|
USE_CXXSTD= c++11
|
||||||
|
|
||||||
# no port fow equalizer now, lirc detecting not working
|
# no port fow equalizer now, lirc detecting not working
|
||||||
CONFIGURE_ARGS= --without-equalizer --without-liblircclient --docdir=${DOCSDIR}
|
CONFIGURE_ARGS= --without-equalizer --without-lirc --docdir=${DOCSDIR}
|
||||||
|
|
||||||
|
EXTRA_PATCHES= ${FILESDIR}/glew-fix-7098cd6a.patch
|
||||||
|
|
||||||
INFO= bino
|
INFO= bino
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
SHA256 (bino-1.4.2.tar.xz) = 6cd88eb16ffee30a3cbb9b5d313feb61b91068387ae846ff96d9e99dcb5c88b6
|
TIMESTAMP = 1509794928
|
||||||
SIZE (bino-1.4.2.tar.xz) = 794272
|
SHA256 (bino-1.6.5.tar.xz) = 3254316d3ae81cc69643dcd823caaac1233704d91289272d0011ced5e5cdffe2
|
||||||
|
SIZE (bino-1.6.5.tar.xz) = 825008
|
||||||
|
208
multimedia/bino/files/glew-fix-7098cd6a.patch
Normal file
208
multimedia/bino/files/glew-fix-7098cd6a.patch
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
From 7098cd6afb7ed805de085ed72a5a3ff56e529277 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Lambers <marlam@marlam.de>
|
||||||
|
Date: Sun, 18 Dec 2016 14:37:52 +0100
|
||||||
|
Subject: Revert "Always use GLEWmx, do not fall back to GLEW."
|
||||||
|
|
||||||
|
This reverts commit eaf9278782b32a13cea19d1be331cb74a6cddce9.
|
||||||
|
---
|
||||||
|
configure.ac | 15 +++++++++++++--
|
||||||
|
src/Makefile.am | 8 ++++++--
|
||||||
|
src/video_output.h | 4 +++-
|
||||||
|
src/video_output_qt.cpp | 13 ++++++++-----
|
||||||
|
src/video_output_qt.h | 20 +++++++++++++-------
|
||||||
|
5 files changed, 43 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 52181ed..03c6b58 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -296,7 +296,9 @@ fi
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_LIBEQUALIZER], [$HAVE_LIBEQUALIZER], [Have Equalizer?])
|
||||||
|
AM_CONDITIONAL([HAVE_LIBEQUALIZER], [test "$HAVE_LIBEQUALIZER" = "1"])
|
||||||
|
|
||||||
|
-dnl glewmx
|
||||||
|
+dnl glew
|
||||||
|
+dnl With Equalizer, we need glewmx, since that is what Equalizer uses.
|
||||||
|
+dnl Without Equalizer, glew (without mx) is ok to use, too.
|
||||||
|
PKG_CHECK_MODULES([libglewmx], [glewmx >= 1.6.0], [HAVE_LIBGLEWMX=1], [HAVE_LIBGLEWMX=0])
|
||||||
|
if test "$HAVE_LIBGLEWMX" != "1"; then
|
||||||
|
AC_MSG_WARN([required library libglewmx >= 1.6.0 not found:])
|
||||||
|
@@ -304,6 +306,15 @@ if test "$HAVE_LIBGLEWMX" != "1"; then
|
||||||
|
AC_MSG_WARN([libglewmx is provided by glew; Debian package: libglewmx-dev])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_LIBGLEWMX], [test "$HAVE_LIBGLEWMX" = "1"])
|
||||||
|
+if test "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBEQUALIZER" != "1"; then
|
||||||
|
+ AC_MSG_NOTICE([trying to use libglew instead of libglewmx])
|
||||||
|
+ PKG_CHECK_MODULES([libglew], [glew >= 1.6.0], [HAVE_LIBGLEW=1], [HAVE_LIBGLEW=0])
|
||||||
|
+ if test "$HAVE_LIBGLEW" != "1"; then
|
||||||
|
+ AC_MSG_WARN([required library libglew >= 1.6.0 not found:])
|
||||||
|
+ AC_MSG_WARN([$libglew_PKG_ERRORS])
|
||||||
|
+ AC_MSG_WARN([libglew is provided by glew; Debian package: libglew-dev])
|
||||||
|
+ fi
|
||||||
|
+fi
|
||||||
|
|
||||||
|
dnl libXNVCtrl
|
||||||
|
AC_ARG_WITH([xnvctrl],
|
||||||
|
@@ -390,7 +401,7 @@ if test "$am_cv_func_iconv" != "yes" \
|
||||||
|
-o "$HAVE_LIBASS" != "1" \
|
||||||
|
-o "$HAVE_LIBOPENAL" != "1" \
|
||||||
|
-o "$HAVE_LIBQTOPENGL" != "1" \
|
||||||
|
- -o "$HAVE_LIBGLEWMX" != "1" \
|
||||||
|
+ -o \( "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBGLEW" != "1" \) \
|
||||||
|
-o \( "$equalizer" = "yes" -a "$HAVE_LIBEQUALIZER" != "1" \) \
|
||||||
|
-o \( "$xnvctrl" = "yes" -a "$HAVE_LIBXNVCTRL" != "1" \) \
|
||||||
|
-o \( "$lirc" = "yes" -a "$HAVE_LIRC" != "1" \) ; then
|
||||||
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||||
|
index 6fc12bb..65cbae6 100644
|
||||||
|
--- src/Makefile.am
|
||||||
|
+++ src/Makefile.am
|
||||||
|
@@ -149,11 +149,15 @@ DEFS += -DHTMLDIR=\"$(htmldir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||||
|
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
$(libavformat_CFLAGS) $(libavdevice_CFLAGS) $(libswscale_CFLAGS) $(libass_CFLAGS) \
|
||||||
|
- $(libopenal_CFLAGS) $(libgl_CFLAGS) $(libglewmx_CFLAGS) $(libqtopengl_CFLAGS)
|
||||||
|
+ $(libopenal_CFLAGS) $(libgl_CFLAGS) $(libglewmx_CFLAGS) $(libglew_CFLAGS) $(libqtopengl_CFLAGS)
|
||||||
|
|
||||||
|
bino_LDADD = $(top_builddir)/src/base/libbase.a $(LIBINTL) $(LIBICONV) \
|
||||||
|
$(libavformat_LIBS) $(libavdevice_LIBS) $(libswscale_LIBS) $(libass_LIBS) \
|
||||||
|
- $(libopenal_LIBS) $(libgl_LIBS) $(libglewmx_LIBS) $(libqtopengl_LIBS)
|
||||||
|
+ $(libopenal_LIBS) $(libgl_LIBS) $(libglewmx_LIBS) $(libglew_LIBS) $(libqtopengl_LIBS)
|
||||||
|
+
|
||||||
|
+if HAVE_LIBGLEWMX
|
||||||
|
+AM_CPPFLAGS += -DGLEW_MX
|
||||||
|
+endif
|
||||||
|
|
||||||
|
if HAVE_LIBEQUALIZER
|
||||||
|
bino_SOURCES += player_equalizer.h player_equalizer.cpp
|
||||||
|
diff --git a/src/video_output.h b/src/video_output.h
|
||||||
|
index 8430ddc..2fd72ce 100644
|
||||||
|
--- src/video_output.h
|
||||||
|
+++ src/video_output.h
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
/*
|
||||||
|
* This file is part of bino, a 3D video player.
|
||||||
|
*
|
||||||
|
- * Copyright (C) 2010, 2011, 2012, 2015
|
||||||
|
+ * Copyright (C) 2010, 2011, 2012, 2015, 2016
|
||||||
|
* Martin Lambers <marlam@marlam.de>
|
||||||
|
* Frédéric Devernay <Frederic.Devernay@inrialpes.fr>
|
||||||
|
* Joe <cuchac@email.cz>
|
||||||
|
@@ -128,7 +128,9 @@ private:
|
||||||
|
protected:
|
||||||
|
subtitle_renderer _subtitle_renderer;
|
||||||
|
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
virtual GLEWContext* glewGetContext() const = 0;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
// Get the total viewport size.
|
||||||
|
int full_display_width() const;
|
||||||
|
diff --git a/src/video_output_qt.cpp b/src/video_output_qt.cpp
|
||||||
|
index 0758892..ab82388 100644
|
||||||
|
--- src/video_output_qt.cpp
|
||||||
|
+++ src/video_output_qt.cpp
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
/*
|
||||||
|
* This file is part of bino, a 3D video player.
|
||||||
|
*
|
||||||
|
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015
|
||||||
|
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016
|
||||||
|
* Martin Lambers <marlam@marlam.de>
|
||||||
|
* Frédéric Devernay <frederic.devernay@inrialpes.fr>
|
||||||
|
* Joe <cuchac@email.cz>
|
||||||
|
@@ -80,11 +80,13 @@ gl_thread::gl_thread(video_output_qt* vo_qt, video_output_qt_widget* vo_qt_widge
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if HAVE_X11
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
+# if HAVE_X11
|
||||||
|
GLXEWContext* gl_thread::glxewGetContext() const
|
||||||
|
{
|
||||||
|
return _vo_qt->glxewGetContext();
|
||||||
|
}
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void gl_thread::set_render(bool r)
|
||||||
|
@@ -781,17 +783,18 @@ void video_output_qt::create_widget()
|
||||||
|
process_events();
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if HAVE_X11
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
+# if HAVE_X11
|
||||||
|
GLXEWContext* video_output_qt::glxewGetContext() const
|
||||||
|
{
|
||||||
|
return const_cast<GLXEWContext*>(&_glxew_context);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
+# endif
|
||||||
|
GLEWContext* video_output_qt::glewGetContext() const
|
||||||
|
{
|
||||||
|
return const_cast<GLEWContext*>(&_glew_context);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
bool video_output_qt::context_is_stereo() const
|
||||||
|
{
|
||||||
|
diff --git a/src/video_output_qt.h b/src/video_output_qt.h
|
||||||
|
index 1cc3174..089bac9 100644
|
||||||
|
--- src/video_output_qt.h
|
||||||
|
+++ src/video_output_qt.h
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
/*
|
||||||
|
* This file is part of bino, a 3D video player.
|
||||||
|
*
|
||||||
|
- * Copyright (C) 2010, 2011, 2012, 2013, 2015
|
||||||
|
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016
|
||||||
|
* Martin Lambers <marlam@marlam.de>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@@ -69,8 +69,10 @@ private:
|
||||||
|
public:
|
||||||
|
gl_thread(video_output_qt* vo_qt, video_output_qt_widget* vo_qt_widget);
|
||||||
|
|
||||||
|
-#if HAVE_X11
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
+# if HAVE_X11
|
||||||
|
GLXEWContext* glxewGetContext() const;
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void set_render(bool r);
|
||||||
|
@@ -166,10 +168,12 @@ protected:
|
||||||
|
class video_output_qt : public video_output
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
-#if HAVE_X11
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
+# if HAVE_X11
|
||||||
|
GLXEWContext _glxew_context;
|
||||||
|
-#endif
|
||||||
|
+# endif
|
||||||
|
GLEWContext _glew_context;
|
||||||
|
+#endif
|
||||||
|
int _screen_width, _screen_height;
|
||||||
|
float _screen_pixel_aspect_ratio;
|
||||||
|
video_container_widget *_container_widget;
|
||||||
|
@@ -192,10 +196,12 @@ private:
|
||||||
|
void resume_screensaver();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
-#if HAVE_X11
|
||||||
|
- GLXEWContext* glxewGetContext() const;
|
||||||
|
-#endif
|
||||||
|
+#ifdef GLEW_MX
|
||||||
|
+# if HAVE_X11
|
||||||
|
+ virtual GLXEWContext* glxewGetContext() const;
|
||||||
|
+# endif
|
||||||
|
virtual GLEWContext* glewGetContext() const;
|
||||||
|
+#endif
|
||||||
|
virtual bool context_is_stereo() const;
|
||||||
|
virtual void recreate_context(bool stereo);
|
||||||
|
virtual void trigger_resize(int w, int h);
|
||||||
|
--
|
||||||
|
cgit v1.0-41-gc330
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
--- src/base/str.cpp.orig 2012-10-13 05:01:40 UTC
|
|
||||||
+++ src/base/str.cpp
|
|
||||||
@@ -77,7 +77,7 @@ static inline std::string uint_to_str(T
|
|
||||||
do
|
|
||||||
{
|
|
||||||
// this assumes an ASCII-compatible character set
|
|
||||||
- s.insert(0, 1, '0' + x % 10);
|
|
||||||
+ s.insert((size_t)0, (size_t)1, (char)('0' + x % 10));
|
|
||||||
x /= 10;
|
|
||||||
}
|
|
||||||
while (x != 0);
|
|
||||||
@@ -94,7 +94,7 @@ static inline std::string int_to_str(T x
|
|
||||||
do
|
|
||||||
{
|
|
||||||
// this assumes an ASCII-compatible character set
|
|
||||||
- s.insert(0, 1, (negative ? ('0' - x % 10) : ('0' + x % 10)));
|
|
||||||
+ s.insert((size_t)0, (size_t)1, (char)(negative ? ('0' - x % 10) : ('0' + x % 10)));
|
|
||||||
x /= 10;
|
|
||||||
}
|
|
||||||
while (x != 0);
|
|
10
multimedia/bino/files/patch-src_base_str.h
Normal file
10
multimedia/bino/files/patch-src_base_str.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- src/base/str.h.orig 2017-11-04 13:56:43 UTC
|
||||||
|
+++ src/base/str.h
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <vector>
|
||||||
|
#include <cstdarg>
|
||||||
|
#include <cerrno>
|
||||||
|
+#include <ctime>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define STR_AFP(a, b) __attribute__ ((format (printf, a, b)))
|
@ -1,216 +0,0 @@
|
|||||||
Some changes are identical to upstream:
|
|
||||||
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=bcba7045c99f
|
|
||||||
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=50b7109633fa
|
|
||||||
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=78023424d4cf
|
|
||||||
|
|
||||||
--- src/media_object.cpp.orig 2013-01-27 21:04:48 UTC
|
|
||||||
+++ src/media_object.cpp
|
|
||||||
@@ -56,6 +56,23 @@ extern "C"
|
|
||||||
|
|
||||||
#include "media_object.h"
|
|
||||||
|
|
||||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(51, 42, 0)
|
|
||||||
+#define AVPixelFormat PixelFormat
|
|
||||||
+#define AV_PIX_FMT_BGRA PIX_FMT_BGRA
|
|
||||||
+#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
|
|
||||||
+#define AV_PIX_FMT_YUV420P10 PIX_FMT_YUV420P10
|
|
||||||
+#define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P
|
|
||||||
+#define AV_PIX_FMT_YUV422P10 PIX_FMT_YUV422P10
|
|
||||||
+#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
|
|
||||||
+#define AV_PIX_FMT_YUV444P10 PIX_FMT_YUV444P10
|
|
||||||
+#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
|
|
||||||
+#define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P
|
|
||||||
+#define AV_PIX_FMT_YUVJ444P PIX_FMT_YUVJ444P
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 25, 0)
|
|
||||||
+#define AV_CODEC_ID_TEXT CODEC_ID_TEXT
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
// The read thread.
|
|
||||||
// This thread reads packets from the AVFormatContext and stores them in the
|
|
||||||
@@ -150,7 +167,8 @@ public:
|
|
||||||
// Hide the FFmpeg stuff so that their messy header files cannot cause problems
|
|
||||||
// in other source files.
|
|
||||||
|
|
||||||
-static const size_t audio_tmpbuf_size = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
|
|
||||||
+static const size_t max_audio_frame_size = 19200; // 1 second of 48khz 32bit audio
|
|
||||||
+static const size_t audio_tmpbuf_size = (max_audio_frame_size * 3) / 2;
|
|
||||||
|
|
||||||
struct ffmpeg_stuff
|
|
||||||
{
|
|
||||||
@@ -422,20 +440,20 @@ void media_object::set_video_frame_templ
|
|
||||||
video_frame_template.value_range = video_frame::u8_full;
|
|
||||||
video_frame_template.chroma_location = video_frame::center;
|
|
||||||
if (!_always_convert_to_bgra32
|
|
||||||
- && (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10))
|
|
||||||
+ && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10))
|
|
||||||
{
|
|
||||||
- if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10)
|
|
||||||
+ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10)
|
|
||||||
{
|
|
||||||
video_frame_template.layout = video_frame::yuv444p;
|
|
||||||
}
|
|
||||||
- else if (video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10)
|
|
||||||
+ else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10)
|
|
||||||
{
|
|
||||||
video_frame_template.layout = video_frame::yuv422p;
|
|
||||||
}
|
|
||||||
@@ -448,9 +466,9 @@ void media_object::set_video_frame_templ
|
|
||||||
{
|
|
||||||
video_frame_template.color_space = video_frame::yuv709;
|
|
||||||
}
|
|
||||||
- if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10)
|
|
||||||
+ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10)
|
|
||||||
{
|
|
||||||
video_frame_template.value_range = video_frame::u10_mpeg;
|
|
||||||
if (video_codec_ctx->color_range == AVCOL_RANGE_JPEG)
|
|
||||||
@@ -477,15 +495,15 @@ void media_object::set_video_frame_templ
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!_always_convert_to_bgra32
|
|
||||||
- && (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P
|
|
||||||
- || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ420P))
|
|
||||||
+ && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P
|
|
||||||
+ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ420P))
|
|
||||||
{
|
|
||||||
- if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P)
|
|
||||||
+ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P)
|
|
||||||
{
|
|
||||||
video_frame_template.layout = video_frame::yuv444p;
|
|
||||||
}
|
|
||||||
- else if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P)
|
|
||||||
+ else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P)
|
|
||||||
{
|
|
||||||
video_frame_template.layout = video_frame::yuv422p;
|
|
||||||
}
|
|
||||||
@@ -879,7 +897,7 @@ void media_object::open(const std::strin
|
|
||||||
{
|
|
||||||
_ffmpeg->format_ctx->streams[i]->discard = AVDISCARD_ALL; // ignore by default; user must activate streams
|
|
||||||
AVCodecContext *codec_ctx = _ffmpeg->format_ctx->streams[i]->codec;
|
|
||||||
- AVCodec *codec = (codec_ctx->codec_id == CODEC_ID_TEXT
|
|
||||||
+ AVCodec *codec = (codec_ctx->codec_id == AV_CODEC_ID_TEXT
|
|
||||||
? NULL : avcodec_find_decoder(codec_ctx->codec_id));
|
|
||||||
// XXX: Sometimes the reported width and height for a video stream change after avcodec_open(),
|
|
||||||
// but the original values seem to be correct. This seems to happen mostly with 1920x1080 video
|
|
||||||
@@ -899,8 +917,8 @@ void media_object::open(const std::strin
|
|
||||||
if (codec_ctx->lowres || (codec && (codec->capabilities & CODEC_CAP_DR1)))
|
|
||||||
codec_ctx->flags |= CODEC_FLAG_EMU_EDGE;
|
|
||||||
}
|
|
||||||
- // Find and open the codec. CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data.
|
|
||||||
- if (codec_ctx->codec_id != CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0))
|
|
||||||
+ // Find and open the codec. AV_CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data.
|
|
||||||
+ if (codec_ctx->codec_id != AV_CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0))
|
|
||||||
{
|
|
||||||
msg::wrn(_("%s stream %d: Cannot open %s: %s"), _url.c_str(), i,
|
|
||||||
codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO ? _("video codec")
|
|
||||||
@@ -928,10 +946,15 @@ void media_object::open(const std::strin
|
|
||||||
_ffmpeg->video_packets.push_back(AVPacket());
|
|
||||||
av_init_packet(&(_ffmpeg->video_packets[j]));
|
|
||||||
_ffmpeg->video_decode_threads.push_back(video_decode_thread(_url, _ffmpeg, j));
|
|
||||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
|
|
||||||
_ffmpeg->video_frames.push_back(avcodec_alloc_frame());
|
|
||||||
_ffmpeg->video_buffered_frames.push_back(avcodec_alloc_frame());
|
|
||||||
- enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
|
|
||||||
- ? PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
|
|
||||||
+#else
|
|
||||||
+ _ffmpeg->video_frames.push_back(av_frame_alloc());
|
|
||||||
+ _ffmpeg->video_buffered_frames.push_back(av_frame_alloc());
|
|
||||||
+#endif
|
|
||||||
+ enum AVPixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
|
|
||||||
+ ? AV_PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
|
|
||||||
int frame_bufsize = (avpicture_get_size(frame_fmt,
|
|
||||||
_ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height));
|
|
||||||
_ffmpeg->video_buffers.push_back(static_cast<uint8_t *>(av_malloc(frame_bufsize)));
|
|
||||||
@@ -944,20 +967,24 @@ void media_object::open(const std::strin
|
|
||||||
if (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32)
|
|
||||||
{
|
|
||||||
// Initialize things needed for software pixel format conversion
|
|
||||||
- int sws_bufsize = avpicture_get_size(PIX_FMT_BGRA,
|
|
||||||
+ int sws_bufsize = avpicture_get_size(AV_PIX_FMT_BGRA,
|
|
||||||
_ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
|
|
||||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
|
|
||||||
_ffmpeg->video_sws_frames.push_back(avcodec_alloc_frame());
|
|
||||||
+#else
|
|
||||||
+ _ffmpeg->video_sws_frames.push_back(av_frame_alloc());
|
|
||||||
+#endif
|
|
||||||
_ffmpeg->video_sws_buffers.push_back(static_cast<uint8_t *>(av_malloc(sws_bufsize)));
|
|
||||||
if (!_ffmpeg->video_sws_frames[j] || !_ffmpeg->video_sws_buffers[j])
|
|
||||||
{
|
|
||||||
throw exc(HERE + ": " + strerror(ENOMEM));
|
|
||||||
}
|
|
||||||
avpicture_fill(reinterpret_cast<AVPicture *>(_ffmpeg->video_sws_frames[j]), _ffmpeg->video_sws_buffers[j],
|
|
||||||
- PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
|
|
||||||
+ AV_PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
|
|
||||||
// Call sws_getCachedContext(NULL, ...) instead of sws_getContext(...) just to avoid a deprecation warning.
|
|
||||||
_ffmpeg->video_sws_ctxs.push_back(sws_getCachedContext(NULL,
|
|
||||||
_ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, _ffmpeg->video_codec_ctxs[j]->pix_fmt,
|
|
||||||
- _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, PIX_FMT_BGRA,
|
|
||||||
+ _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, AV_PIX_FMT_BGRA,
|
|
||||||
SWS_POINT, NULL, NULL, NULL));
|
|
||||||
if (!_ffmpeg->video_sws_ctxs[j])
|
|
||||||
{
|
|
||||||
@@ -1000,9 +1027,9 @@ void media_object::open(const std::strin
|
|
||||||
int j = _ffmpeg->subtitle_streams.size() - 1;
|
|
||||||
msg::dbg(_url + " stream " + str::from(i) + " is subtitle stream " + str::from(j) + ".");
|
|
||||||
_ffmpeg->subtitle_codec_ctxs.push_back(codec_ctx);
|
|
||||||
- // CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
|
|
||||||
+ // AV_CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
|
|
||||||
_ffmpeg->subtitle_codecs.push_back(
|
|
||||||
- _ffmpeg->subtitle_codec_ctxs[j]->codec_id == CODEC_ID_TEXT ? NULL : codec);
|
|
||||||
+ _ffmpeg->subtitle_codec_ctxs[j]->codec_id == AV_CODEC_ID_TEXT ? NULL : codec);
|
|
||||||
_ffmpeg->subtitle_box_templates.push_back(subtitle_box());
|
|
||||||
set_subtitle_box_template(j);
|
|
||||||
_ffmpeg->subtitle_decode_threads.push_back(subtitle_decode_thread(_url, _ffmpeg, j));
|
|
||||||
@@ -1505,7 +1532,7 @@ read_frame:
|
|
||||||
// We need to buffer the data because FFmpeg will clubber it when decoding the next frame.
|
|
||||||
av_picture_copy(reinterpret_cast<AVPicture *>(_ffmpeg->video_buffered_frames[_video_stream]),
|
|
||||||
reinterpret_cast<AVPicture *>(_ffmpeg->video_frames[_video_stream]),
|
|
||||||
- static_cast<enum PixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
|
|
||||||
+ static_cast<enum AVPixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
|
|
||||||
_ffmpeg->video_codec_ctxs[_video_stream]->width,
|
|
||||||
_ffmpeg->video_codec_ctxs[_video_stream]->height);
|
|
||||||
src_frame = _ffmpeg->video_buffered_frames[_video_stream];
|
|
||||||
@@ -1776,8 +1803,8 @@ void subtitle_decode_thread::run()
|
|
||||||
int got_subtitle;
|
|
||||||
tmppacket = packet;
|
|
||||||
|
|
||||||
- // CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
|
|
||||||
- if (_ffmpeg->subtitle_codec_ctxs[_subtitle_stream]->codec_id == CODEC_ID_TEXT)
|
|
||||||
+ // AV_CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
|
|
||||||
+ if (_ffmpeg->subtitle_codec_ctxs[_subtitle_stream]->codec_id == AV_CODEC_ID_TEXT)
|
|
||||||
{
|
|
||||||
int64_t duration = packet.convergence_duration * 1000000
|
|
||||||
* _ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[_subtitle_stream]]->time_base.num
|
|
||||||
@@ -1937,9 +1964,9 @@ void media_object::seek(int64_t dest_pos
|
|
||||||
}
|
|
||||||
for (size_t i = 0; i < _ffmpeg->subtitle_streams.size(); i++)
|
|
||||||
{
|
|
||||||
- if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != CODEC_ID_TEXT)
|
|
||||||
+ if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != AV_CODEC_ID_TEXT)
|
|
||||||
{
|
|
||||||
- // CODEC_ID_TEXT has no decoder, so we cannot flush its buffers
|
|
||||||
+ // AV_CODEC_ID_TEXT has no decoder, so we cannot flush its buffers
|
|
||||||
avcodec_flush_buffers(_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec);
|
|
||||||
}
|
|
||||||
_ffmpeg->subtitle_box_buffers[i].clear();
|
|
@ -36,10 +36,12 @@
|
|||||||
%%DOCSDIR%%/input-layout-alternating-left-right.png
|
%%DOCSDIR%%/input-layout-alternating-left-right.png
|
||||||
%%DOCSDIR%%/input-layout-alternating-right-left.png
|
%%DOCSDIR%%/input-layout-alternating-right-left.png
|
||||||
%%DOCSDIR%%/output-type-alternating.png
|
%%DOCSDIR%%/output-type-alternating.png
|
||||||
|
%%NLS%%share/locale/bg/LC_MESSAGES/bino.mo
|
||||||
|
%%NLS%%share/locale/cs/LC_MESSAGES/bino.mo
|
||||||
%%NLS%%share/locale/de/LC_MESSAGES/bino.mo
|
%%NLS%%share/locale/de/LC_MESSAGES/bino.mo
|
||||||
%%NLS%%share/locale/fr/LC_MESSAGES/bino.mo
|
%%NLS%%share/locale/fr/LC_MESSAGES/bino.mo
|
||||||
%%NLS%%share/locale/ru/LC_MESSAGES/bino.mo
|
%%NLS%%share/locale/ru/LC_MESSAGES/bino.mo
|
||||||
%%NLS%%share/locale/bg/LC_MESSAGES/bino.mo
|
%%NLS%%share/locale/zh_cn/LC_MESSAGES/bino.mo
|
||||||
bin/bino
|
bin/bino
|
||||||
share/applications/bino.desktop
|
share/applications/bino.desktop
|
||||||
share/icons/hicolor/16x16/apps/bino.png
|
share/icons/hicolor/16x16/apps/bino.png
|
||||||
|
Loading…
Reference in New Issue
Block a user