From 1d4e397648d8c0aa98b951f49360aa205b231c07 Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 18 Jul 2023 11:58:38 +0300 Subject: [PATCH] import gstreamer1-libav-1.18.4-1.el9 --- .gitignore | 1 + .gstreamer1-libav.metadata | 1 + SOURCES/gstreamer1-libav-ffmpeg44-fix.patch | 223 +++++++++++++ SPECS/gstreamer1-libav.spec | 328 ++++++++++++++++++++ 4 files changed, 553 insertions(+) create mode 100644 .gitignore create mode 100644 .gstreamer1-libav.metadata create mode 100644 SOURCES/gstreamer1-libav-ffmpeg44-fix.patch create mode 100644 SPECS/gstreamer1-libav.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9cb4b32 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gst-libav-1.18.4.tar.xz diff --git a/.gstreamer1-libav.metadata b/.gstreamer1-libav.metadata new file mode 100644 index 0000000..4783ede --- /dev/null +++ b/.gstreamer1-libav.metadata @@ -0,0 +1 @@ +3a0968181ad3deb82d2667174b013533ac2b4ea7 SOURCES/gst-libav-1.18.4.tar.xz diff --git a/SOURCES/gstreamer1-libav-ffmpeg44-fix.patch b/SOURCES/gstreamer1-libav-ffmpeg44-fix.patch new file mode 100644 index 0000000..310a4d4 --- /dev/null +++ b/SOURCES/gstreamer1-libav-ffmpeg44-fix.patch @@ -0,0 +1,223 @@ +--- gst-libav-1.18.2.old/ext/libav/gstavdemux.c 2021-02-26 16:47:35.842537392 -0800 ++++ gst-libav-1.18.2.new/ext/libav/gstavdemux.c 2021-02-26 16:47:55.137537967 -0800 +@@ -41,6 +41,211 @@ + typedef struct _GstFFMpegDemux GstFFMpegDemux; + typedef struct _GstFFStream GstFFStream; + ++typedef struct FFFrac { ++ int64_t val, num, den; ++} FFFrac; ++ ++struct AVStreamInternal { ++ /** ++ * Set to 1 if the codec allows reordering, so pts can be different ++ * from dts. ++ */ ++ int reorder; ++ ++ /** ++ * bitstream filter to run on stream ++ * - encoding: Set by muxer using ff_stream_add_bitstream_filter ++ * - decoding: unused ++ */ ++ AVBSFContext *bsfc; ++ ++ /** ++ * Whether or not check_bitstream should still be run on each packet ++ */ ++ int bitstream_checked; ++ ++ /** ++ * The codec context used by avformat_find_stream_info, the parser, etc. ++ */ ++ AVCodecContext *avctx; ++ /** ++ * 1 if avctx has been initialized with the values from the codec parameters ++ */ ++ int avctx_inited; ++ ++ enum AVCodecID orig_codec_id; ++ ++ /* the context for extracting extradata in find_stream_info() ++ * inited=1/bsf=NULL signals that extracting is not possible (codec not ++ * supported) */ ++ struct { ++ AVBSFContext *bsf; ++ AVPacket *pkt; ++ int inited; ++ } extract_extradata; ++ ++ /** ++ * Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar) ++ */ ++ int need_context_update; ++ ++ int is_intra_only; ++ ++ FFFrac *priv_pts; ++ ++#define MAX_STD_TIMEBASES (30*12+30+3+6) ++ /** ++ * Stream information used internally by avformat_find_stream_info() ++ */ ++ struct { ++ int64_t last_dts; ++ int64_t duration_gcd; ++ int duration_count; ++ int64_t rfps_duration_sum; ++ double (*duration_error)[2][MAX_STD_TIMEBASES]; ++ int64_t codec_info_duration; ++ int64_t codec_info_duration_fields; ++ int frame_delay_evidence; ++ ++ /** ++ * 0 -> decoder has not been searched for yet. ++ * >0 -> decoder found ++ * <0 -> decoder with codec_id == -found_decoder has not been found ++ */ ++ int found_decoder; ++ ++ int64_t last_duration; ++ ++ /** ++ * Those are used for average framerate estimation. ++ */ ++ int64_t fps_first_dts; ++ int fps_first_dts_idx; ++ int64_t fps_last_dts; ++ int fps_last_dts_idx; ++ ++ } *info; ++ ++ AVIndexEntry *index_entries; /**< Only used if the format does not ++ support seeking natively. */ ++ int nb_index_entries; ++ unsigned int index_entries_allocated_size; ++ ++ int64_t interleaver_chunk_size; ++ int64_t interleaver_chunk_duration; ++ ++ /** ++ * stream probing state ++ * -1 -> probing finished ++ * 0 -> no probing requested ++ * rest -> perform probing with request_probe being the minimum score to accept. ++ */ ++ int request_probe; ++ /** ++ * Indicates that everything up to the next keyframe ++ * should be discarded. ++ */ ++ int skip_to_keyframe; ++ ++ /** ++ * Number of samples to skip at the start of the frame decoded from the next packet. ++ */ ++ int skip_samples; ++ ++ /** ++ * If not 0, the number of samples that should be skipped from the start of ++ * the stream (the samples are removed from packets with pts==0, which also ++ * assumes negative timestamps do not happen). ++ * Intended for use with formats such as mp3 with ad-hoc gapless audio ++ * support. ++ */ ++ int64_t start_skip_samples; ++ ++ /** ++ * If not 0, the first audio sample that should be discarded from the stream. ++ * This is broken by design (needs global sample count), but can't be ++ * avoided for broken by design formats such as mp3 with ad-hoc gapless ++ * audio support. ++ */ ++ int64_t first_discard_sample; ++ ++ /** ++ * The sample after last sample that is intended to be discarded after ++ * first_discard_sample. Works on frame boundaries only. Used to prevent ++ * early EOF if the gapless info is broken (considered concatenated mp3s). ++ */ ++ int64_t last_discard_sample; ++ ++ /** ++ * Number of internally decoded frames, used internally in libavformat, do not access ++ * its lifetime differs from info which is why it is not in that structure. ++ */ ++ int nb_decoded_frames; ++ ++ /** ++ * Timestamp offset added to timestamps before muxing ++ */ ++ int64_t mux_ts_offset; ++ ++ /** ++ * Internal data to check for wrapping of the time stamp ++ */ ++ int64_t pts_wrap_reference; ++ ++ /** ++ * Options for behavior, when a wrap is detected. ++ * ++ * Defined by AV_PTS_WRAP_ values. ++ * ++ * If correction is enabled, there are two possibilities: ++ * If the first time stamp is near the wrap point, the wrap offset ++ * will be subtracted, which will create negative time stamps. ++ * Otherwise the offset will be added. ++ */ ++ int pts_wrap_behavior; ++ ++ /** ++ * Internal data to prevent doing update_initial_durations() twice ++ */ ++ int update_initial_durations_done; ++ ++#define MAX_REORDER_DELAY 16 ++ ++ /** ++ * Internal data to generate dts from pts ++ */ ++ int64_t pts_reorder_error[MAX_REORDER_DELAY+1]; ++ uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1]; ++ ++ int64_t pts_buffer[MAX_REORDER_DELAY+1]; ++ ++ /** ++ * Internal data to analyze DTS and detect faulty mpeg streams ++ */ ++ int64_t last_dts_for_order_check; ++ uint8_t dts_ordered; ++ uint8_t dts_misordered; ++ ++ /** ++ * Internal data to inject global side data ++ */ ++ int inject_global_side_data; ++ ++ /** ++ * display aspect ratio (0 if unknown) ++ * - encoding: unused ++ * - decoding: Set by libavformat to calculate sample_aspect_ratio internally ++ */ ++ AVRational display_aspect_ratio; ++ ++ AVProbeData probe_data; ++ ++ /** ++ * last packet in packet_buffer for this stream when muxing. ++ */ ++ struct AVPacketList *last_in_packet_buffer; ++}; ++ + struct _GstFFStream + { + GstPad *pad; +@@ -483,7 +688,7 @@ gst_ffmpegdemux_do_seek (GstFFMpegDemux + GST_LOG_OBJECT (demux, "keyframeidx: %d", keyframeidx); + + if (keyframeidx >= 0) { +- fftarget = stream->index_entries[keyframeidx].timestamp; ++ fftarget = stream->internal->index_entries[keyframeidx].timestamp; + target = gst_ffmpeg_time_ff_to_gst (fftarget, stream->time_base); + + GST_LOG_OBJECT (demux, diff --git a/SPECS/gstreamer1-libav.spec b/SPECS/gstreamer1-libav.spec new file mode 100644 index 0000000..47f41a6 --- /dev/null +++ b/SPECS/gstreamer1-libav.spec @@ -0,0 +1,328 @@ +Name: gstreamer1-libav +Version: 1.18.4 +Release: 1%{?dist} +Summary: GStreamer 1.0 libav-based plug-ins +License: LGPLv2+ +URL: https://gstreamer.freedesktop.org/ +Source0: %{url}/src/gst-libav/gst-libav-%{version}.tar.xz +Patch0: https://gitlab.freedesktop.org/gstreamer/gst-libav/uploads/1340cbe52e8384f4aa92b147b804f64f/gstreamer1-libav-ffmpeg44-fix.patch + +BuildRequires: gcc-c++ +BuildRequires: meson +BuildRequires: gstreamer1-devel >= %{version} +BuildRequires: gstreamer1-plugins-base-devel >= %{version} +BuildRequires: orc-devel +BuildRequires: bzip2-devel +BuildRequires: zlib-devel +BuildRequires: compat-ffmpeg4-devel + +%description +GStreamer is a streaming media framework, based on graphs of filters which +operate on media data. Applications using this library can do anything +from real-time sound processing to playing videos, and just about anything +else media-related. Its plugin-based architecture means that new data +types or processing capabilities can be added simply by installing new +plugins. + +This package provides libav-based GStreamer plug-ins. + +%if 0 +# gstreamer1 uses hotdoc which isn't provided yet +%package devel-docs +Summary: Development documentation for the libav GStreamer plug-in +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description devel-docs +GStreamer is a streaming media framework, based on graphs of elements which +operate on media data. + +This package contains the development documentation for the libav GStreamer +plug-in. +%endif + + +%prep +%autosetup -p1 -n gst-libav-%{version} + + +%build +export PKG_CONFIG_PATH="%{_libdir}/compat-ffmpeg4/pkgconfig" +%meson \ + -D package-name='gst-libav 1.0 rpmfusion rpm' \ + -D package-origin='http://rpmfusion.org/' \ + -D doc=disabled + +%meson_build + +%install +%meson_install + + +%files +%doc AUTHORS ChangeLog NEWS README.md +%license COPYING +%{_libdir}/gstreamer-1.0/libgstlibav.so + +%if 0 +%files devel-docs +# Take the dir and everything below it for proper dir ownership +%doc %{_datadir}/gtk-doc +%endif + +%changelog +* Tue Jul 18 2023 Arkady L. Shane - 1.18.4-1 +- Rebuilt for MSVSphere 9.2 + +* Wed Mar 17 2021 Leigh Scott - 1.18.4-1 +- 1.18.4 + +* Sun Feb 28 2021 Leigh Scott - 1.18.2-4 +- Add patch for ffmpeg-4.4 + +* Wed Feb 03 2021 RPM Fusion Release Engineering - 1.18.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Dec 31 2020 Leigh Scott - 1.18.2-2 +- Rebuilt for new ffmpeg snapshot + +* Sun Dec 13 2020 Leigh Scott - 1.18.2-1 +- 1.18.2 + +* Sun Nov 1 2020 Leigh Scott - 1.18.1-1 +- 1.18.1 + +* Wed Sep 9 2020 Leigh Scott - 1.18.0-1 +- 1.18.0 + +* Sun Aug 23 2020 Leigh Scott - 1.17.90-1 +- 1.17.90 + +* Tue Aug 18 2020 RPM Fusion Release Engineering - 1.17.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 08 2020 Leigh Scott - 1.17.2-1 +- 1.17.2 + +* Mon Jun 22 2020 Leigh Scott - 1.17.1-1 +- 1.17.1 + +* Thu Mar 12 2020 Leigh Scott - 1.16.2-3 +- Rebuilt for i686 + +* Tue Feb 04 2020 RPM Fusion Release Engineering - 1.16.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Feb 01 2020 Leigh Scott - 1.16.2-1 +- 1.16.2 + +* Wed Sep 25 2019 Leigh Scott - 1.16.1-1 +- 1.16.1 + +* Wed Aug 07 2019 Leigh Scott - 1.16.0-2 +- Rebuild for new ffmpeg version + +* Wed Apr 24 2019 Leigh Scott - 1.16.0-1 +- 1.16.0 + +* Tue Mar 19 2019 Leigh Scott - 1.15.2-1 +- 1.15.2 + +* Mon Mar 04 2019 RPM Fusion Release Engineering - 1.15.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Feb 09 2019 Leigh Scott - 1.15.1-1 +- 1.15.1 + +* Tue Oct 09 2018 Rex Dieter - 1.14.4-1 +- 1.14.4 + +* Tue Sep 18 2018 Leigh Scott - 1.14.3-1 +- 1.14.3 + +* Sat Aug 18 2018 Rex Dieter - 1.14.2-1 +- 1.14.2 + +* Thu Jul 26 2018 RPM Fusion Release Engineering - 1.14.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu May 31 2018 Rex Dieter - 1.14.1-1 +- 1.14.1 + +* Thu Mar 22 2018 Rex Dieter - 1.14.0-1 +- Update to 1.14.0 + +* Sun Mar 04 2018 Leigh Scott - 1.13.1-2 +- Use bundled libav for F28 as it doesn't build with ffmpeg git + +* Wed Feb 28 2018 Rex Dieter - 1.13.1-1 +- 1.13.1 + +* Fri Jan 19 2018 Leigh Scott - 1.12.4-3 +- Use bundled libav for F28 + +* Thu Jan 18 2018 Leigh Scott - 1.12.4-2 +- Rebuilt for ffmpeg-3.5 git + +* Mon Dec 11 2017 Leigh Scott - 1.12.4-1 +- Update to 1.12.4 +- Remove patch for FFMpeg 3.4 APIs (fixed in ffmpeg-3.4.1) + +* Sat Nov 18 2017 Simone Caronni - 1.12.3-3 +- Temporary patch for FFMpeg 3.4 APIs. + +* Mon Oct 16 2017 Leigh Scott - 1.12.3-2 +- Rebuild for ffmpeg update + +* Wed Sep 20 2017 Leigh Scott - 1.12.3-1 +- Update to 1.12.3 + +* Thu Aug 31 2017 RPM Fusion Release Engineering - 1.12.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Jul 18 2017 Leigh Scott - 1.12.2-1 +- Update to 1.12.2 + +* Fri Jun 23 2017 Leigh Scott - 1.12.1-1 +- Update to 1.12.1 + +* Wed May 17 2017 Leigh Scott - 1.12.0-2 +- Rebuilt for f26 ffmpeg bump + +* Fri May 12 2017 Leigh Scott - 1.12.0-1 +- Update to 1.12.0 + +* Sat Apr 29 2017 Leigh Scott - 1.11.90-2 +- Rebuild for ffmpeg update + +* Tue Apr 18 2017 Leigh Scott - 1.11.90-1 +- Update to 1.11.90 + +* Sun Mar 19 2017 RPM Fusion Release Engineering - 1.11.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Feb 27 2017 Leigh Scott - 1.11.2-1 +- Update to 1.11.2 + +* Mon Jan 16 2017 Leigh Scott - 1.11.1-1 +- Update to 1.11.1 + +* Wed Nov 30 2016 leigh scott - 1.10.2-1 +- Update to 1.10.2 + +* Fri Nov 11 2016 Hans de Goede - 1.10.0-2 +- Drop no longer needed ignore_vaapi.patch + +* Fri Nov 11 2016 Hans de Goede - 1.10.0-1 +- Update to 1.10.0 + +* Fri Nov 11 2016 Leigh Scott - 1.8.2-4 +- Add patch to disable ffmpeg hardware acceleration for nvenc and qsv (rfbz#4334) + +* Fri Nov 11 2016 Leigh Scott - 1.8.2-3 +- Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders (rfbz#4334) + +* Sat Jul 30 2016 Julian Sikorski - 1.8.2-2 +- Rebuilt for ffmpeg-3.1.1 + +* Sun Jun 12 2016 Hans de Goede - 1.8.2-1 +- Update to 1.8.2 + +* Wed May 18 2016 Hans de Goede - 1.8.1-1 +- Update to 1.8.1 + +* Sat Jan 23 2016 Hans de Goede - 1.6.3-1 +- Update to 1.6.3 + +* Thu Dec 24 2015 Hans de Goede - 1.6.2-1 +- Update to 1.6.2 + +* Sat Oct 31 2015 Hans de Goede - 1.6.1-1 +- Update to 1.6.1 +- Upstream is using ffmpeg instead of libav now, switch to system ffmpeg-libs + +* Sat May 16 2015 Hans de Goede - 1.4.5-1 +- Update to 1.4.5 +- Update libav to 10.6 + +* Wed Oct 1 2014 Hans de Goede - 1.4.3-1 +- Update to 1.4.3 +- Includes libav 10.5 + +* Fri Aug 29 2014 Hans de Goede - 1.4.1-1 +- Update to 1.4.1 (rf#3343) +- Includes libav 10.4 + +* Sun Jun 15 2014 Hans de Goede - 1.2.4-1 +- Update to 1.2.4 (rf#3269) +- Update libav to 9.13 + +* Sat Feb 15 2014 Michael Kuhn - 1.2.3-1 +- Update to 1.2.3. +- Update libav to 9.11. + +* Sat Jan 04 2014 Michael Kuhn - 1.2.2-1 +- Update to 1.2.2. + +* Sat Nov 16 2013 Hans de Goede - 1.2.1-1 +- Rebase to 1.2.1 + +* Sun Oct 13 2013 Hans de Goede - 1.2.0-1 +- Rebase to 1.2.0 +- Upgrade the buildin libav to 9.10 to get all the security fixes from + upstream libav +- Switch back to included libav copy again, libav and ffmpeg have + deviated to much to use a system ffmpeg lib as libav replacement, + this fixes a bad memory-leak (rpmfusion#2976) + +* Mon Sep 30 2013 Nicolas Chauvet - 1.1.3-4 +- Rebuilt + +* Tue Aug 27 2013 Hans de Goede - 1.1.3-3 +- Rebuild now devel properly points to f20 + +* Mon Aug 26 2013 Hans de Goede - 1.1.3-2 +- Rebuild for ffmpeg-2.0 + +* Thu Aug 8 2013 Hans de Goede - 1.1.3-1 +- Rebase to 1.1.3 +- Switch back to using system ffmpeg + +* Tue Aug 6 2013 Hans de Goede - 1.0.9-1 +- Rebase to 1.0.9 +- This includes an upgrade of the buildin libav to 0.8.8 which includes a + bunch of security fixes from +- No longer overwrite the included libav, as the bundled one is the latest + +* Mon Mar 25 2013 Hans de Goede - 1.0.6-1 +- Rebase to 1.0.6 +- Upgrade the buildin libav to 0.8.6 to get all the security fixes from + upstream libav + +* Sun Mar 10 2013 Hans de Goede - 1.0.5-2 +- Add a patch from upstream git to fix h264 decoding artifacts (rf#2710) +- Add a patch from upstream libav to fix miscompilation with gcc-4.8 + (rf#2710, gnome#695166, libav#388) + +* Sat Mar 2 2013 Hans de Goede - 1.0.5-1 +- Rebase to 1.0.5 (rf#2688) +- Upgrade the buildin libav to 0.8.5 to get all the security fixes from + upstream libav + +* Sat Nov 3 2012 Hans de Goede - 1.0.2-2 +- Build included libav with the default RPM_OPT_FLAGS (rf#2560, rf#2472) + +* Sun Oct 28 2012 Hans de Goede - 1.0.2-1 +- Rebase to 1.0.2 +- Included libav copy updated to 0.8.4 +- Change the license to LGPLv2+, as the GPL only postproc plugin is no longer + included +- Replace references to ffmpeg with libav (rf#2472) +- Add COPYING.LIB to %%doc (rf#2472) +- Run make with V=1 (rf#2472) + +* Sun Sep 23 2012 Hans de Goede - 0.11.99-1 +- New upstream release 0.11.99 + +* Sun Sep 9 2012 Hans de Goede - 0.11.93-1 +- First version of gstreamer1-libav for rpmfusion