View | Details | Raw Unified | Return to bug 223426
Collapse All | Expand All

(-)multimedia/bino/Makefile (-6 / +8 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	bino
4
PORTNAME=	bino
5
PORTVERSION=	1.4.2
5
PORTVERSION=	1.6.5
6
PORTREVISION=	11
7
CATEGORIES=	multimedia
6
CATEGORIES=	multimedia
8
MASTER_SITES=	http://download.savannah.nongnu.org/releases/bino/ http://levsha.me/ports/distfiles/
7
MASTER_SITES=	http://download.savannah.nongnu.org/releases/bino/ http://levsha.me/ports/distfiles/
9
8
Lines 17-31 Link Here
17
		libavformat.so:multimedia/ffmpeg \
16
		libavformat.so:multimedia/ffmpeg \
18
		libopenal.so:audio/openal-soft
17
		libopenal.so:audio/openal-soft
19
18
20
USES=		desktop-file-utils gmake pkgconfig tar:xz
19
USES=		autoreconf desktop-file-utils gmake iconv pkgconfig tar:xz
21
USE_GL=		glew
20
USE_GL=		gl glu glew
22
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
23
INSTALLS_ICONS=	yes
22
INSTALLS_ICONS=	yes
24
USE_QT4=	moc_build opengl rcc_build
23
USE_QT5=	buildtools_build core gui opengl widgets
24
USE_CXXSTD=	c++11
25
25
26
# no port fow equalizer now, lirc detecting not working
26
# no port fow equalizer now, lirc detecting not working
27
CONFIGURE_ARGS=	--without-equalizer --without-liblircclient --docdir=${DOCSDIR}
27
CONFIGURE_ARGS=	--without-equalizer --without-lirc --docdir=${DOCSDIR}
28
28
29
EXTRA_PATCHES= ${FILESDIR}/glew-fix-7098cd6a.patch
30
29
INFO=		bino
31
INFO=		bino
30
32
31
OPTIONS_DEFINE=	NLS DOCS
33
OPTIONS_DEFINE=	NLS DOCS
(-)multimedia/bino/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (bino-1.4.2.tar.xz) = 6cd88eb16ffee30a3cbb9b5d313feb61b91068387ae846ff96d9e99dcb5c88b6
1
TIMESTAMP = 1509794928
2
SIZE (bino-1.4.2.tar.xz) = 794272
2
SHA256 (bino-1.6.5.tar.xz) = 3254316d3ae81cc69643dcd823caaac1233704d91289272d0011ced5e5cdffe2
3
SIZE (bino-1.6.5.tar.xz) = 825008
(-)multimedia/bino/files/glew-fix-7098cd6a.patch (+208 lines)
Line 0 Link Here
1
From 7098cd6afb7ed805de085ed72a5a3ff56e529277 Mon Sep 17 00:00:00 2001
2
From: Martin Lambers <marlam@marlam.de>
3
Date: Sun, 18 Dec 2016 14:37:52 +0100
4
Subject: Revert "Always use GLEWmx, do not fall back to GLEW."
5
6
This reverts commit eaf9278782b32a13cea19d1be331cb74a6cddce9.
7
---
8
 configure.ac            | 15 +++++++++++++--
9
 src/Makefile.am         |  8 ++++++--
10
 src/video_output.h      |  4 +++-
11
 src/video_output_qt.cpp | 13 ++++++++-----
12
 src/video_output_qt.h   | 20 +++++++++++++-------
13
 5 files changed, 43 insertions(+), 17 deletions(-)
14
15
diff --git a/configure.ac b/configure.ac
16
index 52181ed..03c6b58 100644
17
--- configure.ac
18
+++ configure.ac
19
@@ -296,7 +296,9 @@ fi
20
 AC_DEFINE_UNQUOTED([HAVE_LIBEQUALIZER], [$HAVE_LIBEQUALIZER], [Have Equalizer?])
21
 AM_CONDITIONAL([HAVE_LIBEQUALIZER], [test "$HAVE_LIBEQUALIZER" = "1"])
22
 
23
-dnl glewmx
24
+dnl glew
25
+dnl With Equalizer, we need glewmx, since that is what Equalizer uses.
26
+dnl Without Equalizer, glew (without mx) is ok to use, too.
27
 PKG_CHECK_MODULES([libglewmx], [glewmx >= 1.6.0], [HAVE_LIBGLEWMX=1], [HAVE_LIBGLEWMX=0])
28
 if test "$HAVE_LIBGLEWMX" != "1"; then
29
     AC_MSG_WARN([required library libglewmx >= 1.6.0 not found:])
30
@@ -304,6 +306,15 @@ if test "$HAVE_LIBGLEWMX" != "1"; then
31
     AC_MSG_WARN([libglewmx is provided by glew; Debian package: libglewmx-dev])
32
 fi
33
 AM_CONDITIONAL([HAVE_LIBGLEWMX], [test "$HAVE_LIBGLEWMX" = "1"])
34
+if test "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBEQUALIZER" != "1"; then
35
+    AC_MSG_NOTICE([trying to use libglew instead of libglewmx])
36
+    PKG_CHECK_MODULES([libglew], [glew >= 1.6.0], [HAVE_LIBGLEW=1], [HAVE_LIBGLEW=0])
37
+    if test "$HAVE_LIBGLEW" != "1"; then
38
+        AC_MSG_WARN([required library libglew >= 1.6.0 not found:])
39
+        AC_MSG_WARN([$libglew_PKG_ERRORS])
40
+        AC_MSG_WARN([libglew is provided by glew; Debian package: libglew-dev])
41
+    fi
42
+fi
43
 
44
 dnl libXNVCtrl
45
 AC_ARG_WITH([xnvctrl],
46
@@ -390,7 +401,7 @@ if test "$am_cv_func_iconv" != "yes" \
47
     -o "$HAVE_LIBASS" != "1" \
48
     -o "$HAVE_LIBOPENAL" != "1" \
49
     -o "$HAVE_LIBQTOPENGL" != "1" \
50
-    -o "$HAVE_LIBGLEWMX" != "1" \
51
+    -o \( "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBGLEW" != "1" \) \
52
     -o \( "$equalizer" = "yes" -a "$HAVE_LIBEQUALIZER" != "1" \) \
53
     -o \( "$xnvctrl" = "yes" -a "$HAVE_LIBXNVCTRL" != "1" \) \
54
     -o \( "$lirc" = "yes" -a "$HAVE_LIRC" != "1" \) ; then
55
diff --git a/src/Makefile.am b/src/Makefile.am
56
index 6fc12bb..65cbae6 100644
57
--- src/Makefile.am
58
+++ src/Makefile.am
59
@@ -149,11 +149,15 @@ DEFS += -DHTMLDIR=\"$(htmldir)\" -DLOCALEDIR=\"$(localedir)\"
60
 
61
 AM_CPPFLAGS = \
62
 	$(libavformat_CFLAGS) $(libavdevice_CFLAGS) $(libswscale_CFLAGS) $(libass_CFLAGS) \
63
-	$(libopenal_CFLAGS) $(libgl_CFLAGS) $(libglewmx_CFLAGS) $(libqtopengl_CFLAGS)
64
+	$(libopenal_CFLAGS) $(libgl_CFLAGS) $(libglewmx_CFLAGS) $(libglew_CFLAGS) $(libqtopengl_CFLAGS)
65
 
66
 bino_LDADD = $(top_builddir)/src/base/libbase.a $(LIBINTL) $(LIBICONV) \
67
 	$(libavformat_LIBS) $(libavdevice_LIBS) $(libswscale_LIBS) $(libass_LIBS) \
68
-	$(libopenal_LIBS) $(libgl_LIBS) $(libglewmx_LIBS) $(libqtopengl_LIBS)
69
+	$(libopenal_LIBS) $(libgl_LIBS) $(libglewmx_LIBS) $(libglew_LIBS) $(libqtopengl_LIBS)
70
+
71
+if HAVE_LIBGLEWMX
72
+AM_CPPFLAGS += -DGLEW_MX
73
+endif
74
 
75
 if HAVE_LIBEQUALIZER
76
 bino_SOURCES += player_equalizer.h player_equalizer.cpp
77
diff --git a/src/video_output.h b/src/video_output.h
78
index 8430ddc..2fd72ce 100644
79
--- src/video_output.h
80
+++ src/video_output.h
81
@@ -1,7 +1,7 @@
82
 /*
83
  * This file is part of bino, a 3D video player.
84
  *
85
- * Copyright (C) 2010, 2011, 2012, 2015
86
+ * Copyright (C) 2010, 2011, 2012, 2015, 2016
87
  * Martin Lambers <marlam@marlam.de>
88
  * Frédéric Devernay <Frederic.Devernay@inrialpes.fr>
89
  * Joe <cuchac@email.cz>
90
@@ -128,7 +128,9 @@ private:
91
 protected:
92
     subtitle_renderer _subtitle_renderer;
93
 
94
+#ifdef GLEW_MX
95
     virtual GLEWContext* glewGetContext() const = 0;
96
+#endif
97
 
98
     // Get the total viewport size.
99
     int full_display_width() const;
100
diff --git a/src/video_output_qt.cpp b/src/video_output_qt.cpp
101
index 0758892..ab82388 100644
102
--- src/video_output_qt.cpp
103
+++ src/video_output_qt.cpp
104
@@ -1,7 +1,7 @@
105
 /*
106
  * This file is part of bino, a 3D video player.
107
  *
108
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015
109
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016
110
  * Martin Lambers <marlam@marlam.de>
111
  * Frédéric Devernay <frederic.devernay@inrialpes.fr>
112
  * Joe <cuchac@email.cz>
113
@@ -80,11 +80,13 @@ gl_thread::gl_thread(video_output_qt* vo_qt, video_output_qt_widget* vo_qt_widge
114
 {
115
 }
116
 
117
-#if HAVE_X11
118
+#ifdef GLEW_MX
119
+# if HAVE_X11
120
 GLXEWContext* gl_thread::glxewGetContext() const
121
 {
122
     return _vo_qt->glxewGetContext();
123
 }
124
+# endif
125
 #endif
126
 
127
 void gl_thread::set_render(bool r)
128
@@ -781,17 +783,18 @@ void video_output_qt::create_widget()
129
     process_events();
130
 }
131
 
132
-#if HAVE_X11
133
+#ifdef GLEW_MX
134
+# if HAVE_X11
135
 GLXEWContext* video_output_qt::glxewGetContext() const
136
 {
137
     return const_cast<GLXEWContext*>(&_glxew_context);
138
 }
139
-#endif
140
-
141
+# endif
142
 GLEWContext* video_output_qt::glewGetContext() const
143
 {
144
     return const_cast<GLEWContext*>(&_glew_context);
145
 }
146
+#endif
147
 
148
 bool video_output_qt::context_is_stereo() const
149
 {
150
diff --git a/src/video_output_qt.h b/src/video_output_qt.h
151
index 1cc3174..089bac9 100644
152
--- src/video_output_qt.h
153
+++ src/video_output_qt.h
154
@@ -1,7 +1,7 @@
155
 /*
156
  * This file is part of bino, a 3D video player.
157
  *
158
- * Copyright (C) 2010, 2011, 2012, 2013, 2015
159
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016
160
  * Martin Lambers <marlam@marlam.de>
161
  *
162
  * This program is free software; you can redistribute it and/or modify
163
@@ -69,8 +69,10 @@ private:
164
 public:
165
     gl_thread(video_output_qt* vo_qt, video_output_qt_widget* vo_qt_widget);
166
 
167
-#if HAVE_X11
168
+#ifdef GLEW_MX
169
+# if HAVE_X11
170
     GLXEWContext* glxewGetContext() const;
171
+# endif
172
 #endif
173
 
174
     void set_render(bool r);
175
@@ -166,10 +168,12 @@ protected:
176
 class video_output_qt : public video_output
177
 {
178
 private:
179
-#if HAVE_X11
180
+#ifdef GLEW_MX
181
+# if HAVE_X11
182
     GLXEWContext _glxew_context;
183
-#endif
184
+# endif
185
     GLEWContext _glew_context;
186
+#endif
187
     int _screen_width, _screen_height;
188
     float _screen_pixel_aspect_ratio;
189
     video_container_widget *_container_widget;
190
@@ -192,10 +196,12 @@ private:
191
     void resume_screensaver();
192
 
193
 protected:
194
-#if HAVE_X11
195
-    GLXEWContext* glxewGetContext() const;
196
-#endif
197
+#ifdef GLEW_MX
198
+# if HAVE_X11
199
+    virtual GLXEWContext* glxewGetContext() const;
200
+# endif
201
     virtual GLEWContext* glewGetContext() const;
202
+#endif
203
     virtual bool context_is_stereo() const;
204
     virtual void recreate_context(bool stereo);
205
     virtual void trigger_resize(int w, int h);
206
-- 
207
cgit v1.0-41-gc330
208
(-)multimedia/bino/files/patch-src_base_str.cpp (-20 lines)
Lines 1-20 Link Here
1
--- src/base/str.cpp.orig	2012-10-13 05:01:40 UTC
2
+++ src/base/str.cpp
3
@@ -77,7 +77,7 @@ static inline std::string uint_to_str(T 
4
     do
5
     {
6
         // this assumes an ASCII-compatible character set
7
-        s.insert(0, 1, '0' + x % 10);
8
+        s.insert((size_t)0, (size_t)1, (char)('0' + x % 10));
9
         x /= 10;
10
     }
11
     while (x != 0);
12
@@ -94,7 +94,7 @@ static inline std::string int_to_str(T x
13
     do
14
     {
15
         // this assumes an ASCII-compatible character set
16
-        s.insert(0, 1, (negative ? ('0' - x % 10) : ('0' + x % 10)));
17
+        s.insert((size_t)0, (size_t)1, (char)(negative ? ('0' - x % 10) : ('0' + x % 10)));
18
         x /= 10;
19
     }
20
     while (x != 0);
(-)multimedia/bino/files/patch-src_base_str.h (+10 lines)
Line 0 Link Here
1
--- src/base/str.h.orig	2017-11-04 13:56:43 UTC
2
+++ src/base/str.h
3
@@ -31,6 +31,7 @@
4
 #include <vector>
5
 #include <cstdarg>
6
 #include <cerrno>
7
+#include <ctime>
8
 
9
 #ifdef __GNUC__
10
 # define STR_AFP(a, b) __attribute__ ((format (printf, a, b)))
(-)multimedia/bino/files/patch-src_media__object.cpp (-216 lines)
Lines 1-216 Link Here
1
Some changes are identical to upstream:
2
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=bcba7045c99f
3
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=50b7109633fa
4
http://git.savannah.gnu.org/cgit/bino.git/commit/?id=78023424d4cf
5
6
--- src/media_object.cpp.orig	2013-01-27 21:04:48 UTC
7
+++ src/media_object.cpp
8
@@ -56,6 +56,23 @@ extern "C"
9
 
10
 #include "media_object.h"
11
 
12
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(51, 42, 0)
13
+#define AVPixelFormat PixelFormat
14
+#define AV_PIX_FMT_BGRA PIX_FMT_BGRA
15
+#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
16
+#define AV_PIX_FMT_YUV420P10 PIX_FMT_YUV420P10
17
+#define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P
18
+#define AV_PIX_FMT_YUV422P10 PIX_FMT_YUV422P10
19
+#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
20
+#define AV_PIX_FMT_YUV444P10 PIX_FMT_YUV444P10
21
+#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
22
+#define AV_PIX_FMT_YUVJ422P PIX_FMT_YUVJ422P
23
+#define AV_PIX_FMT_YUVJ444P PIX_FMT_YUVJ444P
24
+#endif
25
+
26
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 25, 0)
27
+#define AV_CODEC_ID_TEXT CODEC_ID_TEXT
28
+#endif
29
 
30
 // The read thread.
31
 // This thread reads packets from the AVFormatContext and stores them in the
32
@@ -150,7 +167,8 @@ public:
33
 // Hide the FFmpeg stuff so that their messy header files cannot cause problems
34
 // in other source files.
35
 
36
-static const size_t audio_tmpbuf_size = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
37
+static const size_t max_audio_frame_size = 19200; // 1 second of 48khz 32bit audio
38
+static const size_t audio_tmpbuf_size = (max_audio_frame_size * 3) / 2;
39
 
40
 struct ffmpeg_stuff
41
 {
42
@@ -422,20 +440,20 @@ void media_object::set_video_frame_templ
43
     video_frame_template.value_range = video_frame::u8_full;
44
     video_frame_template.chroma_location = video_frame::center;
45
     if (!_always_convert_to_bgra32
46
-            && (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
47
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
48
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
49
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
50
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P
51
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10))
52
+            && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
53
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
54
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
55
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
56
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P
57
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10))
58
     {
59
-        if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P
60
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10)
61
+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P
62
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10)
63
         {
64
             video_frame_template.layout = video_frame::yuv444p;
65
         }
66
-        else if (video_codec_ctx->pix_fmt == PIX_FMT_YUV422P
67
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10)
68
+        else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P
69
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10)
70
         {
71
             video_frame_template.layout = video_frame::yuv422p;
72
         }
73
@@ -448,9 +466,9 @@ void media_object::set_video_frame_templ
74
         {
75
             video_frame_template.color_space = video_frame::yuv709;
76
         }
77
-        if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10
78
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10
79
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10)
80
+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10
81
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10
82
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10)
83
         {
84
             video_frame_template.value_range = video_frame::u10_mpeg;
85
             if (video_codec_ctx->color_range == AVCOL_RANGE_JPEG)
86
@@ -477,15 +495,15 @@ void media_object::set_video_frame_templ
87
         }
88
     }
89
     else if (!_always_convert_to_bgra32
90
-            && (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P
91
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P
92
-                || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ420P))
93
+            && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P
94
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P
95
+                || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ420P))
96
     {
97
-        if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P)
98
+        if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P)
99
         {
100
             video_frame_template.layout = video_frame::yuv444p;
101
         }
102
-        else if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P)
103
+        else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P)
104
         {
105
             video_frame_template.layout = video_frame::yuv422p;
106
         }
107
@@ -879,7 +897,7 @@ void media_object::open(const std::strin
108
     {
109
         _ffmpeg->format_ctx->streams[i]->discard = AVDISCARD_ALL;        // ignore by default; user must activate streams
110
         AVCodecContext *codec_ctx = _ffmpeg->format_ctx->streams[i]->codec;
111
-        AVCodec *codec = (codec_ctx->codec_id == CODEC_ID_TEXT
112
+        AVCodec *codec = (codec_ctx->codec_id == AV_CODEC_ID_TEXT
113
                 ? NULL : avcodec_find_decoder(codec_ctx->codec_id));
114
         // XXX: Sometimes the reported width and height for a video stream change after avcodec_open(),
115
         // but the original values seem to be correct. This seems to happen mostly with 1920x1080 video
116
@@ -899,8 +917,8 @@ void media_object::open(const std::strin
117
             if (codec_ctx->lowres || (codec && (codec->capabilities & CODEC_CAP_DR1)))
118
                 codec_ctx->flags |= CODEC_FLAG_EMU_EDGE;
119
         }
120
-        // Find and open the codec. CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data.
121
-        if (codec_ctx->codec_id != CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0))
122
+        // Find and open the codec. AV_CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data.
123
+        if (codec_ctx->codec_id != AV_CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0))
124
         {
125
             msg::wrn(_("%s stream %d: Cannot open %s: %s"), _url.c_str(), i,
126
                     codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO ? _("video codec")
127
@@ -928,10 +946,15 @@ void media_object::open(const std::strin
128
             _ffmpeg->video_packets.push_back(AVPacket());
129
             av_init_packet(&(_ffmpeg->video_packets[j]));
130
             _ffmpeg->video_decode_threads.push_back(video_decode_thread(_url, _ffmpeg, j));
131
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
132
             _ffmpeg->video_frames.push_back(avcodec_alloc_frame());
133
             _ffmpeg->video_buffered_frames.push_back(avcodec_alloc_frame());
134
-            enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
135
-                    ? PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
136
+#else
137
+            _ffmpeg->video_frames.push_back(av_frame_alloc());
138
+            _ffmpeg->video_buffered_frames.push_back(av_frame_alloc());
139
+#endif
140
+            enum AVPixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32
141
+                    ? AV_PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt);
142
             int frame_bufsize = (avpicture_get_size(frame_fmt,
143
                         _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height));
144
             _ffmpeg->video_buffers.push_back(static_cast<uint8_t *>(av_malloc(frame_bufsize)));
145
@@ -944,20 +967,24 @@ void media_object::open(const std::strin
146
             if (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32)
147
             {
148
                 // Initialize things needed for software pixel format conversion
149
-                int sws_bufsize = avpicture_get_size(PIX_FMT_BGRA,
150
+                int sws_bufsize = avpicture_get_size(AV_PIX_FMT_BGRA,
151
                         _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
152
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1)
153
                 _ffmpeg->video_sws_frames.push_back(avcodec_alloc_frame());
154
+#else
155
+                _ffmpeg->video_sws_frames.push_back(av_frame_alloc());
156
+#endif
157
                 _ffmpeg->video_sws_buffers.push_back(static_cast<uint8_t *>(av_malloc(sws_bufsize)));
158
                 if (!_ffmpeg->video_sws_frames[j] || !_ffmpeg->video_sws_buffers[j])
159
                 {
160
                     throw exc(HERE + ": " + strerror(ENOMEM));
161
                 }
162
                 avpicture_fill(reinterpret_cast<AVPicture *>(_ffmpeg->video_sws_frames[j]), _ffmpeg->video_sws_buffers[j],
163
-                        PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
164
+                        AV_PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height);
165
                 // Call sws_getCachedContext(NULL, ...) instead of sws_getContext(...) just to avoid a deprecation warning.
166
                 _ffmpeg->video_sws_ctxs.push_back(sws_getCachedContext(NULL,
167
                             _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, _ffmpeg->video_codec_ctxs[j]->pix_fmt,
168
-                            _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, PIX_FMT_BGRA,
169
+                            _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, AV_PIX_FMT_BGRA,
170
                             SWS_POINT, NULL, NULL, NULL));
171
                 if (!_ffmpeg->video_sws_ctxs[j])
172
                 {
173
@@ -1000,9 +1027,9 @@ void media_object::open(const std::strin
174
             int j = _ffmpeg->subtitle_streams.size() - 1;
175
             msg::dbg(_url + " stream " + str::from(i) + " is subtitle stream " + str::from(j) + ".");
176
             _ffmpeg->subtitle_codec_ctxs.push_back(codec_ctx);
177
-            // CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
178
+            // AV_CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
179
             _ffmpeg->subtitle_codecs.push_back(
180
-                    _ffmpeg->subtitle_codec_ctxs[j]->codec_id == CODEC_ID_TEXT ? NULL : codec);
181
+                    _ffmpeg->subtitle_codec_ctxs[j]->codec_id == AV_CODEC_ID_TEXT ? NULL : codec);
182
             _ffmpeg->subtitle_box_templates.push_back(subtitle_box());
183
             set_subtitle_box_template(j);
184
             _ffmpeg->subtitle_decode_threads.push_back(subtitle_decode_thread(_url, _ffmpeg, j));
185
@@ -1505,7 +1532,7 @@ read_frame:
186
                 // We need to buffer the data because FFmpeg will clubber it when decoding the next frame.
187
                 av_picture_copy(reinterpret_cast<AVPicture *>(_ffmpeg->video_buffered_frames[_video_stream]),
188
                         reinterpret_cast<AVPicture *>(_ffmpeg->video_frames[_video_stream]),
189
-                        static_cast<enum PixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
190
+                        static_cast<enum AVPixelFormat>(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt),
191
                         _ffmpeg->video_codec_ctxs[_video_stream]->width,
192
                         _ffmpeg->video_codec_ctxs[_video_stream]->height);
193
                 src_frame = _ffmpeg->video_buffered_frames[_video_stream];
194
@@ -1776,8 +1803,8 @@ void subtitle_decode_thread::run()
195
         int got_subtitle;
196
         tmppacket = packet;
197
 
198
-        // CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
199
-        if (_ffmpeg->subtitle_codec_ctxs[_subtitle_stream]->codec_id == CODEC_ID_TEXT)
200
+        // AV_CODEC_ID_TEXT does not have any decoder; it is just UTF-8 text in the packet data.
201
+        if (_ffmpeg->subtitle_codec_ctxs[_subtitle_stream]->codec_id == AV_CODEC_ID_TEXT)
202
         {
203
             int64_t duration = packet.convergence_duration * 1000000
204
                 * _ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[_subtitle_stream]]->time_base.num
205
@@ -1937,9 +1964,9 @@ void media_object::seek(int64_t dest_pos
206
     }
207
     for (size_t i = 0; i < _ffmpeg->subtitle_streams.size(); i++)
208
     {
209
-        if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != CODEC_ID_TEXT)
210
+        if (_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec->codec_id != AV_CODEC_ID_TEXT)
211
         {
212
-            // CODEC_ID_TEXT has no decoder, so we cannot flush its buffers
213
+            // AV_CODEC_ID_TEXT has no decoder, so we cannot flush its buffers
214
             avcodec_flush_buffers(_ffmpeg->format_ctx->streams[_ffmpeg->subtitle_streams[i]]->codec);
215
         }
216
         _ffmpeg->subtitle_box_buffers[i].clear();
(-)multimedia/bino/pkg-plist (-1 / +3 lines)
Lines 36-45 Link Here
36
%%DOCSDIR%%/input-layout-alternating-left-right.png
36
%%DOCSDIR%%/input-layout-alternating-left-right.png
37
%%DOCSDIR%%/input-layout-alternating-right-left.png
37
%%DOCSDIR%%/input-layout-alternating-right-left.png
38
%%DOCSDIR%%/output-type-alternating.png
38
%%DOCSDIR%%/output-type-alternating.png
39
%%NLS%%share/locale/bg/LC_MESSAGES/bino.mo
40
%%NLS%%share/locale/cs/LC_MESSAGES/bino.mo
39
%%NLS%%share/locale/de/LC_MESSAGES/bino.mo
41
%%NLS%%share/locale/de/LC_MESSAGES/bino.mo
40
%%NLS%%share/locale/fr/LC_MESSAGES/bino.mo
42
%%NLS%%share/locale/fr/LC_MESSAGES/bino.mo
41
%%NLS%%share/locale/ru/LC_MESSAGES/bino.mo
43
%%NLS%%share/locale/ru/LC_MESSAGES/bino.mo
42
%%NLS%%share/locale/bg/LC_MESSAGES/bino.mo
44
%%NLS%%share/locale/zh_cn/LC_MESSAGES/bino.mo
43
bin/bino
45
bin/bino
44
share/applications/bino.desktop
46
share/applications/bino.desktop
45
share/icons/hicolor/16x16/apps/bino.png
47
share/icons/hicolor/16x16/apps/bino.png

Return to bug 223426