raven/multimedia/gstreamer1-plugin-libav/gst-libav-remove-deprecated-debug-mv-property.patch
2024-02-21 13:47:54 +06:00

86 lines
3.2 KiB
Diff

diff -Naur b/ext/libav/gstavviddec.c a/ext/libav/gstavviddec.c
--- b/ext/libav/gstavviddec.c 2019-04-19 15:16:40.000000000 +0600
+++ a/ext/libav/gstavviddec.c 2023-09-04 20:23:14.377223133 +0600
@@ -39,7 +39,6 @@
#define DEFAULT_LOWRES 0
#define DEFAULT_SKIPFRAME 0
#define DEFAULT_DIRECT_RENDERING TRUE
-#define DEFAULT_DEBUG_MV FALSE
#define DEFAULT_MAX_THREADS 0
#define DEFAULT_OUTPUT_CORRUPT TRUE
#define REQUIRED_POOL_MAX_BUFFERS 32
@@ -223,10 +222,14 @@
g_param_spec_boolean ("direct-rendering", "Direct Rendering",
"Enable direct rendering", DEFAULT_DIRECT_RENDERING,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#ifndef GST_REMOVE_DEPRECATED
g_object_class_install_property (gobject_class, PROP_DEBUG_MV,
g_param_spec_boolean ("debug-mv", "Debug motion vectors",
- "Whether libav should print motion vectors on top of the image",
- DEFAULT_DEBUG_MV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ "Whether to print motion vectors on top of the image "
+ "(deprecated, non-functional)", FALSE,
+ G_PARAM_DEPRECATED | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#endif
+
g_object_class_install_property (gobject_class, PROP_OUTPUT_CORRUPT,
g_param_spec_boolean ("output-corrupt", "Output corrupt buffers",
"Whether libav should output frames even if corrupted",
@@ -267,7 +270,6 @@
ffmpegdec->opened = FALSE;
ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
ffmpegdec->direct_rendering = DEFAULT_DIRECT_RENDERING;
- ffmpegdec->debug_mv = DEFAULT_DEBUG_MV;
ffmpegdec->max_threads = DEFAULT_MAX_THREADS;
ffmpegdec->output_corrupt = DEFAULT_OUTPUT_CORRUPT;
@@ -484,10 +486,6 @@
ffmpegdec->context->lowres = ffmpegdec->lowres;
ffmpegdec->context->skip_frame = ffmpegdec->skip_frame;
- /* ffmpeg can draw motion vectors on top of the image (not every decoder
- * supports it) */
- ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
-
{
GstQuery *query;
gboolean is_live;
@@ -2134,10 +2132,11 @@
case PROP_DIRECT_RENDERING:
ffmpegdec->direct_rendering = g_value_get_boolean (value);
break;
+#ifndef GST_REMOVE_DEPRECATED
case PROP_DEBUG_MV:
- ffmpegdec->debug_mv = ffmpegdec->context->debug_mv =
- g_value_get_boolean (value);
+ /* non-functional *
break;
+#endif
case PROP_MAX_THREADS:
ffmpegdec->max_threads = g_value_get_int (value);
break;
@@ -2166,9 +2165,11 @@
case PROP_DIRECT_RENDERING:
g_value_set_boolean (value, ffmpegdec->direct_rendering);
break;
+#ifndef GST_REMOVE_DEPRECATED
case PROP_DEBUG_MV:
- g_value_set_boolean (value, ffmpegdec->context->debug_mv);
+ g_value_set_boolean (value, FALSE);
break;
+#endif
case PROP_MAX_THREADS:
g_value_set_int (value, ffmpegdec->max_threads);
break;
diff -Naur b/ext/libav/gstavviddec.h a/ext/libav/gstavviddec.h
--- b/ext/libav/gstavviddec.h 2019-04-19 15:16:40.000000000 +0600
+++ a/ext/libav/gstavviddec.h 2023-09-04 20:23:35.427086930 +0600
@@ -66,7 +66,6 @@
enum AVDiscard skip_frame;
gint lowres;
gboolean direct_rendering;
- gboolean debug_mv;
int max_threads;
gboolean output_corrupt;