[MPlayer-dev-eng] Re: Some cleanup about mencoder.

Andriy N. Gritsenko andrej at lucky.net
Sat Jan 18 00:46:50 CET 2003


    Hi, Arpi!

Sometime (on Saturday, January 18 at  0:45) I've received something...
>>     Why noncense?? I could say it's noncense to define variable but use
>> it in other source file only. And it's bad to define some function in
>example?

Variable muxer defined in mencoder.c but never used there. It _always_
is just an argument for any muxer_* function and uses only there. And
moreover, any codec (ve_*.c) can use _only_ one instance of that muxer
variable because it implicitly used in function (redefined everywhere)
mencoder_write_chunk().

>> many source files as external but never in headers, good (non-crashable)
>> way is to define it in header.
>agree

>> I did it that way so why do you call it
>> noncense? Or you prefer to have as many bugs and holes as possible? :(
>> Sorry if I said anything offensive but I used to write my C code without
>> hidden holes.

>you rpatch removed parameters of some muxer func and made static vars
>global. imho it's bad.

Only that muxer variable. Ok, we can declare it in muxer.c and as extern
in muxer_*.c - anyway redefine variable is better than redefine function,
isn't it? Beside it, it will declared so only twice. You can propose any
better way to avoid redefining mencoder_write_chunk()? To avoid redefine
at all it's best define it at muxer.h - its visibility is too limited
anyway.

>yes, NOW it's not possible to have more than one muxer, but the muxer
>API was designe dto make it possible with a new generation mencoder.c later

I understand your thought but can you say me for what you can use many
muxers? To simultaneously encoded many files? I think it's not a Unix
way, you can just start more of mencoder processes. Or to generate many
different encodes of the same video/audio? Then you have to change your
command line switches dramatically and no one could understand it in the
future. (may be supply mencoder with 20lb manual? ;)

I really appreciate your work and I'm just attempting to make it better a
little.

    Be happy!
    Andriy.


More information about the MPlayer-dev-eng mailing list