From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E1916435E9 for ; Sat, 18 Jun 2022 15:09:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35E5B68B5B0; Sat, 18 Jun 2022 18:09:05 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9CF9A68AF8A for ; Sat, 18 Jun 2022 18:08:59 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 7B95FE743F for ; Sat, 18 Jun 2022 17:08:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cB_CV4qgM14F for ; Sat, 18 Jun 2022 17:08:57 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 8F451E72BD for ; Sat, 18 Jun 2022 17:08:57 +0200 (CEST) Date: Sat, 18 Jun 2022 17:08:57 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20220609222401.28726-1-cus@passwd.hu> Message-ID: <558c78-6ff2-1f2a-fa1c-1bb894884df1@passwd.hu> References: <20220609222401.28726-1-cus@passwd.hu> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] avformat/librist: bump required version to 0.2.7 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 10 Jun 2022, Marton Balint wrote: > This is the first version for which fifo size setting actually works. > > Signed-off-by: Marton Balint > --- > configure | 2 +- > libavformat/librist.c | 32 -------------------------------- > 2 files changed, 1 insertion(+), 33 deletions(-) Pushed. Regards, Marton > > diff --git a/configure b/configure > index 5a167613a4..69d93090c6 100755 > --- a/configure > +++ b/configure > @@ -6604,7 +6604,7 @@ enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192. > enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new > enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection > enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new > -enabled librist && require_pkg_config librist "librist >= 0.2" librist/librist.h rist_receiver_create > +enabled librist && require_pkg_config librist "librist >= 0.2.7" librist/librist.h rist_receiver_create > enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo > enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket > enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++" > diff --git a/libavformat/librist.c b/libavformat/librist.c > index 58dfd7c44b..5f27cacd44 100644 > --- a/libavformat/librist.c > +++ b/libavformat/librist.c > @@ -38,13 +38,6 @@ > > // RIST_MAX_PACKET_SIZE - 28 minimum protocol overhead > #define MAX_PAYLOAD_SIZE (10000-28) > - > -#define FF_LIBRIST_MAKE_VERSION(major, minor, patch) \ > - ((patch) + ((minor)* 0x100) + ((major) *0x10000)) > -#define FF_LIBRIST_VERSION FF_LIBRIST_MAKE_VERSION(LIBRIST_API_VERSION_MAJOR, LIBRIST_API_VERSION_MINOR, LIBRIST_API_VERSION_PATCH) > -#define FF_LIBRIST_VERSION_41 FF_LIBRIST_MAKE_VERSION(4, 1, 0) > -#define FF_LIBRIST_VERSION_42 FF_LIBRIST_MAKE_VERSION(4, 2, 0) > - > #define FIFO_SIZE_DEFAULT 8192 > > typedef struct RISTContext { > @@ -160,24 +153,14 @@ static int librist_open(URLContext *h, const char *uri, int flags) > if (ret < 0) > goto err; > > -#if FF_LIBRIST_VERSION < FF_LIBRIST_VERSION_41 > - ret = rist_parse_address(uri, (const struct rist_peer_config **)&peer_config); > -#else > ret = rist_parse_address2(uri, &peer_config); > -#endif > if (ret < 0) > goto err; > > if (flags & AVIO_FLAG_READ) { > -//Prior to 4.2.0 there was a bug in librist which made this call always fail. > -#if FF_LIBRIST_VERSION >= FF_LIBRIST_VERSION_42 > ret = rist_receiver_set_output_fifo_size(s->ctx, s->fifo_size); > if (ret != 0) > goto err; > -#else > - if (s->fifo_size != FIFO_SIZE_DEFAULT) > - av_log(h, AV_LOG_ERROR, "librist prior to 0.2.7 has a bug which fails setting the fifo buffer size\n"); > -#endif > } > > if (((s->encryption == 128 || s->encryption == 256) && !s->secret) || > @@ -219,13 +202,8 @@ static int librist_read(URLContext *h, uint8_t *buf, int size) > RISTContext *s = h->priv_data; > int ret; > > -#if FF_LIBRIST_VERSION < FF_LIBRIST_VERSION_41 > - const struct rist_data_block *data_block; > - ret = rist_receiver_data_read(s->ctx, &data_block, POLLING_TIME); > -#else > struct rist_data_block *data_block; > ret = rist_receiver_data_read2(s->ctx, &data_block, POLLING_TIME); > -#endif > > if (ret < 0) > return risterr2ret(ret); > @@ -234,15 +212,10 @@ static int librist_read(URLContext *h, uint8_t *buf, int size) > return AVERROR(EAGAIN); > > if (data_block->payload_len > MAX_PAYLOAD_SIZE) { > -#if FF_LIBRIST_VERSION < FF_LIBRIST_VERSION_41 > - rist_receiver_data_block_free((struct rist_data_block**)&data_block); > -#else > rist_receiver_data_block_free2(&data_block); > -#endif > return AVERROR_EXTERNAL; > } > > -#if FF_LIBRIST_VERSION >= FF_LIBRIST_VERSION_42 > if (data_block->flags & RIST_DATA_FLAGS_OVERFLOW) { > if (!s->overrun_nonfatal) { > av_log(h, AV_LOG_ERROR, "Fifo buffer overrun. " > @@ -252,16 +225,11 @@ static int librist_read(URLContext *h, uint8_t *buf, int size) > goto out_free; > } > } > -#endif > > size = data_block->payload_len; > memcpy(buf, data_block->payload, size); > out_free: > -#if FF_LIBRIST_VERSION < FF_LIBRIST_VERSION_41 > - rist_receiver_data_block_free((struct rist_data_block**)&data_block); > -#else > rist_receiver_data_block_free2(&data_block); > -#endif > return size; > } > > -- > 2.34.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".