mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
videoaggregator: Rename ignore-eos pad property to repeat-after-eos
What it does is to repeat the last frame forever after EOS, it does not literally ignore EOS.
This commit is contained in:
parent
a240fb7997
commit
51c359dda6
4 changed files with 28 additions and 28 deletions
|
@ -157,7 +157,7 @@ gst_gl_video_mixer_blend_function_get_type (void)
|
|||
#define DEFAULT_PAD_HEIGHT 0
|
||||
#define DEFAULT_PAD_ALPHA 1.0
|
||||
#define DEFAULT_PAD_ZORDER 0
|
||||
#define DEFAULT_PAD_IGNORE_EOS FALSE
|
||||
#define DEFAULT_PAD_REPEAT_AFTER_EOS FALSE
|
||||
#define DEFAULT_PAD_BLEND_EQUATION_RGB GST_GL_VIDEO_MIXER_BLEND_EQUATION_ADD
|
||||
#define DEFAULT_PAD_BLEND_EQUATION_ALPHA GST_GL_VIDEO_MIXER_BLEND_EQUATION_ADD
|
||||
#define DEFAULT_PAD_BLEND_FUNCTION_SRC_RGB GST_GL_VIDEO_MIXER_BLEND_FUNCTION_SRC_ALPHA
|
||||
|
@ -184,7 +184,7 @@ enum
|
|||
PROP_INPUT_BLEND_FUNCTION_CONSTANT_COLOR_BLUE,
|
||||
PROP_INPUT_BLEND_FUNCTION_CONSTANT_COLOR_ALPHA,
|
||||
PROP_INPUT_ZORDER,
|
||||
PROP_INPUT_IGNORE_EOS,
|
||||
PROP_INPUT_REPEAT_AFTER_EOS,
|
||||
};
|
||||
|
||||
static void gst_gl_video_mixer_input_get_property (GObject * object,
|
||||
|
@ -225,10 +225,11 @@ gst_gl_video_mixer_input_class_init (GstGLVideoMixerInputClass * klass)
|
|||
g_param_spec_uint ("zorder", "Z-Order", "Z Order of the picture",
|
||||
0, 10000, DEFAULT_PAD_ZORDER,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_IGNORE_EOS,
|
||||
g_param_spec_boolean ("ignore-eos", "Ignore EOS", "Aggregate the last "
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_REPEAT_AFTER_EOS,
|
||||
g_param_spec_boolean ("repeat-after-eos", "Repeat After EOS",
|
||||
"Aggregate the last "
|
||||
"frame on pads that are EOS till they are released",
|
||||
DEFAULT_PAD_IGNORE_EOS,
|
||||
DEFAULT_PAD_REPEAT_AFTER_EOS,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_XPOS,
|
||||
g_param_spec_int ("xpos", "X Position", "X Position of the picture",
|
||||
|
@ -239,12 +240,12 @@ gst_gl_video_mixer_input_class_init (GstGLVideoMixerInputClass * klass)
|
|||
G_MININT, G_MAXINT, DEFAULT_PAD_YPOS,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_WIDTH,
|
||||
g_param_spec_int ("width", "Width", "Width of the picture",
|
||||
G_MININT, G_MAXINT, DEFAULT_PAD_WIDTH,
|
||||
g_param_spec_int ("width", "Width", "Width of the picture", G_MININT,
|
||||
G_MAXINT, DEFAULT_PAD_WIDTH,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_HEIGHT,
|
||||
g_param_spec_int ("height", "Height", "Height of the picture",
|
||||
G_MININT, G_MAXINT, DEFAULT_PAD_HEIGHT,
|
||||
g_param_spec_int ("height", "Height", "Height of the picture", G_MININT,
|
||||
G_MAXINT, DEFAULT_PAD_HEIGHT,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_ALPHA,
|
||||
g_param_spec_double ("alpha", "Alpha", "Alpha of the picture", 0.0, 1.0,
|
||||
|
@ -252,8 +253,7 @@ gst_gl_video_mixer_input_class_init (GstGLVideoMixerInputClass * klass)
|
|||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_INPUT_BLEND_EQUATION_RGB,
|
||||
g_param_spec_enum ("blend-equation-rgb", "Blend Equation RGB",
|
||||
"Blend Equation for RGB",
|
||||
GST_TYPE_GL_VIDEO_MIXER_BLEND_EQUATION,
|
||||
"Blend Equation for RGB", GST_TYPE_GL_VIDEO_MIXER_BLEND_EQUATION,
|
||||
DEFAULT_PAD_BLEND_EQUATION_RGB,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class,
|
||||
|
|
|
@ -54,12 +54,12 @@ static void gst_video_aggregator_reset_qos (GstVideoAggregator * vagg);
|
|||
****************************************/
|
||||
|
||||
#define DEFAULT_PAD_ZORDER 0
|
||||
#define DEFAULT_PAD_IGNORE_EOS FALSE
|
||||
#define DEFAULT_PAD_REPEAT_AFTER_EOS FALSE
|
||||
enum
|
||||
{
|
||||
PROP_PAD_0,
|
||||
PROP_PAD_ZORDER,
|
||||
PROP_PAD_IGNORE_EOS,
|
||||
PROP_PAD_REPEAT_AFTER_EOS,
|
||||
};
|
||||
|
||||
|
||||
|
@ -92,8 +92,8 @@ gst_video_aggregator_pad_get_property (GObject * object, guint prop_id,
|
|||
case PROP_PAD_ZORDER:
|
||||
g_value_set_uint (value, pad->zorder);
|
||||
break;
|
||||
case PROP_PAD_IGNORE_EOS:
|
||||
g_value_set_boolean (value, pad->ignore_eos);
|
||||
case PROP_PAD_REPEAT_AFTER_EOS:
|
||||
g_value_set_boolean (value, pad->repeat_after_eos);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -124,8 +124,8 @@ gst_video_aggregator_pad_set_property (GObject * object, guint prop_id,
|
|||
(GCompareFunc) pad_zorder_compare);
|
||||
GST_OBJECT_UNLOCK (vagg);
|
||||
break;
|
||||
case PROP_PAD_IGNORE_EOS:
|
||||
pad->ignore_eos = g_value_get_boolean (value);
|
||||
case PROP_PAD_REPEAT_AFTER_EOS:
|
||||
pad->repeat_after_eos = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
@ -337,10 +337,10 @@ gst_video_aggregator_pad_class_init (GstVideoAggregatorPadClass * klass)
|
|||
g_param_spec_uint ("zorder", "Z-Order", "Z Order of the picture",
|
||||
0, G_MAXUINT, DEFAULT_PAD_ZORDER,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, PROP_PAD_IGNORE_EOS,
|
||||
g_param_spec_boolean ("ignore-eos", "Ignore EOS", "Aggregate the last "
|
||||
"frame on pads that are EOS till they are released",
|
||||
DEFAULT_PAD_IGNORE_EOS,
|
||||
g_object_class_install_property (gobject_class, PROP_PAD_REPEAT_AFTER_EOS,
|
||||
g_param_spec_boolean ("repeat-after-eos", "Repeat After EOS",
|
||||
"Repeat the " "last frame after EOS until all pads are EOS",
|
||||
DEFAULT_PAD_REPEAT_AFTER_EOS,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GstVideoAggregatorPadPrivate));
|
||||
|
@ -362,7 +362,7 @@ gst_video_aggregator_pad_init (GstVideoAggregatorPad * vaggpad)
|
|||
GstVideoAggregatorPadPrivate);
|
||||
|
||||
vaggpad->zorder = DEFAULT_PAD_ZORDER;
|
||||
vaggpad->ignore_eos = DEFAULT_PAD_IGNORE_EOS;
|
||||
vaggpad->repeat_after_eos = DEFAULT_PAD_REPEAT_AFTER_EOS;
|
||||
vaggpad->aggregated_frame = NULL;
|
||||
vaggpad->priv->converted_buffer = NULL;
|
||||
|
||||
|
@ -1201,7 +1201,7 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg,
|
|||
continue;
|
||||
}
|
||||
} else {
|
||||
if (is_eos && pad->ignore_eos) {
|
||||
if (is_eos && pad->repeat_after_eos) {
|
||||
eos = FALSE;
|
||||
GST_DEBUG_OBJECT (pad, "ignoring EOS and re-using previous buffer");
|
||||
continue;
|
||||
|
|
|
@ -75,7 +75,7 @@ struct _GstVideoAggregatorPad
|
|||
|
||||
/* properties */
|
||||
guint zorder;
|
||||
gboolean ignore_eos;
|
||||
gboolean repeat_after_eos;
|
||||
|
||||
/* Subclasses can force an alpha channel in the (input thus output)
|
||||
* colorspace format */
|
||||
|
|
|
@ -1765,7 +1765,7 @@ _buffer_recvd (GstElement * appsink, gint * buffers_recvd)
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
GST_START_TEST (test_ignore_eos)
|
||||
GST_START_TEST (test_repeat_after_eos)
|
||||
{
|
||||
gboolean res;
|
||||
gint buffers_recvd;
|
||||
|
@ -1793,9 +1793,9 @@ GST_START_TEST (test_ignore_eos)
|
|||
ck_assert_msg (res == TRUE, "Could not link compositor with appsink");
|
||||
srcpad = gst_element_get_static_pad (src, "src");
|
||||
sinkpad = gst_element_get_request_pad (compositor, "sink_%u");
|
||||
/* When "ignore-eos" is set, compositor will keep sending the last buffer even
|
||||
/* When "repeat-after-eos" is set, compositor will keep sending the last buffer even
|
||||
* after EOS, so we will receive more buffers than we sent. */
|
||||
g_object_set (sinkpad, "ignore-eos", TRUE, NULL);
|
||||
g_object_set (sinkpad, "repeat-after-eos", TRUE, NULL);
|
||||
link_res = gst_pad_link (srcpad, sinkpad);
|
||||
ck_assert_msg (GST_PAD_LINK_SUCCESSFUL (link_res), "videotestsrc -> "
|
||||
"compositor pad link failed: %i", link_res);
|
||||
|
@ -2099,7 +2099,7 @@ compositor_suite (void)
|
|||
tcase_add_test (tc_chain, test_flush_start_flush_stop);
|
||||
tcase_add_test (tc_chain, test_segment_base_handling);
|
||||
tcase_add_test (tc_chain, test_obscured_skipped);
|
||||
tcase_add_test (tc_chain, test_ignore_eos);
|
||||
tcase_add_test (tc_chain, test_repeat_after_eos);
|
||||
tcase_add_test (tc_chain, test_pad_z_order);
|
||||
tcase_add_test (tc_chain, test_pad_numbering);
|
||||
tcase_add_test (tc_chain, test_start_time_zero_live_drop_0);
|
||||
|
|
Loading…
Reference in a new issue