[FFmpeg-devel] lavu: add text encoding conversion API

James Darnley james.darnley at gmail.com
Wed Sep 23 23:50:51 CEST 2015


On 2015-09-23 19:28, Nicolas George wrote:
> Hi.
> 
> This is a proposal for an API in libavutil to perform text encoding
> conversions. I had it in mind to clean up the subtitles code initially, and
> now it could be useful for James' proposal about metadata. The issues are
> relying on the optional system feature iconv, clumsy and annoying buffer
> management, handling of errors and replacement characters.
> 
> For now, this is just the API, not as a patch with the code, but I suspect
> designing the API cleanly is way harder than implementing it.
> 
> The API would go in, probably, textconv.h, with the opaque parts in
> textconv.c. The structures are in logical order, not in the order required
> for compilation.
> 
> Please comment.

At first I was wondering how FFmpeg would have a non-optional part of
the API if you depend on optional things such as iconv.  I was half
prepared to rant about NIH and seriously wondering what was going to be
proposed.

I think I see now that you are proposing a wrapper around other
libraries.  Other than iconv I assume Windows has its own char encoding
features which would likely be used here.

I don't have much of an opinion just yet.  It looks fairly reasonable
and a decent wrapper around iconv.  One immediate problem I see comes
from trying to store negative numbers in an unsigned integer. :)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150923/36ae1e08/attachment.sig>


More information about the ffmpeg-devel mailing list