Accepting request 344417 from home:Zaitor
And yet a resub... OBS-URL: https://build.opensuse.org/request/show/344417 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/sushi?expand=0&rev=58
This commit is contained in:
parent
657eef79d2
commit
1b0aa64445
156
sushi-port-to-clutter-gst-3.0.patch
Normal file
156
sushi-port-to-clutter-gst-3.0.patch
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
From ce695719d7292bfe9d8183cfa057afe1df53565b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lionel Landwerlin <llandwerlin@gmail.com>
|
||||||
|
Date: Sat, 17 Oct 2015 00:24:42 +0100
|
||||||
|
Subject: viewer: gst: port to ClutterGst 3.0
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=756725
|
||||||
|
---
|
||||||
|
configure.ac | 2 +-
|
||||||
|
src/js/viewers/gst.js | 56 +++++++++++++++++++++++++++------------------------
|
||||||
|
2 files changed, 31 insertions(+), 27 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 3b5ff56..7e869d5 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -62,7 +62,7 @@ PKG_CHECK_MODULES(SUSHI,
|
||||||
|
clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
|
||||||
|
gtk+-3.0 >= $GTK_MIN_VERSION
|
||||||
|
clutter-gtk-1.0 >= $CLUTTER_GTK_MIN_VERSION
|
||||||
|
- clutter-gst-2.0
|
||||||
|
+ clutter-gst-3.0
|
||||||
|
gstreamer-1.0
|
||||||
|
gstreamer-pbutils-1.0
|
||||||
|
gstreamer-tag-1.0
|
||||||
|
diff --git a/src/js/viewers/gst.js b/src/js/viewers/gst.js
|
||||||
|
index 3560277..6a010f6 100644
|
||||||
|
--- a/src/js/viewers/gst.js
|
||||||
|
+++ b/src/js/viewers/gst.js
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
-imports.gi.versions.ClutterGst = '2.0';
|
||||||
|
+imports.gi.versions.ClutterGst = '3.0';
|
||||||
|
const ClutterGst = imports.gi.ClutterGst;
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gdk = imports.gi.Gdk;
|
||||||
|
@@ -60,29 +60,33 @@ const GstRenderer = new Lang.Class({
|
||||||
|
},
|
||||||
|
|
||||||
|
clear : function() {
|
||||||
|
- this._video.playing = false;
|
||||||
|
+ this._player.playing = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_createVideo : function(file) {
|
||||||
|
- this._video =
|
||||||
|
- new ClutterGst.VideoTexture({ sync_size: false });
|
||||||
|
+ this._player = new ClutterGst.Playback();
|
||||||
|
+ this._video = new Clutter.Actor({
|
||||||
|
+ content: new ClutterGst.Aspectratio({
|
||||||
|
+ player: this._player
|
||||||
|
+ })
|
||||||
|
+ });
|
||||||
|
|
||||||
|
- this._video.set_uri(file.get_uri());
|
||||||
|
- this._video.playing = true;
|
||||||
|
+ this._player.set_uri(file.get_uri());
|
||||||
|
+ this._player.playing = true;
|
||||||
|
|
||||||
|
this._videoSizeChangeId =
|
||||||
|
- this._video.connect('size-change',
|
||||||
|
- Lang.bind(this,
|
||||||
|
- this._onVideoSizeChange));
|
||||||
|
- this._video.connect('notify::playing',
|
||||||
|
- Lang.bind(this,
|
||||||
|
- this._onVideoPlayingChange));
|
||||||
|
- this._video.connect('notify::progress',
|
||||||
|
- Lang.bind(this,
|
||||||
|
- this._onVideoProgressChange));
|
||||||
|
- this._video.connect('notify::duration',
|
||||||
|
- Lang.bind(this,
|
||||||
|
- this._onVideoDurationChange));
|
||||||
|
+ this._player.connect('size-change',
|
||||||
|
+ Lang.bind(this,
|
||||||
|
+ this._onVideoSizeChange));
|
||||||
|
+ this._player.connect('notify::playing',
|
||||||
|
+ Lang.bind(this,
|
||||||
|
+ this._onVideoPlayingChange));
|
||||||
|
+ this._player.connect('notify::progress',
|
||||||
|
+ Lang.bind(this,
|
||||||
|
+ this._onVideoProgressChange));
|
||||||
|
+ this._player.connect('notify::duration',
|
||||||
|
+ Lang.bind(this,
|
||||||
|
+ this._onVideoDurationChange));
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateProgressBar : function() {
|
||||||
|
@@ -90,7 +94,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._isSettingValue = true;
|
||||||
|
- this._progressBar.set_value(this._video.progress * 1000);
|
||||||
|
+ this._progressBar.set_value(this._player.progress * 1000);
|
||||||
|
this._isSettingValue = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
@@ -99,7 +103,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
return;
|
||||||
|
|
||||||
|
let currentTime =
|
||||||
|
- Math.floor(this._video.duration * this._video.progress);
|
||||||
|
+ Math.floor(this._player.duration * this._player.progress);
|
||||||
|
|
||||||
|
this._currentLabel.set_text(Utils.formatTimeString(currentTime));
|
||||||
|
},
|
||||||
|
@@ -108,7 +112,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
if (!this._mainToolbar)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- let totalTime = this._video.duration;
|
||||||
|
+ let totalTime = this._player.duration;
|
||||||
|
|
||||||
|
this._durationLabel.set_text(Utils.formatTimeString(totalTime));
|
||||||
|
},
|
||||||
|
@@ -123,7 +127,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
},
|
||||||
|
|
||||||
|
_onVideoPlayingChange : function() {
|
||||||
|
- if (this._video.playing)
|
||||||
|
+ if (this._player.playing)
|
||||||
|
this._toolbarPlay.set_icon_name('media-playback-pause-symbolic');
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -166,8 +170,8 @@ const GstRenderer = new Lang.Class({
|
||||||
|
|
||||||
|
this._toolbarPlay.connect('clicked',
|
||||||
|
Lang.bind(this, function () {
|
||||||
|
- let playing = !this._video.playing;
|
||||||
|
- this._video.playing = playing;
|
||||||
|
+ let playing = !this._player.playing;
|
||||||
|
+ this._player.playing = playing;
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._progressBar =
|
||||||
|
@@ -178,7 +182,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
this._progressBar.connect('value-changed',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
if(!this._isSettingValue)
|
||||||
|
- this._video.progress = this._progressBar.get_value() / 1000;
|
||||||
|
+ this._player.progress = this._progressBar.get_value() / 1000;
|
||||||
|
}));
|
||||||
|
|
||||||
|
item = new Gtk.ToolItem();
|
||||||
|
@@ -200,7 +204,7 @@ const GstRenderer = new Lang.Class({
|
||||||
|
return this._toolbarActor;
|
||||||
|
},
|
||||||
|
|
||||||
|
- _onVideoSizeChange : function(video, width, height) {
|
||||||
|
+ _onVideoSizeChange : function(player, width, height) {
|
||||||
|
this._videoWidth = width;
|
||||||
|
this._videoHeight = height;
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.11.2
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 14 21:09:32 UTC 2015 - zaitor@opensuse.org
|
||||||
|
|
||||||
|
- Add sushi-port-to-clutter-gst-3.0.patch: Port to clutter-gst-3.0
|
||||||
|
(bgo#756725). Also add libtool BuildRequires and pass autoreconf
|
||||||
|
before configure as the patch touches the buildsystem.
|
||||||
|
- Following above port, replace pkgconfig(clutter-gst-2.0) for
|
||||||
|
pkgconfig(clutter-gst-3.0) BuildRequires.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 23 07:01:10 UTC 2015 - dimstar@opensuse.org
|
Wed Sep 23 07:01:10 UTC 2015 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -24,13 +24,17 @@ License: SUSE-GPL-2.0-with-plugin-exception
|
|||||||
Group: Productivity/File utilities
|
Group: Productivity/File utilities
|
||||||
Url: http://www.gnome.org
|
Url: http://www.gnome.org
|
||||||
Source0: http://download.gnome.org/sources/sushi/3.18/%{name}-%{version}.tar.xz
|
Source0: http://download.gnome.org/sources/sushi/3.18/%{name}-%{version}.tar.xz
|
||||||
|
# PATCH-FIX-UPSTREAM sushi-port-to-clutter-gst-3.0.patch bgo#756725 zaitor@opensuse.org -- Port to clutter-gst-3.0
|
||||||
|
Patch0: sushi-port-to-clutter-gst-3.0.patch
|
||||||
BuildRequires: gobject-introspection-devel
|
BuildRequires: gobject-introspection-devel
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
|
# Needed for patch0
|
||||||
|
BuildRequires: libtool
|
||||||
%ifarch %ix86 x86_64
|
%ifarch %ix86 x86_64
|
||||||
BuildRequires: unoconv
|
BuildRequires: unoconv
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(clutter-1.0) >= 1.11.4
|
BuildRequires: pkgconfig(clutter-1.0) >= 1.11.4
|
||||||
BuildRequires: pkgconfig(clutter-gst-2.0)
|
BuildRequires: pkgconfig(clutter-gst-3.0)
|
||||||
BuildRequires: pkgconfig(clutter-gtk-1.0)
|
BuildRequires: pkgconfig(clutter-gtk-1.0)
|
||||||
BuildRequires: pkgconfig(clutter-x11-1.0)
|
BuildRequires: pkgconfig(clutter-x11-1.0)
|
||||||
BuildRequires: pkgconfig(evince-document-3.0)
|
BuildRequires: pkgconfig(evince-document-3.0)
|
||||||
@ -60,8 +64,11 @@ Sushi is a quick previewer for Nautilus, the GNOME desktop file manager.
|
|||||||
%lang_package
|
%lang_package
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Needed for patch0
|
||||||
|
autoreconf -fiv
|
||||||
%configure
|
%configure
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user