From 6bcd6e1e6662314285bfb5dca1deabaa259cc089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 19 Mar 2021 10:31:58 +0200 Subject: [PATCH] playback: Don't special-case G_SIGNAL_RUN_CLEANUP stage in signal accumulators All these signals don't run the class handler in the CLEANUP stage. Part-of: --- gst/playback/gstdecodebin2.c | 15 +++++---------- gst/playback/gstdecodebin3.c | 3 +-- gst/playback/gstparsebin.c | 15 +++++---------- gst/playback/gsturidecodebin.c | 15 +++++---------- gst/playback/gsturidecodebin3.c | 3 +-- 5 files changed, 17 insertions(+), 34 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index b9dc374c1..d07427a1a 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -615,8 +615,7 @@ _gst_boolean_accumulator (GSignalInvocationHint * ihint, gboolean myboolean; myboolean = g_value_get_boolean (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean); + g_value_set_boolean (return_accu, myboolean); /* stop emission if FALSE */ return myboolean; @@ -632,8 +631,7 @@ _gst_boolean_or_accumulator (GSignalInvocationHint * ihint, myboolean = g_value_get_boolean (handler_return); retboolean = g_value_get_boolean (return_accu); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean || retboolean); + g_value_set_boolean (return_accu, myboolean || retboolean); return TRUE; } @@ -646,8 +644,7 @@ _gst_array_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); return FALSE; } @@ -659,8 +656,7 @@ _gst_select_accumulator (GSignalInvocationHint * ihint, GstAutoplugSelectResult res; res = g_value_get_enum (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_enum (return_accu, res); + g_value_set_enum (return_accu, res); /* Call the next handler in the chain (if any) when the current callback * returns TRY. This makes it possible to register separate autoplug-select @@ -679,8 +675,7 @@ _gst_array_hasvalue_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); if (array != NULL) return FALSE; diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c index 1a242252d..230b53b10 100644 --- a/gst/playback/gstdecodebin3.c +++ b/gst/playback/gstdecodebin3.c @@ -535,8 +535,7 @@ _gst_int_accumulator (GSignalInvocationHint * ihint, { gint res = g_value_get_int (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_int (return_accu, res); + g_value_set_int (return_accu, res); if (res == -1) return TRUE; diff --git a/gst/playback/gstparsebin.c b/gst/playback/gstparsebin.c index 870243e02..6c3e101b8 100644 --- a/gst/playback/gstparsebin.c +++ b/gst/playback/gstparsebin.c @@ -513,8 +513,7 @@ _gst_boolean_accumulator (GSignalInvocationHint * ihint, gboolean myboolean; myboolean = g_value_get_boolean (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean); + g_value_set_boolean (return_accu, myboolean); /* stop emission if FALSE */ return myboolean; @@ -530,8 +529,7 @@ _gst_boolean_or_accumulator (GSignalInvocationHint * ihint, myboolean = g_value_get_boolean (handler_return); retboolean = g_value_get_boolean (return_accu); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean || retboolean); + g_value_set_boolean (return_accu, myboolean || retboolean); return TRUE; } @@ -544,8 +542,7 @@ _gst_array_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); return FALSE; } @@ -557,8 +554,7 @@ _gst_select_accumulator (GSignalInvocationHint * ihint, GstAutoplugSelectResult res; res = g_value_get_enum (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_enum (return_accu, res); + g_value_set_enum (return_accu, res); /* Call the next handler in the chain (if any) when the current callback * returns TRY. This makes it possible to register separate autoplug-select @@ -577,8 +573,7 @@ _gst_array_hasvalue_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); if (array != NULL) return FALSE; diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c index c9be793c0..17ea666ac 100644 --- a/gst/playback/gsturidecodebin.c +++ b/gst/playback/gsturidecodebin.c @@ -235,8 +235,7 @@ _gst_boolean_accumulator (GSignalInvocationHint * ihint, gboolean myboolean; myboolean = g_value_get_boolean (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean); + g_value_set_boolean (return_accu, myboolean); /* stop emission if FALSE */ return myboolean; @@ -252,8 +251,7 @@ _gst_boolean_or_accumulator (GSignalInvocationHint * ihint, myboolean = g_value_get_boolean (handler_return); retboolean = g_value_get_boolean (return_accu); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boolean (return_accu, myboolean || retboolean); + g_value_set_boolean (return_accu, myboolean || retboolean); return TRUE; } @@ -265,8 +263,7 @@ _gst_array_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); return FALSE; } @@ -278,8 +275,7 @@ _gst_select_accumulator (GSignalInvocationHint * ihint, GstAutoplugSelectResult res; res = g_value_get_enum (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_enum (return_accu, res); + g_value_set_enum (return_accu, res); /* Call the next handler in the chain (if any) when the current callback * returns TRY. This makes it possible to register separate autoplug-select @@ -298,8 +294,7 @@ _gst_array_hasvalue_accumulator (GSignalInvocationHint * ihint, gpointer array; array = g_value_get_boxed (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_boxed (return_accu, array); + g_value_set_boxed (return_accu, array); if (array != NULL) return FALSE; diff --git a/gst/playback/gsturidecodebin3.c b/gst/playback/gsturidecodebin3.c index f672ef703..d6b5f2b39 100644 --- a/gst/playback/gsturidecodebin3.c +++ b/gst/playback/gsturidecodebin3.c @@ -360,8 +360,7 @@ _gst_int_accumulator (GSignalInvocationHint * ihint, { gint res = g_value_get_int (handler_return); - if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP)) - g_value_set_int (return_accu, res); + g_value_set_int (return_accu, res); if (res == -1) return TRUE;