summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2015-06-06 11:09:15 -0700
committerPhilip Langdale <philipl@overt.org>2015-06-06 13:14:14 -0700
commit7e4661174ae11f95cb3527a9f58f1a71d297359c (patch)
treeceefa735f54b6b3ebd43775bd34e47e735707e08 /libavcodec/nvenc.c
parente79c40fe72475a37db44849c1e1399b593dcaffd (diff)
avcodec/nvenc: Add 'nvenc_h264' as an alternative name for 'nvenc'
This allows us to offer the same codec name that libav uses. We don't have a special way to do aliases, so it's all a bit more verbose than you'd want but such is life. Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 246f6a178b..87ce6f35cb 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1427,6 +1427,31 @@ AVCodec ff_nvenc_encoder = {
};
#endif
+/* Add an alias for nvenc_h264 */
+#if CONFIG_NVENC_H264_ENCODER
+static const AVClass nvenc_h264_class = {
+ .class_name = "nvenc_h264",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_nvenc_h264_encoder = {
+ .name = "nvenc_h264",
+ .long_name = NULL_IF_CONFIG_SMALL("Nvidia NVENC h264 encoder"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_H264,
+ .priv_data_size = sizeof(NvencContext),
+ .init = nvenc_encode_init,
+ .encode2 = nvenc_encode_frame,
+ .close = nvenc_encode_close,
+ .capabilities = CODEC_CAP_DELAY,
+ .priv_class = &nvenc_h264_class,
+ .defaults = nvenc_defaults,
+ .pix_fmts = pix_fmts_nvenc,
+};
+#endif
+
#if CONFIG_NVENC_HEVC_ENCODER
static const AVClass nvenc_hevc_class = {
.class_name = "nvenc_hevc",