[FFmpeg-devel] [PATCH] astenc: Add an option to set the loop flag
Michael Niedermayer
michaelni at gmx.at
Sat Dec 22 22:17:15 CET 2012
On Sat, Dec 22, 2012 at 03:53:21PM -0300, James Almer wrote:
> On 22/12/12 2:46 PM, Michael Niedermayer wrote:
> >> #define OFFSET(obj) offsetof(ASTMuxContext, obj)
> >> static const AVOption options[] = {
> >> + { "astflags", "AST Muxer flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "astflags" },
> >> + { "loop", "Enable looping", 0, AV_OPT_TYPE_CONST, {.i64 = 1}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "astflags" },
> >
> > why astflags ?
> > isnt a loop field alone simpler ?
> >
>
> I called the option astflags since every other muxer i checked used a similar name (Look for example movenc.c).
> In this case the only flag available would be "loop" instead of the six or so the mov muxer has.
>
> Adding a "loop" option alone would require the user to write "-loop 1" or something like that in order to enable it.
> I don't like it as much, but if that's the preferred way then I'm ok with it.
>
> And if not the above, what would you recommend for this instead?
Consider a user who wants to use the features and doesnt know the ast
internal details nor does he have the time to read the whole manual
he tries -loop, -loop 1, probably not -astflags loop
he might try -loopstart & end after finding them in the help text but
the error on a not set loop flag will again send him searching while
the muxer actually knows what the user wants quite well and could
have done that
Reminds me a bit of git telling me that i put an option after the
filename. Its this kind of yeah git if you know that is an option
and that is a filename why do you not reorder them yourself ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121222/25995e0c/attachment.asc>
More information about the ffmpeg-devel
mailing list