On Mon, 09 Oct 2006 17:20:12 JST
[EMAIL PROTECTED] (Andrew Church) wrote:
> I've just added an NMS-based LAME encoding module (encode_lame) to
> CVS HEAD.
Excellent!
> There's still a minor issue remaining with trailing audio
> samples getting cut off (Francesco, I think we need an "encode final
> frame" operation, maybe encode_audio(inframe=NULL)?), [...]
I was thinking about this from some time, my thoughts follows.
General guidelines: I'd like to avoid module operation explosion
and to add corner-case methods *if possible*. Of course, if
avoiding to add more operations renders code clumsy or bad looking,
the way to go it's just to add a new operation.
I see mainly a few ways:
- adding a general flush() method. That could be useful also
for multiplexors, but api lacks a clear fit. Encoders needs
to return buffered data, while multiplexors needs not.
int (*flush)(TCModuleInstance *self, frame_list_t *outdata);
one more problem: should we use a generic pointer? (looks unclean)
adding flush_video and flush_audio looks even worse.
- adding encode_last_frame() or something like it. Definitively
a corner case (how many encoders needs this?), that's the way
I like less.
- modify close() to return buffered data lead to problems like
flush() ones (generic pointer? vframe_list_t? aframe_list_t?),
so doesn't look good.
- modify encode_*() looks the better way at moment of writing.
we can change semantic like this:
* if a NULL inframe is given, encoder will emit buffered data,
if any (of course written in better english ;) ).
Of course I'm open to further suggestions.
Best regards,
--
Francesco Romani - Ikitt ['people always complain, no matther what you do']
IM contact : (email first, Antispam default deny!) icq://27-83-87-867
known bugs : http://www.transcoding.org/cgi-bin/transcode?Bug_Showcase
tiny homepage : http://fromani.exit1.org (see IDEAS if you want send code!)