Commit 6bcd6e1e authored by Sebastian Dröge's avatar Sebastian Dröge Committed by GStreamer Marge Bot

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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1076>
parent 0644da87
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment