avformat/hashenc: Deduplicate AVClasses
The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
cd0ab3526d
commit
5ca535ee9a
@ -47,6 +47,13 @@ static const AVOption hash_streamhash_options[] = {
|
|||||||
HASH_OPT("sha256"),
|
HASH_OPT("sha256"),
|
||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const AVClass hash_streamhashenc_class = {
|
||||||
|
.class_name = "(stream) hash muxer",
|
||||||
|
.item_name = av_default_item_name,
|
||||||
|
.option = hash_streamhash_options,
|
||||||
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_FRAMEHASH_MUXER
|
#if CONFIG_FRAMEHASH_MUXER
|
||||||
@ -164,13 +171,6 @@ static void hash_free(struct AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_HASH_MUXER
|
#if CONFIG_HASH_MUXER
|
||||||
static const AVClass hashenc_class = {
|
|
||||||
.class_name = "hash muxer",
|
|
||||||
.item_name = av_default_item_name,
|
|
||||||
.option = hash_streamhash_options,
|
|
||||||
.version = LIBAVUTIL_VERSION_INT,
|
|
||||||
};
|
|
||||||
|
|
||||||
const AVOutputFormat ff_hash_muxer = {
|
const AVOutputFormat ff_hash_muxer = {
|
||||||
.name = "hash",
|
.name = "hash",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Hash testing"),
|
.long_name = NULL_IF_CONFIG_SMALL("Hash testing"),
|
||||||
@ -183,7 +183,7 @@ const AVOutputFormat ff_hash_muxer = {
|
|||||||
.deinit = hash_free,
|
.deinit = hash_free,
|
||||||
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT |
|
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT |
|
||||||
AVFMT_TS_NEGATIVE,
|
AVFMT_TS_NEGATIVE,
|
||||||
.priv_class = &hashenc_class,
|
.priv_class = &hash_streamhashenc_class,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -212,13 +212,6 @@ const AVOutputFormat ff_md5_muxer = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_STREAMHASH_MUXER
|
#if CONFIG_STREAMHASH_MUXER
|
||||||
static const AVClass streamhashenc_class = {
|
|
||||||
.class_name = "stream hash muxer",
|
|
||||||
.item_name = av_default_item_name,
|
|
||||||
.option = hash_streamhash_options,
|
|
||||||
.version = LIBAVUTIL_VERSION_INT,
|
|
||||||
};
|
|
||||||
|
|
||||||
const AVOutputFormat ff_streamhash_muxer = {
|
const AVOutputFormat ff_streamhash_muxer = {
|
||||||
.name = "streamhash",
|
.name = "streamhash",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Per-stream hash testing"),
|
.long_name = NULL_IF_CONFIG_SMALL("Per-stream hash testing"),
|
||||||
@ -231,7 +224,7 @@ const AVOutputFormat ff_streamhash_muxer = {
|
|||||||
.deinit = hash_free,
|
.deinit = hash_free,
|
||||||
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT |
|
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT |
|
||||||
AVFMT_TS_NEGATIVE,
|
AVFMT_TS_NEGATIVE,
|
||||||
.priv_class = &streamhashenc_class,
|
.priv_class = &hash_streamhashenc_class,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user