40 int i,
offset = strlen(buf);
44 for (i = 0; i <
len; i++) {
45 snprintf(buf + offset, 3,
"%02"PRIx8, md5[i]);
55 #define OFFSET(x) offsetof(struct MD5Context, x)
56 #define ENC AV_OPT_FLAG_ENCODING_PARAM
115 #if CONFIG_FRAMEMD5_MUXER
126 avio_printf(s->
pb,
"#stream#, dts, pts, duration, size, hash\n");
137 snprintf(buf,
sizeof(buf) - 64,
"%d, %10"PRId64
", %10"PRId64
", %8d, %8d, ",
150 static const AVClass framemd5_class = {
163 .write_header = framemd5_write_header,
164 .write_packet = framemd5_write_packet,
165 .write_trailer = framemd5_write_trailer,
168 .priv_class = &framemd5_class,
static const AVClass md5enc_class
#define LIBAVUTIL_VERSION_INT
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AV_HASH_MAX_SIZE
Maximum value that av_hash_get_size will currently return.
void av_hash_init(AVHashContext *ctx)
Initialize or reset a hash context.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
static const AVOption hash_options[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
simple assert() macros that are a bit more flexible than ISO C assert().
static const uint8_t offset[127][2]
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
int av_hash_alloc(AVHashContext **ctx, const char *name)
Allocate a hash context for the algorithm specified by name.
static int write_trailer(AVFormatContext *s1)
const char * av_hash_get_name(const AVHashContext *ctx)
void av_hash_freep(AVHashContext **ctx)
Free hash context.
int ff_framehash_write_header(AVFormatContext *s)
Set the timebase for each stream from the corresponding codec timebase and print it.
void av_hash_final(AVHashContext *ctx, uint8_t *dst)
Finalize a hash context and compute the actual hash value.
int av_hash_get_size(const AVHashContext *ctx)
AVIOContext * pb
I/O context.
void av_hash_update(AVHashContext *ctx, const uint8_t *src, int len)
Update a hash context with additional data.
Describe the class of an AVClass context structure.
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes...
static void md5_finish(struct AVFormatContext *s, char *buf)
struct AVHashContext * hash
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
This structure stores compressed data.
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2