Hi,
I was looking at
const CodecInfo* CodecInfo::match(
fourcc_t codec,
CodecInfo::Media cimedia,
const CodecInfo* start);
And it seems to me that the "start" arg is not correctly implemented
at the moment. I think that if start==0 then match() should start
at the "first" codec (whatever that may be, not relying on the
client code to know about video_codes. And if start!=0 then the
search should be started at the next codec *after* start. This
allows a client to do
static const CodecInfo* ci = 0;
while( ci = CodecInfo::match(OutputCodecID, CodecInfo::Video, ci )
{
if( CanEncode(ci) )
break;
}
to find a codec. This nicely allows for iteration over all codecs
that provide en/decode support for the same fourCC.
The change is below, from 12 hour old cvs avifile.
$ cvs diff util.cpp
Index: util.cpp
===================================================================
RCS file: /cvsroot/avifile/avifile-0.6/lib/common/util.cpp,v
retrieving revision 1.45
diff -u -r1.45 util.cpp
--- util.cpp 2001/10/12 08:18:18 1.45
+++ util.cpp 2001/10/16 06:52:16
@@ -128,6 +128,7 @@
if (&c[i] != start)
continue;
start = 0;
+ continue;
}
CodecInfo& ci = c[i];
--
-----------------------------------------------------
http://witme.sourceforge.net/libferris.web/index.html
_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile