openshot: update to 2.6.1.

enable for all archs and libc
patches are upstream
This commit is contained in:
tibequadorian 2022-02-23 00:42:51 +01:00 committed by Piraty
parent d978d1c6cf
commit b9550a4537
3 changed files with 2073 additions and 6 deletions

View file

@ -0,0 +1,74 @@
From 9748a13268d66a5949aebc970637b5903756d018 Mon Sep 17 00:00:00 2001
From: Jonathan Thomas <jonathan@openshot.org>
Date: Thu, 7 Oct 2021 13:53:09 -0500
Subject: [PATCH] Support for previewing anamorphic video profiles, including a
few code clean-ups.
---
src/windows/video_widget.py | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/windows/video_widget.py b/src/windows/video_widget.py
index 7326598d3..842deb3ba 100644
--- a/src/windows/video_widget.py
+++ b/src/windows/video_widget.py
@@ -77,28 +77,20 @@ def changed(self, action):
if action.type == "load" and action.values.get("pixel_ratio"):
pixel_ratio_changed = True
self.pixel_ratio = openshot.Fraction(
- action.values.get("pixel_ratio").get("num", 16),
- action.values.get("pixel_ratio").get("den", 9))
+ action.values.get("pixel_ratio").get("num", 1),
+ action.values.get("pixel_ratio").get("den", 1))
log.info(
"Set video widget pixel aspect ratio to: %s",
self.pixel_ratio.ToFloat())
elif action.key and action.key[0] == "pixel_ratio":
pixel_ratio_changed = True
self.pixel_ratio = openshot.Fraction(
- action.values.get("num", 16),
- action.values.get("den", 9))
+ action.values.get("num", 1),
+ action.values.get("den", 1))
log.info(
"Update: Set video widget pixel aspect ratio to: %s",
self.pixel_ratio.ToFloat())
- # Update max size (to size of video preview viewport)
- if display_ratio_changed or pixel_ratio_changed:
- timeline = get_app().window.timeline_sync.timeline
- timeline.SetMaxSize(
- round(self.width() * self.pixel_ratio.ToFloat()),
- round(self.height() * self.pixel_ratio.ToFloat())
- )
-
def drawTransformHandler(self, painter, sx, sy, source_width, source_height, origin_x, origin_y,
x1=None, y1=None, x2=None, y2=None, rotation = None):
@@ -236,7 +228,7 @@ def paintEvent(self, event, *args):
# Determine original size of clip's reader
source_width = self.transforming_clip.data['reader']['width']
source_height = self.transforming_clip.data['reader']['height']
- source_size = QSize(source_width, source_height)
+ source_size = QSize(source_width, source_height * self.pixel_ratio.Reciprocal().ToDouble())
# Determine scale of clip
scale = self.transforming_clip.data['scale']
@@ -405,7 +397,7 @@ def paintEvent(self, event, *args):
self.mutex.unlock()
def centeredViewport(self, width, height):
- """ Calculate size of viewport to maintain apsect ratio """
+ """ Calculate size of viewport to maintain aspect ratio """
# Calculate padding
top_padding = (height - (height * self.zoom)) / 2.0
@@ -416,7 +408,7 @@ def centeredViewport(self, width, height):
height = height * self.zoom
# Calculate which direction to scale (for perfect centering)
- aspectRatio = self.aspect_ratio.ToFloat() * self.pixel_ratio.ToFloat()
+ aspectRatio = self.aspect_ratio.ToFloat()
heightFromWidth = width / aspectRatio
widthFromHeight = height * aspectRatio

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,11 @@
# Template file for 'openshot' # Template file for 'openshot'
pkgname=openshot pkgname=openshot
version=2.5.1 version=2.6.1
revision=3 revision=1
archs="i686 x86_64 ppc64le"
wrksrc="${pkgname}-qt-${version}" wrksrc="${pkgname}-qt-${version}"
build_style=python3-module build_style=python3-module
hostmakedepends="python3" hostmakedepends="python3 python3-setuptools"
makedepends="ffmpeg-devel python3-PyQt5 python3-setuptools" makedepends="ffmpeg-devel python3-PyQt5"
depends="ImageMagick libopenshot mlt python3-PyQt5-svg depends="ImageMagick libopenshot mlt python3-PyQt5-svg
python3-PyQt5-webkit python3-httplib2 python3-pyzmq python3-requests" python3-PyQt5-webkit python3-httplib2 python3-pyzmq python3-requests"
short_desc="Open-source, non-linear video editor for Linux" short_desc="Open-source, non-linear video editor for Linux"
@ -14,4 +13,5 @@ maintainer="Spencer Hill <spencernh77@gmail.com>"
license="GPL-3.0-or-later" license="GPL-3.0-or-later"
homepage="https://www.openshot.org" homepage="https://www.openshot.org"
distfiles="https://github.com/OpenShot/openshot-qt/archive/v${version}.tar.gz" distfiles="https://github.com/OpenShot/openshot-qt/archive/v${version}.tar.gz"
checksum=4c25eb9a5de42e749de4c6ca2f7a313c60e1283fe52d70c121629dbb8bb2df7b checksum=11651d5e7287da3c766ce6b447aef8da5cdadaf5626a2816e9025c831d0e1a66
make_check=no # tests are broken