freerdp2 new package

This commit is contained in:
Rmys
2024-11-12 12:14:25 +03:00
parent 7d262404e6
commit 7ff9fd72bf
14 changed files with 4696 additions and 1968 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import pisitools
from pisi.actionsapi import cmaketools
def setup():
cmaketools.configure("-DCMAKE_SKIP_RPATH=ON \
-DWITH_LIBSYSTEMD=OFF \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_DSP_FFMPEG=ON \
-DWITH_FFMPEG=ON \
-DWITH_PULSE=ON \
-DWITH_CUPS=ON \
-DWITH_PCSC=ON \
-DWITH_JPEG=ON \
-DWITH_SERVER=ON \
-DWITH_SWSCALE=ON \
-DWITH_CHANNELS=ON \
-DWITH_CLIENT_CHANNELS=ON \
-DWITH_SERVER_CHANNELS=ON \
-DCHANNEL_URBDRC_CLIENT=ON")
def build():
cmaketools.make()
def check():
pass
def install():
#cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
cmaketools.install()
pisitools.dodoc("LICENSE", "README*", )
@@ -0,0 +1,28 @@
From 1ef7b9e3e06ef69e5145c6f11cc330078abaa9ea Mon Sep 17 00:00:00 2001
From: Armin Novak <anovak@thincast.com>
Date: Fri, 24 Nov 2023 19:40:52 +0100
Subject: [PATCH] [codec,dsp] fix ffmpeg deprecation warning
---
libfreerdp/codec/dsp_ffmpeg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libfreerdp/codec/dsp_ffmpeg.c b/libfreerdp/codec/dsp_ffmpeg.c
index c5c30fb89ed2..c929b3c553a2 100644
--- a/libfreerdp/codec/dsp_ffmpeg.c
+++ b/libfreerdp/codec/dsp_ffmpeg.c
@@ -439,7 +439,13 @@ static BOOL ffmpeg_encode_frame(AVCodecContext* context, AVFrame* in, AVPacket*
if (in->format == AV_SAMPLE_FMT_FLTP)
{
uint8_t** pp = in->extended_data;
- for (int y = 0; y < in->channels; y++)
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
+ const int nr_channels = in->channels;
+#else
+ const int nr_channels = in->ch_layout.nb_channels;
+#endif
+
+ for (int y = 0; y < nr_channels; y++)
{
float* data = pp[y];
for (int x = 0; x < in->nb_samples; x++)
+140
View File
@@ -0,0 +1,140 @@
From d0c5b1ae4289c7f3cde3fbc031cb4a3160df05ff Mon Sep 17 00:00:00 2001
From: Armin Novak <armin.novak@thincast.com>
Date: Wed, 7 Jun 2023 11:46:07 +0200
Subject: [PATCH] [codec,dsp] fix ffmpeg deprecations
---
libfreerdp/codec/dsp_ffmpeg.c | 54 +++++++++++++++++++++++++++--------
1 file changed, 42 insertions(+), 12 deletions(-)
diff --git a/libfreerdp/codec/dsp_ffmpeg.c b/libfreerdp/codec/dsp_ffmpeg.c
index 2c93a667750e..ebba52b147d2 100644
--- a/libfreerdp/codec/dsp_ffmpeg.c
+++ b/libfreerdp/codec/dsp_ffmpeg.c
@@ -224,18 +224,17 @@ static void ffmpeg_close_context(FREERDP_DSP_CONTEXT* context)
static BOOL ffmpeg_open_context(FREERDP_DSP_CONTEXT* context)
{
int ret;
- int layout;
- const AUDIO_FORMAT* format;
if (!context || context->isOpen)
return FALSE;
- format = &context->format;
+ const AUDIO_FORMAT* format = &context->format;
if (!format)
return FALSE;
-
- layout = av_get_default_channel_layout(format->nChannels);
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
+ const int layout = av_get_default_channel_layout(format->nChannels);
+#endif
context->id = ffmpeg_get_avcodec(format);
if (ffmpeg_codec_is_filtered(context->id, context->encoder))
@@ -271,8 +270,12 @@ static BOOL ffmpeg_open_context(FREERDP_DSP_CONTEXT* context)
break;
}
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
context->context->channels = format->nChannels;
context->context->channel_layout = layout;
+#else
+ av_channel_layout_default(&context->context->ch_layout, format->nChannels);
+#endif
context->context->sample_rate = format->nSamplesPerSec;
context->context->block_align = format->nBlockAlign;
context->context->bit_rate = format->nAvgBytesPerSec * 8;
@@ -315,8 +318,12 @@ static BOOL ffmpeg_open_context(FREERDP_DSP_CONTEXT* context)
if (!context->rcontext)
goto fail;
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
context->frame->channel_layout = layout;
context->frame->channels = format->nChannels;
+#else
+ av_channel_layout_default(&context->frame->ch_layout, format->nChannels);
+#endif
context->frame->sample_rate = format->nSamplesPerSec;
context->frame->format = AV_SAMPLE_FMT_S16;
@@ -331,13 +338,21 @@ static BOOL ffmpeg_open_context(FREERDP_DSP_CONTEXT* context)
context->resampled->sample_rate = format->nSamplesPerSec;
}
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
context->resampled->channel_layout = layout;
context->resampled->channels = format->nChannels;
+#else
+ av_channel_layout_default(&context->resampled->ch_layout, format->nChannels);
+#endif
if (context->context->frame_size > 0)
{
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
context->buffered->channel_layout = context->resampled->channel_layout;
context->buffered->channels = context->resampled->channels;
+#else
+ av_channel_layout_copy(&context->buffered->ch_layout, &context->resampled->ch_layout);
+#endif
context->buffered->format = context->resampled->format;
context->buffered->nb_samples = context->context->frame_size;
@@ -458,14 +473,20 @@ static BOOL ffmpeg_fill_frame(AVFrame* frame, const AUDIO_FORMAT* inputFormat, c
size_t size)
{
int ret, bpp;
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
frame->channels = inputFormat->nChannels;
+ frame->channel_layout = av_get_default_channel_layout(frame->channels);
+#else
+ av_channel_layout_default(&frame->ch_layout, inputFormat->nChannels);
+#endif
frame->sample_rate = inputFormat->nSamplesPerSec;
frame->format = ffmpeg_sample_format(inputFormat);
- frame->channel_layout = av_get_default_channel_layout(frame->channels);
+
bpp = av_get_bytes_per_sample(frame->format);
frame->nb_samples = size / inputFormat->nChannels / bpp;
- if ((ret = avcodec_fill_audio_frame(frame, frame->channels, frame->format, data, size, 1)) < 0)
+ if ((ret = avcodec_fill_audio_frame(frame, inputFormat->nChannels, frame->format, data, size,
+ 1)) < 0)
{
const char* err = av_err2str(ret);
WLog_ERR(TAG, "Error during audio frame fill %s [%d]", err, ret);
@@ -547,7 +568,12 @@ static BOOL ffmpeg_decode(AVCodecContext* dec_ctx, AVPacket* pkt, AVFrame* frame
}
{
- const size_t data_size = resampled->channels * resampled->nb_samples * 2;
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
+ const size_t channels = resampled->channels;
+#else
+ const size_t channels = resampled->ch_layout.nb_channels;
+#endif
+ const size_t data_size = channels * resampled->nb_samples * 2;
Stream_EnsureRemainingCapacity(out, data_size);
Stream_Write(out, resampled->data[0], data_size);
}
@@ -745,10 +771,14 @@ BOOL freerdp_dsp_ffmpeg_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT*
if (inSamples + (int)context->bufferedSamples > context->context->frame_size)
inSamples = context->context->frame_size - (int)context->bufferedSamples;
- rc =
- av_samples_copy(context->buffered->extended_data, context->resampled->extended_data,
- (int)context->bufferedSamples, copied, inSamples,
- context->context->channels, context->context->sample_fmt);
+#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57, 28, 100)
+ const int channels = context->context->channels;
+#else
+ const int channels = context->context->ch_layout.nb_channels;
+#endif
+ rc = av_samples_copy(context->buffered->extended_data,
+ context->resampled->extended_data, (int)context->bufferedSamples,
+ copied, inSamples, channels, context->context->sample_fmt);
rest -= inSamples;
copied += inSamples;
context->bufferedSamples += (UINT32)inSamples;
+118
View File
@@ -0,0 +1,118 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>freerdp2</Name>
<Homepage>http://www.freerdp.com</Homepage>
<Packager>
<Name>Aydın Demirel</Name>
<Email>aydin.demirel@pisilinux.org</Email>
</Packager>
<License>ASF</License>
<IsA>app:console</IsA>
<Summary>A Remote Desktop Implementation</Summary>
<Description>FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under Apacle License.</Description>
<Archive sha1sum="14a73f092e227a77f3d483658033d15d4501a753" type="targz">https://github.com/FreeRDP/FreeRDP/archive/2.11.7.tar.gz</Archive>
<BuildDependencies>
<Dependency>pam-devel</Dependency>
<Dependency>cups-devel</Dependency>
<Dependency>ffmpeg-devel</Dependency>
<Dependency>alsa-lib-devel</Dependency>
<Dependency>libXinerama-devel</Dependency>
<Dependency>xmlto</Dependency>
<Dependency>libX11-devel</Dependency>
<Dependency>libXi-devel</Dependency>
<Dependency>libXcursor-devel</Dependency>
<Dependency>libxkbcommon-devel</Dependency>
<Dependency>libxkbfile-devel</Dependency>
<Dependency>libXv-devel</Dependency>
<Dependency>libXrandr-devel</Dependency>
<Dependency>gstreamer-devel</Dependency>
<Dependency>gst-plugins-base-devel</Dependency>
<Dependency>glib2-devel</Dependency>
<Dependency>openssl-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>cmake</Dependency>
<Dependency>libxslt</Dependency>
<Dependency>util-linux</Dependency>
<Dependency>wayland-devel</Dependency>
<Dependency>libusb-devel</Dependency>
<Dependency>libXext-devel</Dependency>
<Dependency>libXtst-devel</Dependency>
<Dependency>libXfixes-devel</Dependency>
<Dependency>libXdamage-devel</Dependency>
<Dependency>libjpeg-turbo-devel</Dependency>
<Dependency>wayland-client</Dependency>
<Dependency>wayland-cursor</Dependency>
<Dependency>pulseaudio-libs-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">d0c5b1ae.patch</Patch>
<Patch level="1">1ef7b9e3.patch</Patch>
</Patches>
</Source>
<Package>
<Name>freerdp2</Name>
<RuntimeDependencies>
<Dependency>pam</Dependency>
<Dependency>cups</Dependency>
<Dependency>glib2</Dependency>
<Dependency>libXi</Dependency>
<Dependency>libXv</Dependency>
<Dependency>ffmpeg</Dependency>
<Dependency>libX11</Dependency>
<Dependency>libusb</Dependency>
<Dependency>libXext</Dependency>
<Dependency>libXtst</Dependency>
<Dependency>openssl</Dependency>
<Dependency>alsa-lib</Dependency>
<Dependency>libXfixes</Dependency>
<Dependency>libXrandr</Dependency>
<Dependency>libXcursor</Dependency>
<Dependency>libXdamage</Dependency>
<Dependency>libXrender</Dependency>
<Dependency>libxkbfile</Dependency>
<Dependency>libXinerama</Dependency>
<Dependency>libxkbcommon</Dependency>
<Dependency>libjpeg-turbo</Dependency>
<Dependency>wayland-client</Dependency>
<Dependency>wayland-cursor</Dependency>
<Dependency>pulseaudio-libs</Dependency>
<Dependency>gstreamer</Dependency>
<Dependency>gst-plugins-base</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share/freerdp</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path>
</Files>
</Package>
<Package>
<Name>freerdp2-devel</Name>
<RuntimeDependencies>
<Dependency release="current">freerdp2</Dependency>
<Dependency>openssl-devel</Dependency>
<Dependency>wayland-devel</Dependency>
<Dependency>libxkbcommon-devel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib/cmake</Path>
<Path fileType="library">/usr/lib/pkgconfig</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2024-11-11</Date>
<Version>2.11.7</Version>
<Comment>First release</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
</History>
</PISI>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>freerdp</Name>
<Summary xml:lang="tr">Bir uzak masaüstü protokol uygulaması</Summary>
<Description xml:lang="tr">FreeRDP Apache lisansı altında dağıtılan, Uzak Masaüstü Uygulamasının (RDP) özgür bir uygulamasıdır.</Description>
</Source>
</PISI>