[neon/extras/phonon-backend-vlc/Neon/release] debian/patches: yet another try for debugging
Harald Sitter
null at kde.org
Mon Mar 22 12:16:26 GMT 2021
Git commit 3bde79ed29beab3e3951aaff2e42fbdaac5202b9 by Harald Sitter.
Committed on 22/03/2021 at 12:16.
Pushed by sitter into branch 'Neon/release'.
yet another try for debugging
M +21 -107 debian/patches/0001-line-calc-variants.patch
https://invent.kde.org/neon/extras/phonon-backend-vlc/commit/3bde79ed29beab3e3951aaff2e42fbdaac5202b9
diff --git a/debian/patches/0001-line-calc-variants.patch b/debian/patches/0001-line-calc-variants.patch
index 1ae6b58..92e5d72 100644
--- a/debian/patches/0001-line-calc-variants.patch
+++ b/debian/patches/0001-line-calc-variants.patch
@@ -1,123 +1,37 @@
-From fe1902d6063c9fafba93d982560bd4d7d9589f46 Mon Sep 17 00:00:00 2001
+From dcfb93446b5d8d508d079f99db6832bcef2f7b5e Mon Sep 17 00:00:00 2001
From: Harald Sitter <sitter at kde.org>
Date: Fri, 19 Mar 2021 16:06:19 +0100
Subject: [PATCH] line calc variants
-temporary patch to get some debugging data
+temporary patch
---
- src/video/videomemorystream.cpp | 10 ++++-
- src/video/videowidget.cpp | 69 ++++++++++++++++++++++++++++++---
- 2 files changed, 72 insertions(+), 7 deletions(-)
+ src/video/videowidget.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
-diff --git a/src/video/videomemorystream.cpp b/src/video/videomemorystream.cpp
-index 6886bcf..d6426f2 100644
---- a/src/video/videomemorystream.cpp
-+++ b/src/video/videomemorystream.cpp
-@@ -135,7 +135,15 @@ unsigned VideoMemoryStream::formatCallbackInternal(void **opaque, char *chroma,
- unsigned *width, unsigned *height,
- unsigned *pitches, unsigned *lines)
- {
-- return P_THIS->formatCallback(chroma, width, height, pitches, lines);
-+ auto ret = P_THIS->formatCallback(chroma, width, height, pitches, lines);
-+ qDebug("FORMAT[chroma: %s, w: %d, h: %d, pitch: %d, lines: %d, size: %d]",
-+ chroma,
-+ *width,
-+ *height,
-+ pitches[0],
-+ lines[0],
-+ ret);
-+ return ret;
- }
-
- void VideoMemoryStream::formatCleanUpCallbackInternal(void *opaque)
diff --git a/src/video/videowidget.cpp b/src/video/videowidget.cpp
-index bc03f8e..2a77633 100644
+index bc03f8e..0616e19 100644
--- a/src/video/videowidget.cpp
+++ b/src/video/videowidget.cpp
-@@ -26,6 +26,7 @@
- #include <QPaintEvent>
-
- #include <vlc/vlc.h>
-+#include <vlc/plugins/vlc_picture.h>
-
- #include "utils/debug.h"
- #include "mediaobject.h"
-@@ -90,13 +91,69 @@ private:
- unsigned *pitches,
- unsigned *lines)
- {
-+ fprintf(stderr, "-------- %d %d\n", *width, *height);
-+ QImage rgb32(*width, *height, QImage::Format_RGB32);
-+
-+ fprintf(stderr, "rgb32 %d %lld %lld\n", rgb32.bytesPerLine(), rgb32.sizeInBytes() / rgb32.bytesPerLine(), rgb32.sizeInBytes());
-+
-+ const auto b = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32), *width, *height, pitches, lines);
-+ fprintf(stderr, "V rgb32 %d %d %d\n", *pitches, *lines, b);
-+
-+ // Fairly unclear what the last two arguments do, they same to make no diff for the planes though, so I guess they can be anything in our case.
-+ auto picture = picture_New(VLC_CODEC_RGB32, *width, *height, 0, 0);
-+ for (auto i = 0; i < picture->i_planes; ++i) {
-+ auto plane = picture->p[i];
-+ pitches[i] = plane.i_pitch;
-+ lines[i] = plane.i_lines;
+@@ -48,6 +48,11 @@ public:
+ // Plus VLC can actually skip frames as necessary.
+ QMutexLocker lock(&m_mutex);
+ Q_UNUSED(event);
+
-+ fprintf(stderr,
-+ ":: V rgb32 [%d] pitch %d lines %d vpitch %d vlines %d\n",
-+ plane.i_pitch,
-+ plane.i_lines,
-+ plane.i_visible_pitch,
-+ plane.i_visible_lines,
-+ plane.i_pixel_pitch);
++ if (m_plane.isEmpty() || m_frame.isNull()) {
++ return;
+ }
+
+ QPainter painter(widget);
+ // When using OpenGL for the QPaintEngine drawing the same QImage twice
+ // does not actually result in a texture change for one reason or another.
+@@ -90,6 +95,7 @@ private:
+ unsigned *pitches,
+ unsigned *lines)
+ {
++ QMutexLocker lock(&m_mutex);
qstrcpy(chroma, "RV32");
-- unsigned bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32),
-- *width, *height,
-- pitches, lines);
-- m_plane.resize(bufferSize);
-- m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
-- *width, *height, pitches[0], QImage::Format_RGB32);
-+ unsigned bufferSize = 0;
-+ if (qEnvironmentVariableIsSet("P_OUR_MATHS")) {
-+ bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32), *width, *height, pitches, lines);
-+ m_plane.resize(bufferSize);
-+ m_frame = QImage(
-+ reinterpret_cast<const uchar *>(m_plane.constData()), *width, *height, pitches[0], QImage::Format_RGB32);
-+ } else if (qEnvironmentVariableIsSet("P_QIMAGE")) {
-+ *pitches = rgb32.bytesPerLine();
-+ *lines = rgb32.sizeInBytes() / rgb32.bytesPerLine();
-+ bufferSize = rgb32.sizeInBytes();
-+ m_plane.resize(bufferSize);
-+ m_frame = rgb32;
-+ } else if (qEnvironmentVariableIsSet("P_PIC_ALIGN")) {
-+ *pitches = picture->p[0].i_pitch;
-+ *lines = picture->p[0].i_lines;
-+ bufferSize = *pitches * *lines;
-+ m_plane.resize(bufferSize);
-+ m_frame = QImage(
-+ reinterpret_cast<const uchar *>(m_plane.constData()), *width, *height, pitches[0], QImage::Format_RGB32);
-+
-+ } else if (qEnvironmentVariableIsSet("P_PIC_VIS")) {
-+ *pitches = picture->p[0].i_visible_pitch;
-+ *lines = picture->p[0].i_visible_pitch;
-+ bufferSize = *pitches * *lines;
-+ m_plane.resize(bufferSize);
-+ m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
-+ *width,
-+ *height,
-+ pitches[0],
-+ QImage::Format_RGB32);
-+ } else {
-+ bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32),
-+ *width, *height,
-+ pitches, lines);
-+ m_plane.resize(bufferSize);
-+ m_frame = QImage(reinterpret_cast<const uchar *>(m_plane.constData()),
-+ *width, *height, pitches[0], QImage::Format_RGB32);
-+ }
- return bufferSize;
- }
-
+ unsigned bufferSize = setPitchAndLines(vlc_fourcc_GetChromaDescription(VLC_CODEC_RGB32),
+ *width, *height,
--
2.25.1
More information about the Neon-commits
mailing list