From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavf: allow setting AVStream.discard as an AVOption
Date: Tue, 19 Dec 2023 11:41:10 +0100
Message-ID: <170298247031.8914.4423993700905646592@lain.khirnov.net> (raw)
In-Reply-To: <c428743c-1a19-44f6-9d74-dcea9547ebe3@gmail.com>
Quoting James Almer (2023-12-18 20:30:47)
> On 12/18/2023 4:19 PM, Anton Khirnov wrote:
> > ---
> > libavformat/options.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/libavformat/options.c b/libavformat/options.c
> > index bf6113ca95..cc89dd6c72 100644
> > --- a/libavformat/options.c
> > +++ b/libavformat/options.c
> > @@ -229,6 +229,16 @@ static const AVOption stream_options[] = {
> > { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" },
> > { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" },
> > { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" },
> > +
> > + { "discard", NULL, offsetof(AVStream, discard), AV_OPT_TYPE_INT, { .i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX,
> > + .flags = AV_OPT_FLAG_DECODING_PARAM, .unit = "avdiscard" },
> > + { "none", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE }, .unit = "avdiscard" },
> > + { "default", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, .unit = "avdiscard" },
> > + { "noref", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, .unit = "avdiscard" },
> > + { "bidir", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, .unit = "avdiscard" },
> > + { "nointra", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA }, .unit = "avdiscard" },
> > + { "nokey", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, .unit = "avdiscard" },
> > + { "all", .type = AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, .unit = "avdiscard" },
> > { NULL }
> > };
>
> Should be ok.
>
> Maybe also add "id" like i did for AVStreamGroup while at it.
The problem with id is how to flag it - it's read-only for demuxing and
user-settable for muxing.
--
Anton Khirnov
_______________________________________________
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".
next prev parent reply other threads:[~2023-12-19 10:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 19:19 Anton Khirnov
2023-12-18 19:19 ` [FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_demux: set discard on the AVStream directly Anton Khirnov
2023-12-18 19:30 ` [FFmpeg-devel] [PATCH 1/2] lavf: allow setting AVStream.discard as an AVOption James Almer
2023-12-19 10:41 ` Anton Khirnov [this message]
2023-12-19 12:09 ` James Almer
2023-12-19 12:10 ` Anton Khirnov
2023-12-20 3:02 ` James Almer
2023-12-22 10:38 ` Anton Khirnov
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=170298247031.8914.4423993700905646592@lain.khirnov.net \
--to=anton@khirnov.net \
--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