On 12/9/12 1:32 PM, Måns Rullgård wrote:
Luca Barbato <[email protected]> writes:
On 12/09/2012 05:34 AM, Luca Barbato wrote:
Hi, I'm wondering if we could completely hide the avio checksum fields
from the public structure by moving it to an internal field or extend it
to be able to use any hash function from avutil and fully expose it to
our users.
The current situation is less than optimal.
Sort of related, I'd provide some wrapper api over our crypto/hash stuff
along those lines.
typedef struct AVHash {
const AVClass *av_class;
int context_size;
void *context;
int (*init) (struct AVHash);
void (*update)(struct AVHash, const uint8_t *src, const int len);
void (*close) (struct AVHash, uint8_t *dst);
} AVHash;
That's something I've been thinking of doing for a long time.
Anything to add to the the drafted api?
I'd craft it, implement it for md5, sha and crc and then make AVIO use
an AVHash pointer.
The open question is if we want to add a muxer capability to signal it
is internally used and let people use it in their external code.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel