Skip to content

Commit

Permalink
media-libs/phonon-gstreamer: No paused state on 0 vol, EAPI-7 bump
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed Dec 16, 2018
1 parent 8f8e4d3 commit 469eb8e
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From fca0714fd37b2276eb663f649b6b9871a3973fa4 Mon Sep 17 00:00:00 2001
From: Anthony Fieroni <[email protected]>
Date: Mon, 10 Dec 2018 16:19:51 +0200
Subject: Do not trigger paused state on 0 percentage

Differential Revision: https://phabricator.kde.org/D14241

Signed-off-by: Anthony Fieroni <[email protected]>
---
gstreamer/pipeline.cpp | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/gstreamer/pipeline.cpp b/gstreamer/pipeline.cpp
index 7025418..0d0b253 100644
--- a/gstreamer/pipeline.cpp
+++ b/gstreamer/pipeline.cpp
@@ -325,6 +325,11 @@ gboolean Pipeline::cb_buffering(GstBus *bus, GstMessage *gstMessage, gpointer da
gint percent = 0;
gst_message_parse_buffering(gstMessage, &percent);

+ // we should not trigger paused state or gstreamer will starts buffering again
+ if (percent == 0) {
+ return true;
+ }
+
debug() << Q_FUNC_INFO << "Buffering :" << percent;

// Instead of playing when the pipeline is still streaming, we pause
--
cgit v1.1
54 changes: 54 additions & 0 deletions media-libs/phonon-gstreamer/phonon-gstreamer-4.9.0-r3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_PN="phonon-backend-gstreamer"
MY_P=${MY_PN}-${PV}

if [[ ${PV} != *9999* ]]; then
SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/${MY_P}.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-fbsd"
else
EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
inherit git-r3
fi

inherit cmake-utils

DESCRIPTION="Phonon GStreamer backend"
HOMEPAGE="https://phonon.kde.org/"

LICENSE="LGPL-2.1+ || ( LGPL-2.1 LGPL-3 )"
SLOT="0"
IUSE="alsa debug +network"

RDEPEND="
dev-libs/glib:2
dev-libs/libxml2:2
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtopengl:5
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
media-libs/gstreamer:1.0
media-libs/gst-plugins-base:1.0
>=media-libs/phonon-4.10.0
media-plugins/gst-plugins-meta:1.0[alsa?,ogg,vorbis]
virtual/opengl
network? ( media-plugins/gst-plugins-soup:1.0 )
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
"

PATCHES=(
"${FILESDIR}/${P}-qt-5.11.patch"
"${FILESDIR}/${P}-no-paused-on-zero-vol.patch"
)

src_configure() {
local mycmakeargs=( -DPHONON_BUILD_PHONON4QT5=ON )
cmake-utils_src_configure
}
9 changes: 5 additions & 4 deletions media-libs/phonon-gstreamer/phonon-gstreamer-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

MY_PN="phonon-backend-gstreamer"
MY_P=${MY_PN}-${PV}

if [[ ${PV} != *9999* ]]; then
SRC_URI="mirror://kde/stable/phonon/${MY_PN}/${PV}/${MY_P}.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-fbsd"
else
EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
inherit git-r3
Expand Down Expand Up @@ -38,7 +38,8 @@ RDEPEND="
virtual/opengl
network? ( media-plugins/gst-plugins-soup:1.0 )
"
DEPEND="${RDEPEND}
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
"

Expand Down

0 comments on commit 469eb8e

Please sign in to comment.