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 94E684352A for ; Sun, 17 Jul 2022 13:32:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0919968B8A4; Sun, 17 Jul 2022 16:32:12 +0300 (EEST) Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C7B8768B88F for ; Sun, 17 Jul 2022 16:32:05 +0300 (EEST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Sun, 17 Jul 2022 23:31:43 +1000 Message-Id: <20220717133143.881124-2-zane@zanevaniperen.com> In-Reply-To: <20220717133143.881124-1-zane@zanevaniperen.com> References: <20220717133143.881124-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cadance.vs49688.net Subject: [FFmpeg-devel] [PATCH 2/2] avformat/argo_cvg: add -loop and -reverb options 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: Zane van Iperen --- libavformat/argo_cvg.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index 2ee4a64449..36026e562e 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -62,6 +62,8 @@ typedef struct ArgoCVGDemuxContext { typedef struct ArgoCVGMuxContext { const AVClass *class; int skip_rate_check; + int loop; + int reverb; uint32_t checksum; size_t size; } ArgoCVGMuxContext; @@ -303,10 +305,10 @@ static int argo_cvg_write_header(AVFormatContext *s) ArgoCVGMuxContext *ctx = s->priv_data; avio_wl32(s->pb, 0); /* Size, fixed later. */ - avio_wl32(s->pb, 0); - avio_wl32(s->pb, 1); + avio_wl32(s->pb, !!ctx->loop); + avio_wl32(s->pb, !!ctx->reverb); - ctx->checksum = 1; + ctx->checksum = !!ctx->loop + !!ctx->reverb; ctx->size = 8; return 0; } @@ -365,6 +367,26 @@ static const AVOption argo_cvg_options[] = { .max = 1, .flags = AV_OPT_FLAG_ENCODING_PARAM }, + { + .name = "loop", + .help = "set loop flag", + .offset = offsetof(ArgoCVGMuxContext, loop), + .type = AV_OPT_TYPE_BOOL, + .default_val = {.i64 = 0}, + .min = 0, + .max = 1, + .flags = AV_OPT_FLAG_ENCODING_PARAM + }, + { + .name = "reverb", + .help = "set reverb flag", + .offset = offsetof(ArgoCVGMuxContext, reverb), + .type = AV_OPT_TYPE_BOOL, + .default_val = {.i64 = 1}, + .min = 0, + .max = 1, + .flags = AV_OPT_FLAG_ENCODING_PARAM + }, { NULL } }; -- 2.36.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".