From 74bb89eb89ed8ecaafeaba54e97d6cfa06956fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 31 May 2020 09:59:29 +0300 Subject: [PATCH] avcodecmap: Remove unused GstFFMpegCompliance type --- ext/libav/gstavaudenc.c | 2 +- ext/libav/gstavcodecmap.c | 22 -------------------- ext/libav/gstavcodecmap.h | 42 --------------------------------------- 3 files changed, 1 insertion(+), 65 deletions(-) diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c index cdca3a6893..078ab0b27a 100644 --- a/ext/libav/gstavaudenc.c +++ b/ext/libav/gstavaudenc.c @@ -289,7 +289,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info) if ((oclass->in_plugin->capabilities & AV_CODEC_CAP_EXPERIMENTAL) && ffmpegaudenc->context->strict_std_compliance != - GST_FFMPEG_EXPERIMENTAL) { + FF_COMPLIANCE_EXPERIMENTAL) { GST_ELEMENT_ERROR (ffmpegaudenc, LIBRARY, SETTINGS, ("Codec is experimental, but settings don't allow encoders to " "produce output of experimental quality"), diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index 0e578e55b7..c9a7812f90 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -66,28 +66,6 @@ static const struct AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT} }; -GType -gst_ffmpeg_compliance_get_type (void) -{ - static GType ffmpeg_compliance_type = 0; - static const GEnumValue compliance_types[] = { - {GST_FFMPEG_VERY_STRICT, "Strictly conform to older spec", - "verystrict"}, - {GST_FFMPEG_STRICT, "Strictly conform to current spec", "strict"}, - {GST_FFMPEG_NORMAL, "Normal behavior", "normal"}, - {GST_FFMPEG_UNOFFICIAL, "Allow unofficial extensions", "unofficial"}, - {GST_FFMPEG_EXPERIMENTAL, "Allow nonstandardized experimental things", - "experimental"}, - {0, NULL, NULL} - }; - - if (!ffmpeg_compliance_type) { - ffmpeg_compliance_type = - g_enum_register_static ("GstFFMpegCompliance", compliance_types); - } - return ffmpeg_compliance_type; -} - static guint64 gst_ffmpeg_channel_positions_to_layout (GstAudioChannelPosition * pos, gint channels) diff --git a/ext/libav/gstavcodecmap.h b/ext/libav/gstavcodecmap.h index 6681a621f3..04b0479403 100644 --- a/ext/libav/gstavcodecmap.h +++ b/ext/libav/gstavcodecmap.h @@ -26,48 +26,6 @@ #include #include -/** - * GstFFMpegCompliance: - * @GST_FFMPEG_VERY_STRICT: Strictly conform to an older - * more strict version of the spec or reference software - * @GST_FFMPEG_STRICT: Strictly conform to all the things - * in the spec no matter what consequences. - * @GST_FFMPEG_NORMAL: - * @GST_FFMPEG_UNOFFICIAL: Allow unofficial extensions - * @GST_FFMPEG_EXPERIMENTAL: Allow nonstandardized - * experimental things. - * - * This setting instructs libav on how strictly it should follow the - * associated standard. - * - * From avcodec.h: - * Setting this to STRICT or higher means the encoder and decoder will - * generally do stupid things, whereas setting it to unofficial or lower - * will mean the encoder might produce output that is not supported by all - * spec-compliant decoders. Decoders don't differentiate between normal, - * unofficial and experimental (that is, they always try to decode things - * when they can) unless they are explicitly asked to behave stupidly - * (=strictly conform to the specs) - */ -typedef enum { - GST_FFMPEG_VERY_STRICT = FF_COMPLIANCE_VERY_STRICT, - GST_FFMPEG_STRICT = FF_COMPLIANCE_STRICT, - GST_FFMPEG_NORMAL = FF_COMPLIANCE_NORMAL, - GST_FFMPEG_UNOFFICIAL = FF_COMPLIANCE_UNOFFICIAL, - GST_FFMPEG_EXPERIMENTAL = FF_COMPLIANCE_EXPERIMENTAL, -} GstFFMpegCompliance; - -/* - * _compliance_get_type () Returns an enum type that can be - * used as a property to indicate desired FFMpeg adherence to - * an associated specification - */ - -GType -gst_ffmpeg_compliance_get_type (void); -#define GST_TYPE_FFMPEG_COMPLIANCE (gst_ffmpeg_compliance_get_type ()) -#define FFMPEG_DEFAULT_COMPLIANCE GST_FFMPEG_NORMAL - /* * _codecid_is_image() returns TRUE for image formats */