commit d2a41bd978a6b385669d9409bdf6629538770e8a
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sun Jan 21 17:58:42 2018 +0100
Patched for ffmpeg-3.5
xpra-codecs-freeworld-ffmpeg35.patch | 189 +++++++++++++++++++++++++++++++++++
xpra-codecs-freeworld.spec | 11 +-
2 files changed, 199 insertions(+), 1 deletion(-)
---
diff --git a/xpra-codecs-freeworld-ffmpeg35.patch b/xpra-codecs-freeworld-ffmpeg35.patch
new file mode 100644
index 0000000..4772089
--- /dev/null
+++ b/xpra-codecs-freeworld-ffmpeg35.patch
@@ -0,0 +1,189 @@
+--- src/xpra/codecs/dec_avcodec2/decoder.pyx (revision 18085)
++++ src/xpra/codecs/dec_avcodec2/decoder.pyx (revision 18086)
+@@ -53,5 +53,5 @@
+
+ cdef extern from "libavcodec/avcodec.h":
+- int CODEC_FLAG2_FAST
++ int AV_CODEC_FLAG2_FAST
+
+ ctypedef struct AVFrame:
+@@ -359,5 +359,5 @@
+ self.codec_ctx.thread_type = 2 #FF_THREAD_SLICE: allow more than one thread
per frame
+ self.codec_ctx.thread_count = 0 #auto
+- self.codec_ctx.flags2 |= CODEC_FLAG2_FAST #may cause "no deblock across
slices" - which should be fine
++ self.codec_ctx.flags2 |= AV_CODEC_FLAG2_FAST #may cause "no deblock
across slices" - which should be fine
+ r = avcodec_open2(self.codec_ctx, self.codec, NULL)
+ if r<0:
+--- src/xpra/codecs/enc_ffmpeg/encoder.pyx (revision 18087)
++++ src/xpra/codecs/enc_ffmpeg/encoder.pyx (revision 18088)
+@@ -135,42 +135,34 @@
+ int FF_PROFILE_H264_CAVLC_444
+
+- int CODEC_FLAG_UNALIGNED
+- int CODEC_FLAG_QSCALE
+- int CODEC_FLAG_4MV
+- int CODEC_FLAG_OUTPUT_CORRUPT
+- int CODEC_FLAG_QPEL
+- int CODEC_FLAG_GMC
+- int CODEC_FLAG_MV0
+- int CODEC_FLAG_INPUT_PRESERVED
+- int CODEC_FLAG_PASS1
+- int CODEC_FLAG_PASS2
+- int CODEC_FLAG_GRAY
+- int CODEC_FLAG_EMU_EDGE
+- int CODEC_FLAG_PSNR
+- int CODEC_FLAG_TRUNCATED
+- int CODEC_FLAG_NORMALIZE_AQP
+- int CODEC_FLAG_INTERLACED_DCT
+- int CODEC_FLAG_GLOBAL_HEADER
+-
+- int CODEC_FLAG2_FAST
+-
+- int CODEC_CAP_DRAW_HORIZ_BAND
+- int CODEC_CAP_DR1
+- int CODEC_CAP_TRUNCATED
+- int CODEC_CAP_HWACCEL
+- int CODEC_CAP_DELAY
+- int CODEC_CAP_SMALL_LAST_FRAME
+- int CODEC_CAP_HWACCEL_VDPAU
+- int CODEC_CAP_SUBFRAMES
+- int CODEC_CAP_EXPERIMENTAL
+- int CODEC_CAP_CHANNEL_CONF
+- int CODEC_CAP_NEG_LINESIZES
+- int CODEC_CAP_FRAME_THREADS
+- int CODEC_CAP_SLICE_THREADS
+- int CODEC_CAP_PARAM_CHANGE
+- int CODEC_CAP_AUTO_THREADS
+- int CODEC_CAP_VARIABLE_FRAME_SIZE
+- int CODEC_CAP_INTRA_ONLY
+- int CODEC_CAP_LOSSLESS
++ int AV_CODEC_FLAG_UNALIGNED
++ int AV_CODEC_FLAG_QSCALE
++ int AV_CODEC_FLAG_4MV
++ int AV_CODEC_FLAG_OUTPUT_CORRUPT
++ int AV_CODEC_FLAG_QPEL
++ int AV_CODEC_FLAG_PASS1
++ int AV_CODEC_FLAG_PASS2
++ int AV_CODEC_FLAG_GRAY
++ int AV_CODEC_FLAG_PSNR
++ int AV_CODEC_FLAG_TRUNCATED
++ int AV_CODEC_FLAG_INTERLACED_DCT
++ int AV_CODEC_FLAG_GLOBAL_HEADER
++
++ int AV_CODEC_FLAG2_FAST
++
++ int AV_CODEC_CAP_DRAW_HORIZ_BAND
++ int AV_CODEC_CAP_DR1
++ int AV_CODEC_CAP_TRUNCATED
++ int AV_CODEC_CAP_DELAY
++ int AV_CODEC_CAP_SMALL_LAST_FRAME
++ int AV_CODEC_CAP_SUBFRAMES
++ int AV_CODEC_CAP_EXPERIMENTAL
++ int AV_CODEC_CAP_CHANNEL_CONF
++ int AV_CODEC_CAP_FRAME_THREADS
++ int AV_CODEC_CAP_SLICE_THREADS
++ int AV_CODEC_CAP_PARAM_CHANGE
++ int AV_CODEC_CAP_AUTO_THREADS
++ int AV_CODEC_CAP_VARIABLE_FRAME_SIZE
++ int AV_CODEC_CAP_INTRA_ONLY
++ int AV_CODEC_CAP_LOSSLESS
+
+ ctypedef struct AVFrame:
+@@ -386,5 +378,4 @@
+ int AVFMT_NEEDNUMBER #Needs '%d' in filename
+ int AVFMT_SHOW_IDS #Show format stream IDs numbers
+- int AVFMT_RAWPICTURE #Format wants AVPicture structure for raw picture
data. @deprecated Not used anymore
+ int AVFMT_GLOBALHEADER #Format wants global header
+ int AVFMT_NOTIMESTAMPS #Format does not need / have any timestamps
+@@ -490,25 +481,20 @@
+
+ CODEC_FLAGS = {
+- CODEC_FLAG_UNALIGNED : "UNALIGNED",
+- CODEC_FLAG_QSCALE : "QSCALE",
+- CODEC_FLAG_4MV : "4MV",
+- CODEC_FLAG_OUTPUT_CORRUPT : "OUTPUT_CORRUPT",
+- CODEC_FLAG_QPEL : "QPEL",
+- CODEC_FLAG_GMC : "GMC",
+- CODEC_FLAG_MV0 : "MV0",
+- CODEC_FLAG_INPUT_PRESERVED : "INPUT_PRESERVED",
+- CODEC_FLAG_PASS1 : "PASS1",
+- CODEC_FLAG_PASS2 : "PASS2",
+- CODEC_FLAG_GRAY : "GRAY",
+- CODEC_FLAG_EMU_EDGE : "EMU_EDGE",
+- CODEC_FLAG_PSNR : "PSNR",
+- CODEC_FLAG_TRUNCATED : "TRUNCATED",
+- CODEC_FLAG_NORMALIZE_AQP : "NORMALIZE_AQP",
+- CODEC_FLAG_INTERLACED_DCT : "INTERLACED_DCT",
+- CODEC_FLAG_GLOBAL_HEADER : "GLOBAL_HEADER",
++ AV_CODEC_FLAG_UNALIGNED : "UNALIGNED",
++ AV_CODEC_FLAG_QSCALE : "QSCALE",
++ AV_CODEC_FLAG_4MV : "4MV",
++ AV_CODEC_FLAG_OUTPUT_CORRUPT : "OUTPUT_CORRUPT",
++ AV_CODEC_FLAG_QPEL : "QPEL",
++ AV_CODEC_FLAG_PASS1 : "PASS1",
++ AV_CODEC_FLAG_PASS2 : "PASS2",
++ AV_CODEC_FLAG_GRAY : "GRAY",
++ AV_CODEC_FLAG_PSNR : "PSNR",
++ AV_CODEC_FLAG_TRUNCATED : "TRUNCATED",
++ AV_CODEC_FLAG_INTERLACED_DCT : "INTERLACED_DCT",
++ AV_CODEC_FLAG_GLOBAL_HEADER : "GLOBAL_HEADER",
+ }
+
+ CODEC_FLAGS2 = {
+- CODEC_FLAG2_FAST : "FAST",
++ AV_CODEC_FLAG2_FAST : "FAST",
+ }
+
+@@ -536,5 +522,4 @@
+ AVFMT_NEEDNUMBER : "NEEDNUMBER",
+ AVFMT_SHOW_IDS : "SHOW_IDS",
+- AVFMT_RAWPICTURE : "RAWPICTURE",
+ AVFMT_GLOBALHEADER : "GLOBALHEADER",
+ AVFMT_NOTIMESTAMPS : "NOTIMESTAMPS",
+@@ -555,22 +540,19 @@
+
+ CAPS = {
+- CODEC_CAP_DRAW_HORIZ_BAND : "DRAW_HORIZ_BAND",
+- CODEC_CAP_DR1 : "DR1",
+- CODEC_CAP_TRUNCATED : "TRUNCATED",
+- CODEC_CAP_HWACCEL : "HWACCEL",
+- CODEC_CAP_DELAY : "DELAY",
+- CODEC_CAP_SMALL_LAST_FRAME : "SMALL_LAST_FRAME",
+- CODEC_CAP_HWACCEL_VDPAU : "HWACCEL_VDPAU",
+- CODEC_CAP_SUBFRAMES : "SUBFRAMES",
+- CODEC_CAP_EXPERIMENTAL : "EXPERIMENTAL",
+- CODEC_CAP_CHANNEL_CONF : "CHANNEL_CONF",
+- CODEC_CAP_NEG_LINESIZES : "NEG_LINESIZES",
+- CODEC_CAP_FRAME_THREADS : "FRAME_THREADS",
+- CODEC_CAP_SLICE_THREADS : "SLICE_THREADS",
+- CODEC_CAP_PARAM_CHANGE : "PARAM_CHANGE",
+- CODEC_CAP_AUTO_THREADS : "AUTO_THREADS",
+- CODEC_CAP_VARIABLE_FRAME_SIZE : "VARIABLE_FRAME_SIZE",
+- CODEC_CAP_INTRA_ONLY : "INTRA_ONLY",
+- CODEC_CAP_LOSSLESS : "LOSSLESS",
++ AV_CODEC_CAP_DRAW_HORIZ_BAND : "DRAW_HORIZ_BAND",
++ AV_CODEC_CAP_DR1 : "DR1",
++ AV_CODEC_CAP_TRUNCATED : "TRUNCATED",
++ AV_CODEC_CAP_DELAY : "DELAY",
++ AV_CODEC_CAP_SMALL_LAST_FRAME : "SMALL_LAST_FRAME",
++ AV_CODEC_CAP_SUBFRAMES : "SUBFRAMES",
++ AV_CODEC_CAP_EXPERIMENTAL : "EXPERIMENTAL",
++ AV_CODEC_CAP_CHANNEL_CONF : "CHANNEL_CONF",
++ AV_CODEC_CAP_FRAME_THREADS : "FRAME_THREADS",
++ AV_CODEC_CAP_SLICE_THREADS : "SLICE_THREADS",
++ AV_CODEC_CAP_PARAM_CHANGE : "PARAM_CHANGE",
++ AV_CODEC_CAP_AUTO_THREADS : "AUTO_THREADS",
++ AV_CODEC_CAP_VARIABLE_FRAME_SIZE : "VARIABLE_FRAME_SIZE",
++ AV_CODEC_CAP_INTRA_ONLY : "INTRA_ONLY",
++ AV_CODEC_CAP_LOSSLESS : "LOSSLESS",
+ }
+ log("CODEC_CAP:")
+@@ -891,6 +873,6 @@
+ self.video_ctx.thread_count = THREAD_COUNT #0=auto
+ #if oformat.flags & AVFMT_GLOBALHEADER:
+- self.video_ctx.flags |= CODEC_FLAG_GLOBAL_HEADER
+- self.video_ctx.flags2 |= CODEC_FLAG2_FAST #may cause "no deblock across
slices" - which should be fine
++ self.video_ctx.flags |= AV_CODEC_FLAG_GLOBAL_HEADER
++ self.video_ctx.flags2 |= AV_CODEC_FLAG2_FAST #may cause "no deblock
across slices" - which should be fine
+ if self.encoding.startswith("h264") and profile:
+ r = av_dict_set(&opts, b"vprofile", strtobytes(profile), 0)
diff --git a/xpra-codecs-freeworld.spec b/xpra-codecs-freeworld.spec
index 2554539..21d710a 100644
--- a/xpra-codecs-freeworld.spec
+++ b/xpra-codecs-freeworld.spec
@@ -26,6 +26,11 @@ License: GPLv2+
URL:
http://www.xpra.org/
Source0:
http://xpra.org/src/xpra-%{version}.tar.xz
+#
http://xpra.org/trac/changeset/18086/xpra
+#
http://xpra.org/trac/changeset/18088/xpra
+# Build fix for ffmpeg-3.5
+Patch0: %{name}-ffmpeg35.patch
+
BuildRequires: python2-devel pygobject2-devel pygtk2-devel
BuildRequires: libXtst-devel, uglify-js
BuildRequires: libxkbfile-devel, libvpx-devel
@@ -50,6 +55,9 @@ x264 and ffmpeg.
%prep
%setup -q -n xpra-%{version}
+%if 0%{?fedora} > 27
+%patch0 -p1
+%endif
%build
CFLAGS="%{optflags}" %{__python2} setup.py build
--executable="%{__python2} -s" \
@@ -102,8 +110,9 @@ find %{buildroot}%{python2_sitearch}/xpra -name '*.so' \
%license COPYING
%changelog
-* Thu Jan 18 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 2.2.3-1
+* Sun Jan 21 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 2.2.3-1
- Update to 2.2.3
+- Patched for ffmpeg-3.5
* Thu Jan 18 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 2.2.2-2
- Rebuilt for ffmpeg-3.5 git