openshot: update to 3.0.0.
This commit is contained in:
parent
36a2c952b3
commit
045eb2a20a
|
@ -1,74 +0,0 @@
|
|||
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
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'openshot'
|
||||
pkgname=openshot
|
||||
version=2.6.1
|
||||
revision=3
|
||||
version=3.0.0
|
||||
revision=1
|
||||
build_style=python3-module
|
||||
hostmakedepends="python3 python3-setuptools"
|
||||
makedepends="ffmpeg-devel python3-PyQt5"
|
||||
|
@ -12,5 +12,5 @@ maintainer="Spencer Hill <spencernh77@gmail.com>"
|
|||
license="GPL-3.0-or-later"
|
||||
homepage="https://www.openshot.org"
|
||||
distfiles="https://github.com/OpenShot/openshot-qt/archive/v${version}.tar.gz"
|
||||
checksum=11651d5e7287da3c766ce6b447aef8da5cdadaf5626a2816e9025c831d0e1a66
|
||||
checksum=9a6b76ebb32f34722a30af0cafeea2dee1ef11daef1d7c9c73ba9b1350ea57f9
|
||||
make_check=no # tests are broken
|
||||
|
|
Loading…
Reference in New Issue