* [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/files/
@ 2018-10-13 17:36 Pacho Ramos
0 siblings, 0 replies; 2+ messages in thread
From: Pacho Ramos @ 2018-10-13 17:36 UTC (permalink / raw
To: gentoo-commits
commit: 29cab30f7f561478237caca8337d0ef7c2f69120
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 17:32:36 2018 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct 13 17:35:28 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29cab30f
media-libs/libopenshot: Commit the patch
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../files/libopenshot-0.2.2-imagemagick7.patch | 78 ++++++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch b/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch
new file mode 100644
index 00000000000..bc5f738d7f6
--- /dev/null
+++ b/media-libs/libopenshot/files/libopenshot-0.2.2-imagemagick7.patch
@@ -0,0 +1,78 @@
+diff -Nru a/include/TextReader.h b/include/TextReader.h
+--- a/include/TextReader.h 2018-09-22 21:47:46.000000000 +0200
++++ b/include/TextReader.h 2018-09-23 16:17:21.212888285 +0200
+@@ -91,7 +91,7 @@
+ string text_color;
+ string background_color;
+ std::shared_ptr<Magick::Image> image;
+- list<Magick::Drawable> lines;
++ vector<Magick::Drawable> lines;
+ bool is_open;
+ GravityType gravity;
+
+diff -Nru a/src/Frame.cpp b/src/Frame.cpp
+--- a/src/Frame.cpp 2018-09-22 21:47:46.000000000 +0200
++++ b/src/Frame.cpp 2018-09-23 16:21:44.921563711 +0200
+@@ -29,6 +29,9 @@
+
+ using namespace std;
+ using namespace openshot;
++#ifdef USE_IMAGEMAGICK
++using namespace Magick;
++#endif
+
+ // Constructor - blank frame (300x200 blank image, 48kHz audio silence)
+ Frame::Frame() : number(1), pixel_ratio(1,1), channels(2), width(1), height(1), color("#000000"),
+@@ -904,7 +907,7 @@
+ // Give image a transparent background color
+ magick_image->backgroundColor(Magick::Color("none"));
+ magick_image->virtualPixelMethod(Magick::TransparentVirtualPixelMethod);
+- magick_image->matte(true);
++ magick_image->alpha(true);
+
+ return magick_image;
+ }
+@@ -926,13 +929,14 @@
+ // Iterate through the pixel packets, and load our own buffer
+ // Each color needs to be scaled to 8 bit (using the ImageMagick built-in ScaleQuantumToChar function)
+ int numcopied = 0;
+- Magick::PixelPacket *pixels = new_image->getPixels(0,0, new_image->columns(), new_image->rows());
++ const Quantum *pixels = new_image->getConstPixels(0,0, new_image->columns(), new_image->rows());
+ for (int n = 0, i = 0; n < new_image->columns() * new_image->rows(); n += 1, i += 4) {
+- buffer[i+0] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].red);
+- buffer[i+1] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].green);
+- buffer[i+2] = MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].blue);
+- buffer[i+3] = 255 - MagickCore::ScaleQuantumToChar((Magick::Quantum) pixels[n].opacity);
++ buffer[i+0] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelRed(new_image->image(), pixels));
++ buffer[i+1] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelGreen(new_image->image(), pixels));
++ buffer[i+2] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelBlue(new_image->image(), pixels));
++ buffer[i+3] = MagickCore::ScaleQuantumToChar(MagickCore::GetPixelAlpha(new_image->image(), pixels));
+ numcopied+=4;
++ pixels += MagickCore::GetPixelChannels(new_image->image());
+ }
+
+ // Create QImage of frame data
+diff -Nru a/src/ImageReader.cpp b/src/ImageReader.cpp
+--- a/src/ImageReader.cpp 2018-09-22 21:47:46.000000000 +0200
++++ b/src/ImageReader.cpp 2018-09-23 16:22:32.330865516 +0200
+@@ -59,7 +59,7 @@
+
+ // Give image a transparent background color
+ image->backgroundColor(Magick::Color("none"));
+- image->matte(true);
++ image->alpha(true);
+ }
+ catch (Magick::Exception e) {
+ // raise exception
+diff -Nru a/src/ImageWriter.cpp b/src/ImageWriter.cpp
+--- a/src/ImageWriter.cpp 2018-09-22 21:47:46.000000000 +0200
++++ b/src/ImageWriter.cpp 2018-09-23 16:22:58.380031419 +0200
+@@ -97,7 +97,7 @@
+ std::shared_ptr<Magick::Image> frame_image = frame->GetMagickImage();
+ frame_image->magick( info.vcodec );
+ frame_image->backgroundColor(Magick::Color("none"));
+- frame_image->matte(true);
++ frame_image->alpha(true);
+ frame_image->quality(image_quality);
+ frame_image->animationDelay(info.video_timebase.ToFloat() * 100);
+ frame_image->animationIterations(number_of_loops);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/files/
@ 2022-11-15 22:43 Conrad Kostecki
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2022-11-15 22:43 UTC (permalink / raw
To: gentoo-commits
commit: 3a7b5614acc8b1f272e3851c9dcd0f9ddebd5370
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Nov 14 17:46:25 2022 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 22:42:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a7b5614
media-libs/libopenshot: remove unused patch(es)
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
.../files/libopenshot-0.2.5-gcc10.patch | 58 ----------------------
.../libopenshot-0.2.5-no-hwaccel-testfix.patch | 45 -----------------
2 files changed, 103 deletions(-)
diff --git a/media-libs/libopenshot/files/libopenshot-0.2.5-gcc10.patch b/media-libs/libopenshot/files/libopenshot-0.2.5-gcc10.patch
deleted file mode 100644
index 4a116b120086..000000000000
--- a/media-libs/libopenshot/files/libopenshot-0.2.5-gcc10.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 13290364e7bea54164ab83d973951f2898ad9e23 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <steils@gentoo.org>
-Date: Sat, 16 May 2020 02:33:37 +0300
-Subject: [PATCH] FFmpegUtilities: replace variable definition with statement
- expression
-
-It is needed to avoid multiple definitions of AV_GET_CODEC_CONTEXT,
-which is considered as an error with '-fno-common' which is default
-since gcc-10.
-
-Fixes: #511
-
-Upstream-Status: Submitted
-[https://github.com/OpenShot/libopenshot/pull/512]
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
----
- include/FFmpegUtilities.h | 18 ++++++++----------
- 1 file changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/include/FFmpegUtilities.h b/include/FFmpegUtilities.h
-index 62d64df..b4ec951 100644
---- a/include/FFmpegUtilities.h
-+++ b/include/FFmpegUtilities.h
-@@ -163,11 +163,10 @@
- #define AV_FREE_CONTEXT(av_context) avcodec_free_context(&av_context)
- #define AV_GET_CODEC_TYPE(av_stream) av_stream->codecpar->codec_type
- #define AV_FIND_DECODER_CODEC_ID(av_stream) av_stream->codecpar->codec_id
-- auto AV_GET_CODEC_CONTEXT = [](AVStream* av_stream, AVCodec* av_codec) { \
-- AVCodecContext *context = avcodec_alloc_context3(av_codec); \
-- avcodec_parameters_to_context(context, av_stream->codecpar); \
-- return context; \
-- };
-+ #define AV_GET_CODEC_CONTEXT(av_stream, av_codec) \
-+ ({ AVCodecContext *context = avcodec_alloc_context3(av_codec); \
-+ avcodec_parameters_to_context(context, av_stream->codecpar); \
-+ context; })
- #define AV_GET_CODEC_PAR_CONTEXT(av_stream, av_codec) av_codec;
- #define AV_GET_CODEC_FROM_STREAM(av_stream,codec_in)
- #define AV_GET_CODEC_ATTRIBUTES(av_stream, av_context) av_stream->codecpar
-@@ -199,11 +198,10 @@
- #define AV_FREE_CONTEXT(av_context) avcodec_free_context(&av_context)
- #define AV_GET_CODEC_TYPE(av_stream) av_stream->codecpar->codec_type
- #define AV_FIND_DECODER_CODEC_ID(av_stream) av_stream->codecpar->codec_id
-- auto AV_GET_CODEC_CONTEXT = [](AVStream* av_stream, AVCodec* av_codec) { \
-- AVCodecContext *context = avcodec_alloc_context3(av_codec); \
-- avcodec_parameters_to_context(context, av_stream->codecpar); \
-- return context; \
-- };
-+ #define AV_GET_CODEC_CONTEXT(av_stream, av_codec) \
-+ ({ AVCodecContext *context = avcodec_alloc_context3(av_codec); \
-+ avcodec_parameters_to_context(context, av_stream->codecpar); \
-+ context; })
- #define AV_GET_CODEC_PAR_CONTEXT(av_stream, av_codec) av_codec;
- #define AV_GET_CODEC_FROM_STREAM(av_stream,codec_in)
- #define AV_GET_CODEC_ATTRIBUTES(av_stream, av_context) av_stream->codecpar
---
-2.26.2
-
diff --git a/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch b/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch
deleted file mode 100644
index a079d9746c0e..000000000000
--- a/media-libs/libopenshot/files/libopenshot-0.2.5-no-hwaccel-testfix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From f71051e8f1add0b893ffaa9a799625017978e7f8 Mon Sep 17 00:00:00 2001
-From: Frank Dana <ferdnyc@gmail.com>
-Date: Thu, 20 Aug 2020 21:13:42 -0400
-Subject: [PATCH] Tests: Don't enable HW accel as side-effect (#557)
-
-The Settings test attempts to test the class by changing settings
-variables and reading them back again. Problem is, that affects
-the REST of the unit tests. So instead of enabling HW accel and
-causing crashes, we'll diddle something innocuous, like OMP_THREADS.
----
- tests/Settings_Tests.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/tests/Settings_Tests.cpp b/tests/Settings_Tests.cpp
-index b63b56a8..65bd66a6 100644
---- a/tests/Settings_Tests.cpp
-+++ b/tests/Settings_Tests.cpp
-@@ -41,7 +41,7 @@ TEST(Settings_Default_Constructor)
- // Create an empty color
- Settings *s = Settings::Instance();
-
-- CHECK_EQUAL(0, s->HARDWARE_DECODER);
-+ CHECK_EQUAL(12, s->OMP_THREADS);
- CHECK_EQUAL(false, s->HIGH_QUALITY_SCALING);
- CHECK_EQUAL(false, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
- }
-@@ -50,15 +50,15 @@ TEST(Settings_Change_Settings)
- {
- // Create an empty color
- Settings *s = Settings::Instance();
-- s->HARDWARE_DECODER = 1;
-+ s->OMP_THREADS = 8;
- s->HIGH_QUALITY_SCALING = true;
- s->WAIT_FOR_VIDEO_PROCESSING_TASK = true;
-
-- CHECK_EQUAL(1, s->HARDWARE_DECODER);
-+ CHECK_EQUAL(8, s->OMP_THREADS);
- CHECK_EQUAL(true, s->HIGH_QUALITY_SCALING);
- CHECK_EQUAL(true, s->WAIT_FOR_VIDEO_PROCESSING_TASK);
-
-- CHECK_EQUAL(1, s->HARDWARE_DECODER);
-+ CHECK_EQUAL(8, Settings::Instance()->OMP_THREADS);
- CHECK_EQUAL(true, Settings::Instance()->HIGH_QUALITY_SCALING);
- CHECK_EQUAL(true, Settings::Instance()->WAIT_FOR_VIDEO_PROCESSING_TASK);
- }
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-15 22:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 22:43 [gentoo-commits] repo/gentoo:master commit in: media-libs/libopenshot/files/ Conrad Kostecki
-- strict thread matches above, loose matches on Subject: below --
2018-10-13 17:36 Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox