Import rpm: c8s

This commit is contained in:
Mohan Boddu 2023-04-03 19:48:46 +00:00
commit 6370105907
5 changed files with 183 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/spice-streaming-agent-0.3.tar.xz

View File

@ -0,0 +1,26 @@
From aaf2a1c4c276e7e5dd4f7bc570e9053a9accac85 Mon Sep 17 00:00:00 2001
From: Uri Lublin <uril@redhat.com>
Date: Thu, 28 Nov 2019 14:48:10 +0200
Subject: [spice-streaming-agent patch 100/101] gst-plugin: make VP8 the default codec (downstream)
Signed-off-by: Uri Lublin <uril@redhat.com>
---
src/gst-plugin.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp
index 922b90d..b270e54 100644
--- a/src/gst-plugin.cpp
+++ b/src/gst-plugin.cpp
@@ -33,7 +33,7 @@ namespace gstreamer_plugin {
struct GstreamerEncoderSettings
{
int fps = 25;
- SpiceVideoCodecType codec = SPICE_VIDEO_CODEC_TYPE_H264;
+ SpiceVideoCodecType codec = SPICE_VIDEO_CODEC_TYPE_VP8;
std::string encoder;
std::vector<std::pair<std::string, std::string>> prop_pairs;
};
--
2.23.0

View File

@ -0,0 +1,57 @@
From 5b38408d515ad76b31e096204e69f77880b41f6b Mon Sep 17 00:00:00 2001
From: Uri Lublin <uril@redhat.com>
Date: Thu, 28 Nov 2019 14:51:00 +0200
Subject: [spice-streaming-agent patch 101/101] gst-plugin: remove H264 and H265 (downstream)
Signed-off-by: Uri Lublin <uril@redhat.com>
---
src/gst-plugin.cpp | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp
index b270e54..8841b88 100644
--- a/src/gst-plugin.cpp
+++ b/src/gst-plugin.cpp
@@ -118,11 +118,6 @@ GstElement *GstreamerFrameCapture::get_encoder_plugin(const GstreamerEncoderSett
GstElementFactory *factory = nullptr;
switch (settings.codec) {
- case SPICE_VIDEO_CODEC_TYPE_H264:
- sink_caps.reset(gst_caps_new_simple("video/x-h264",
- "stream-format", G_TYPE_STRING, "byte-stream",
- nullptr));
- break;
case SPICE_VIDEO_CODEC_TYPE_MJPEG:
sink_caps.reset(gst_caps_new_empty_simple("image/jpeg"));
break;
@@ -132,9 +127,6 @@ GstElement *GstreamerFrameCapture::get_encoder_plugin(const GstreamerEncoderSett
case SPICE_VIDEO_CODEC_TYPE_VP9:
sink_caps.reset(gst_caps_new_empty_simple("video/x-vp9"));
break;
- case SPICE_VIDEO_CODEC_TYPE_H265:
- sink_caps.reset(gst_caps_new_empty_simple("video/x-h265"));
- break;
default : /* Should not happen - just to avoid compiler's complaint */
throw std::logic_error("Unknown codec");
}
@@ -433,16 +425,12 @@ void GstreamerPlugin::ParseOptions(const ConfigureOption *options)
throw std::runtime_error("Invalid value '" + value + "' for option 'framerate'.");
}
} else if (name == "gst.codec") {
- if (value == "h264") {
- settings.codec = SPICE_VIDEO_CODEC_TYPE_H264;
- } else if (value == "vp9") {
+ if (value == "vp9") {
settings.codec = SPICE_VIDEO_CODEC_TYPE_VP9;
} else if (value == "vp8") {
settings.codec = SPICE_VIDEO_CODEC_TYPE_VP8;
} else if (value == "mjpeg") {
settings.codec = SPICE_VIDEO_CODEC_TYPE_MJPEG;
- } else if (value == "h265") {
- settings.codec = SPICE_VIDEO_CODEC_TYPE_H265;
} else {
throw std::runtime_error("Invalid value '" + value + "' for option 'gst.codec'.");
}
--
2.23.0

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (spice-streaming-agent-0.3.tar.xz) = 9c24489531b17806422802695b7a9bb20b06649928c454e31b58b43114b77079ffa96132ddfa51fcedab351154555e55b86b8eee8f2ff00a7c6fe05e4722a1f6

View File

@ -0,0 +1,98 @@
Name: spice-streaming-agent
Version: 0.3
Release: 2%{?dist}
Summary: SPICE streaming agent
Group: Applications/System
License: ASL 2.0
URL: https://www.redhat.com
Source0: %{name}-%{version}.tar.xz
BuildRequires: spice-protocol >= 0.12.16
BuildRequires: libX11-devel libXfixes-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: catch-devel
BuildRequires: pkgconfig(udev)
BuildRequires: libdrm-devel
BuildRequires: libXrandr-devel
BuildRequires: gcc-c++
BuildRequires: diffutils
BuildRequires: gstreamer1-devel gstreamer1-plugins-base-devel
# we need /usr/sbin/semanage program which is available on different
# packages depending on distribution
Requires(post): /usr/sbin/semanage
Requires(postun): /usr/sbin/semanage
ExclusiveArch: x86_64
# Downstream: remove H264 and set VP8 as the default codec
Patch0100: 0100-gst-plugin-make-VP8-the-default-codec-downstream.patch
Patch0101: 0101-gst-plugin-remove-H264-and-H265-downstream.patch
%description
An agent, running on a guest, sending video streams of the X display to a
remote client (over SPICE).
%package devel
Requires: spice-protocol >= 0.12.16
Requires: pkgconfig
Requires: libX11-devel
Summary: SPICE streaming agent development files
%description devel
This package contains necessary header files to build SPICE streaming
agent plugins.
%prep
%setup -q
%patch100 -p1
%patch101 -p1
%build
%configure --enable-tests --with-udevrulesdir=%{_udevrulesdir} --enable-gst-plugin=yes
make %{?_smp_mflags} V=1
%check
make check
%install
make install DESTDIR=%{buildroot} V=1
if test -d "%{buildroot}/%{_libdir}/%{name}/plugins"; then
find %{buildroot}/%{_libdir}/%{name}/plugins -name '*.la' -delete
fi
%post
semanage fcontext -a -t xserver_exec_t %{_bindir}/spice-streaming-agent 2>/dev/null || :
restorecon %{_bindir}/spice-streaming-agent || :
%postun
if [ $1 -eq 0 ] ; then # final removal
semanage fcontext -d -t xserver_exec_t %{_bindir}/spice-streaming-agent 2>/dev/null || :
fi
%files
%doc COPYING NEWS README
%{_udevrulesdir}/90-spice-guest-streaming.rules
%{_bindir}/spice-streaming-agent
%{_sysconfdir}/xdg/autostart/spice-streaming.desktop
%{_datadir}/gdm/greeter/autostart/spice-streaming.desktop
%{_mandir}/man1/spice-streaming-agent.1.gz
%{_libdir}/%{name}/plugins/*.so
%files devel
%defattr(-,root,root,-)
%{_includedir}
%{_libdir}/pkgconfig
%changelog
* Thu Dec 12 2019 Uri Lublin <uril@redhat.com> - 0.3-2
- Update to 0.3 release
- Resolves: rhbz#1774123
- Resolves: rhbz#1774129
* Wed Aug 1 2018 Uri Lublin <uril@redhat.com> - 0.2-3
- Rebuild for rhel-8
Related: rhbz#1614485
* Wed Aug 16 2017 Frediano Ziglio <fziglio@redhat.com> - 0.1-1
- Initial package (pre-release)