[neon/extras/subtitlecomposer/Neon/release] debian/patches: drop patches for new version

Carlos De Maine null at kde.org
Wed Dec 20 03:35:35 GMT 2023


Git commit 2d430e2c8ea22b7763bd8cbafba330288cf7526a by Carlos De Maine.
Committed on 20/12/2023 at 04:35.
Pushed by carlosdem into branch 'Neon/release'.

drop patches for new version

D  +0    -121  debian/patches/gles_support.patch
D  +0    -3    debian/patches/series
D  +0    -65   debian/patches/upstream_Fix-compilation-with-ffmpeg5-63.patch
D  +0    -32   debian/patches/upstream_VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch

https://invent.kde.org/neon/extras/subtitlecomposer/-/commit/2d430e2c8ea22b7763bd8cbafba330288cf7526a

diff --git a/debian/patches/gles_support.patch b/debian/patches/gles_support.patch
deleted file mode 100644
index cc97b50..0000000
--- a/debian/patches/gles_support.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 167a941f8070f4a9abacb3aa2f61ee6ee00d6cb8 Mon Sep 17 00:00:00 2001
-From: Mladen Milinkovic <maxrd2 at smoothware.net>
-Date: Thu, 7 Oct 2021 19:37:23 +0200
-Subject: [PATCH] GLRenderer: added GLES support
-
----
- src/videoplayer/backend/glrenderer.cpp | 44 ++++++++++++++++++++++----
- 1 file changed, 38 insertions(+), 6 deletions(-)
-
-diff --git a/src/videoplayer/backend/glrenderer.cpp b/src/videoplayer/backend/glrenderer.cpp
-index 7c9c38b..5cb985d 100644
---- a/src/videoplayer/backend/glrenderer.cpp
-+++ b/src/videoplayer/backend/glrenderer.cpp
-@@ -20,6 +20,7 @@ extern "C" {
- }
-
- #define DEBUG_GL 0
-+#define FORCE_GLES 0
- #define OPENGL_CORE 0
- #define OPENGL_VER 2,0
-
-@@ -33,6 +34,17 @@ extern "C" {
- #define asGL(glCall) glCall
- #endif
-
-+#if defined(GL_ES_VERSION_2_0) || FORCE_GLES
-+#define USE_GLES
-+#define TEXTURE_RGB_FORMAT GL_RGBA
-+// NOTE: we don't currently support more than 8bpp on GLES
-+#define TEXTURE_U16_FORMAT GL_R8
-+#else
-+#undef USE_GLES
-+#define TEXTURE_RGB_FORMAT GL_BGRA
-+#define TEXTURE_U16_FORMAT GL_R16
-+#endif
-+
- using namespace SubtitleComposer;
-
- enum { ID_Y, ID_U, ID_V, ID_OVR, ID_SIZE };
-@@ -82,6 +94,9 @@ void
- GLRenderer::setupProfile()
- {
- 	QSurfaceFormat format(QSurfaceFormat::defaultFormat());
-+#if FORCE_GLES
-+	format.setRenderableType(QSurfaceFormat::OpenGLES);
-+#endif
- 	format.setVersion(OPENGL_VER);
- #if DEBUG_GL
- 	format.setOption(QSurfaceFormat::DebugContext);
-@@ -126,7 +141,7 @@ GLRenderer::setFrameFormat(int width, int height, int compBits, int crWidthShift
- 	m_crHeight = crHeight;
-
- 	m_glType = compBytes == 1 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT;
--	m_glFormat = compBytes == 1 ? GL_R8 : GL_R16;
-+	m_glFormat = compBytes == 1 ? GL_R8 : TEXTURE_U16_FORMAT;
-
- 	delete[] m_bufYUV;
- 	m_bufSize = bufSize;
-@@ -261,7 +276,11 @@ GLRenderer::initShader()
- 	delete m_vertShader;
- 	m_vertShader = new QOpenGLShader(QOpenGLShader::Vertex, this);
- 	bool success = m_vertShader->compileSourceCode(
-+#ifdef USE_GLES
-+		"#version 100\n"
-+#else
- 		"#version 120\n"
-+#endif
- 		"attribute vec4 vPos;"
- 		"attribute vec2 vVidTex;"
- 		"attribute vec2 vOvrTex;"
-@@ -288,7 +307,13 @@ GLRenderer::initShader()
- 		csms.append(QString::number(csm[i], 'g', 10));
- 	}
-
--	success = m_fragShader->compileSourceCode(QStringLiteral("#version 120\n"
-+	success = m_fragShader->compileSourceCode(QStringLiteral(
-+#ifdef USE_GLES
-+		"#version 100\n"
-+		"precision mediump float;\n"
-+#else
-+		"#version 120\n"
-+#endif
- 		"varying vec2 vfVidTex;"
- 		"varying vec2 vfOvrTex;"
- 		"uniform sampler2D texY;"
-@@ -348,8 +373,15 @@ GLRenderer::initializeGL()
- 	QMutexLocker l(&m_texMutex);
-
- 	initializeOpenGLFunctions();
--	qDebug() << "OpenGL version: " << reinterpret_cast<const char *>(glGetString(GL_VERSION));
--	qDebug() << "GLSL version: " << reinterpret_cast<const char *>(glGetString(GL_SHADING_LANGUAGE_VERSION));
-+	qDebug().nospace() << "GL API: OpenGL " << (format().renderableType() == QSurfaceFormat::OpenGLES ? "ES" : "Desktop")
-+		<< ' ' << format().majorVersion() << "." << format().minorVersion()
-+#ifdef USE_GLES
-+		<< " (compiled for OpenGL ES)";
-+#else
-+		<< " (compiled for OpenGL Desktop)";
-+#endif
-+	qDebug() << "OpenGL version:" << reinterpret_cast<const char *>(glGetString(GL_VERSION));
-+	qDebug() << "GLSL version:" << reinterpret_cast<const char *>(glGetString(GL_SHADING_LANGUAGE_VERSION));
-
- 	if(m_vao.create())
- 		m_vao.bind();
-@@ -453,13 +485,13 @@ GLRenderer::uploadMM(int texWidth, int texHeight, T *texBuf, const T *texSrc)
- 			if(D == 1) {
- 				asGL(glTexImage2D(GL_TEXTURE_2D, level, m_glFormat, texWidth, texHeight, 0, GL_RED, m_glType, texSrc));
- 			} else { // D == 4
--				asGL(glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, texWidth, texHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, texSrc));
-+				asGL(glTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, texWidth, texHeight, 0, TEXTURE_RGB_FORMAT, GL_UNSIGNED_BYTE, texSrc));
- 			}
- 		} else {
- 			if(D == 1) {
- 				asGL(glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, texWidth, texHeight, GL_RED, m_glType, texSrc));
- 			} else { // D == 4
--				asGL(glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, texWidth, texHeight, GL_BGRA, GL_UNSIGNED_BYTE, texSrc));
-+				asGL(glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, texWidth, texHeight, TEXTURE_RGB_FORMAT, GL_UNSIGNED_BYTE, texSrc));
- 			}
- 		}
-
---
-GitLab
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 1444505..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-upstream_Fix-compilation-with-ffmpeg5-63.patch
-upstream_VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch
-gles_support.patch
diff --git a/debian/patches/upstream_Fix-compilation-with-ffmpeg5-63.patch b/debian/patches/upstream_Fix-compilation-with-ffmpeg5-63.patch
deleted file mode 100644
index 89901d6..0000000
--- a/debian/patches/upstream_Fix-compilation-with-ffmpeg5-63.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 4f4f560e40ba0b760cf688eb024be3cc734ca347 Mon Sep 17 00:00:00 2001
-From: Mladen Milinkovic <maxrd2 at smoothware.net>
-Date: Tue, 25 Jan 2022 14:01:56 +0100
-Subject: [PATCH] Fix compilation with ffmpeg5 #63
-
----
- src/streamprocessor/streamprocessor.cpp   | 2 +-
- src/videoplayer/backend/decoder.h         | 1 +
- src/videoplayer/backend/framequeue.h      | 1 +
- src/videoplayer/backend/streamdemuxer.cpp | 2 +-
- 4 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
-index b86795e..8faf8a2 100644
---- a/src/streamprocessor/streamprocessor.cpp
-+++ b/src/streamprocessor/streamprocessor.cpp
-@@ -195,7 +195,7 @@ StreamProcessor::findStream(int streamType, int streamIndex, bool imageSub)
- 		int ret;
- 		char errorText[1024];
- 
--		AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
-+		const AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
- 		if(!dec) {
- 			qWarning() << "Failed to find decoder for stream" << i;
- 			return false;
-diff --git a/src/videoplayer/backend/decoder.h b/src/videoplayer/backend/decoder.h
-index 4ab95b2..fb6840d 100644
---- a/src/videoplayer/backend/decoder.h
-+++ b/src/videoplayer/backend/decoder.h
-@@ -11,6 +11,7 @@
- #include <QThread>
- 
- extern "C" {
-+#include "libavcodec/avcodec.h"
- #include "libavformat/avformat.h"
- }
- 
-diff --git a/src/videoplayer/backend/framequeue.h b/src/videoplayer/backend/framequeue.h
-index dc9b2fa..ece1166 100644
---- a/src/videoplayer/backend/framequeue.h
-+++ b/src/videoplayer/backend/framequeue.h
-@@ -9,6 +9,7 @@
- #define FRAMEQUEUE_H
- 
- extern "C" {
-+#include "libavcodec/avcodec.h"
- #include "libavformat/avformat.h"
- }
- 
-diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
-index 1e339b3..e8320ea 100644
---- a/src/videoplayer/backend/streamdemuxer.cpp
-+++ b/src/videoplayer/backend/streamdemuxer.cpp
-@@ -230,7 +230,7 @@ StreamDemuxer::componentOpen(int streamIndex)
- {
- 	AVFormatContext *ic = m_vs->fmtContext;
- 	AVCodecContext *avCtx;
--	AVCodec *codec;
-+	const AVCodec *codec;
- 	AVDictionary *opts = nullptr;
- 	AVDictionaryEntry *t = nullptr;
- 	int sampleRate, nbChannels;
--- 
-2.35.1
-
diff --git a/debian/patches/upstream_VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch b/debian/patches/upstream_VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch
deleted file mode 100644
index 41fc996..0000000
--- a/debian/patches/upstream_VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d8f9797d9c0d45fa9f4402f79c539544b74d2cc7 Mon Sep 17 00:00:00 2001
-From: Mladen Milinkovic <maxrd2 at smoothware.net>
-Date: Fri, 1 Apr 2022 08:35:17 +0200
-Subject: [PATCH] VideoPlayer: Fix usage of deprecated/removed AVCodec option
- #68
-
-AVCodecContext.refcounted_frames was useful for deprecated API only
-(avcodec_decode_video2/avcodec_decode_audio4). The new decode APIs
-(avcodec_send_packet/avcodec_receive_frame) always work with reference
-counted frames
-
-https://github.com/FFmpeg/FFmpeg/commit/b1cf151c4dfdbd049cd41863b4e0cde927585e17
----
- src/videoplayer/backend/streamdemuxer.cpp | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
-index e8320ea..7173306 100644
---- a/src/videoplayer/backend/streamdemuxer.cpp
-+++ b/src/videoplayer/backend/streamdemuxer.cpp
-@@ -286,8 +286,6 @@ StreamDemuxer::componentOpen(int streamIndex)
- 		av_dict_set(&opts, "threads", "auto", 0);
- 	if(stream_lowres)
- 		av_dict_set_int(&opts, "lowres", stream_lowres, 0);
--	if(avCtx->codec_type == AVMEDIA_TYPE_VIDEO || avCtx->codec_type == AVMEDIA_TYPE_AUDIO)
--		av_dict_set(&opts, "refcounted_frames", "1", 0);
- 	if((ret = avcodec_open2(avCtx, codec, &opts)) < 0) {
- 		goto fail;
- 	}
--- 
-2.37.2
-


More information about the Neon-commits mailing list