Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zane van Iperen <zane@zanevaniperen.com>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 2/2] avformat/argo_cvg: add -loop and -reverb options
Date: Sun, 17 Jul 2022 23:31:43 +1000
Message-ID: <20220717133143.881124-2-zane@zanevaniperen.com> (raw)
In-Reply-To: <20220717133143.881124-1-zane@zanevaniperen.com>

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
---
 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".

  reply	other threads:[~2022-07-17 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17 13:31 [FFmpeg-devel] [PATCH 1/2] avformat/argo_cvg: name unk{1, 2} fields correctly Zane van Iperen
2022-07-17 13:31 ` Zane van Iperen [this message]
2022-07-18 13:45 ` Andreas Rheinhardt
2022-07-20  8:56   ` Zane van Iperen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220717133143.881124-2-zane@zanevaniperen.com \
    --to=zane@zanevaniperen.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git