From patchwork Sun Jul 17 13:31:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zane van Iperen X-Patchwork-Id: 36809 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1649:b0:8b:613a:194d with SMTP id no9csp565616pzb; Sun, 17 Jul 2022 06:32:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1viJkECJNSG6auFrPN3iRUWsPg02Bg0Vme+q6bYKRxTPzCGQqyOebhSChCyiw9EJ7b6O+pA X-Received: by 2002:a05:6402:350b:b0:43a:e18e:dee6 with SMTP id b11-20020a056402350b00b0043ae18edee6mr31340312edd.31.1658064741010; Sun, 17 Jul 2022 06:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658064741; cv=none; d=google.com; s=arc-20160816; b=KvxR/YTPrIznf2IFZ5WDttf9nmh/SCnLuPelxL9k4mdIaTV9SUcFZBQb0QHbletjZG 1UzGVr+YrQ6oDWf/u4AhaWY/+7Z5uldacMiqvD6O3n87g+uZaMmbH09erb9jApA8jdzH 1N+ZWbnsHwVzNHZzL+4uvAzx2qaa2bWc7xs6EvS1OuUsi/iZuwCspBnHB1AgdaSCCNSP shLmmZc+YkarD07mjRsoLy33BaN7wXK8/NTMPk1E8VxpfkHBj8NVGeN+Bgd7PKWRF3br 0PdJjeszkB29800pGe3lUf/STxwmbcnLZu+56oBRBpOtNtsrcCvId3EURowQJ+tyoaSu YeHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=NHBVAHnxYuyIKXEKbBApYkhphFtXTp18aeBJDLwXx4s=; b=b/LsAv2sEcPOK383tfx9Eofg5fip1VC0d8H6u1ROC50tL6i5NwYycLuH+U1azgv4vh dqQ2hBOrE4dQhKmyqqjkqyNvvnSIQunsSDEMHa3DpLY+KAfh8BeVV+kuk66aie02lv3k 1BvDfWSDp/l0pQ5ZF3QEhz9p2nDh3CHYNWm6KUO2jsr2XLGHGfJpTEWTyiyXjmEmJUyK FIPtDAtDHSCL5ua+B0tO7ffHbrXwf0SOHOuvzS0NCkJNvq6Ls3L3de9o7o2EbQjDgebq suyupEyb1Wgy+jxYnmuGGWkrL2Bigf6rFV9DsWfy/sTFW2+5ZpAIWS8E65BdeoJgIE+Q UtGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qm7-20020a170907674700b0072b7fa15683si11359867ejc.312.2022.07.17.06.32.20; Sun, 17 Jul 2022 06:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zanevaniperen.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 408AF68B8A8; Sun, 17 Jul 2022 16:32:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tgCvFWZpTo9P 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 } };