update to 0.1+20241028git.8198c4d [release 0.1+20241028git.8198c4d-1mamba;Sun Nov 03 2024]

This commit is contained in:
Silvan Calarco 2024-11-07 11:57:54 +01:00
parent 94051f9ce7
commit a33892e992
2 changed files with 4 additions and 62 deletions

View File

@ -1,58 +0,0 @@
From c08682eda2d03bec1648cf5c779241ac0f14cde3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Sat, 11 May 2024 19:11:07 +0200
Subject: [PATCH] Add compatibility with FFMPEG 7.0
avutil: remove deprecated FF_API_REORDERED_OPAQUE
Ref: https://github.com/FFmpeg/FFmpeg/commit/67e7f0b05eeee37eee1357769038270fda08fe32
---
.../video_coding/codecs/h264/h264_decoder_impl.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index 76d04e418..bc3917c52 100644
--- a/src/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/src/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -14,6 +14,9 @@
// #ifdef unless needed and tested.
#ifdef WEBRTC_USE_H264
+#define HAVE_FFMPEG_REORDERED_OPAQUE (LIBAVFORMAT_VERSION_INT < \
+ AV_VERSION_INT(59, 8, 100))
+
#include "modules/video_coding/codecs/h264/h264_decoder_impl.h"
#include <algorithm>
@@ -212,7 +215,9 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
int total_size = y_size + 2 * uv_size;
av_frame->format = context->pix_fmt;
+#if HAVE_FFMPEG_REORDERED_OPAQUE
av_frame->reordered_opaque = context->reordered_opaque;
+#endif
// Create a VideoFrame object, to keep a reference to the buffer.
// TODO(nisse): The VideoFrame's timestamp and rotation info is not used.
@@ -361,7 +366,9 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
}
packet->size = static_cast<int>(input_image.size());
int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs
+#if HAVE_FFMPEG_REORDERED_OPAQUE
av_context_->reordered_opaque = frame_timestamp_us;
+#endif
int result = avcodec_send_packet(av_context_.get(), packet.get());
@@ -378,9 +385,11 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
return WEBRTC_VIDEO_CODEC_ERROR;
}
+#if HAVE_FFMPEG_REORDERED_OPAQUE
// We don't expect reordering. Decoded frame timestamp should match
// the input one.
RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us);
+#endif
// TODO(sakal): Maybe it is possible to get QP directly from FFmpeg.
h264_bitstream_parser_.ParseBitstream(input_image);

View File

@ -1,6 +1,6 @@
%define commit %(echo %version | cut -d+ -f2 | cut -d. -f2)
Name: tg_owt
Version: 0.1+20240804git.dc17143
Version: 0.1+20241028git.8198c4d
Release: 1mamba
Summary: WebRTC library static linked for Telegram
Group: System/Libraries
@ -9,7 +9,6 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/desktop-app/tg_owt
Source: https://github.com/desktop-app/tg_owt.git/master@%{commit}/tg_owt-%{version}.tar.bz2
Patch0: tg_owt-0.1+20240804git.dc17143-ffmpeg-7.patch
License: BSD
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
@ -28,12 +27,10 @@ Summary: Development files for %{name}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
#% debug_package
%prep
%setup -q
%patch 0 -p1 -b .ffmpeg-7
%build
%cmake -d build \
@ -57,6 +54,9 @@ This package contains libraries and header files for developing applications tha
%{_libdir}/libtg_owt.a
%changelog
* Sun Nov 03 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1+20241028git.8198c4d-1mamba
- update to 0.1+20241028git.8198c4d
* Wed Oct 09 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1+20240804git.dc17143-1mamba
- update to 0.1+20240804git.dc17143