mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Use a core element (tee) for this testcase
Original commit message from CVS: Use a core element (tee) for this testcase
This commit is contained in:
parent
f6027148a4
commit
132f776069
2 changed files with 22 additions and 16 deletions
|
@ -2,19 +2,22 @@
|
|||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
GstElement *bin, *decoder;
|
||||
GstElement *bin, *element;
|
||||
gint i=10000;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
bin = gst_pipeline_new("pipeline");
|
||||
bin = gst_pipeline_new ("pipeline");
|
||||
|
||||
while (TRUE)
|
||||
while (i--)
|
||||
{
|
||||
decoder = gst_elementfactory_make("mpeg2dec","mpeg2dec");
|
||||
if (!decoder)
|
||||
element = gst_elementfactory_make ("tee", "tee");
|
||||
if (!element)
|
||||
break;
|
||||
|
||||
gst_bin_add(GST_BIN(bin), decoder);
|
||||
gst_bin_remove(GST_BIN(bin), decoder);
|
||||
gst_element_request_pad_by_name (element, "src%d");
|
||||
|
||||
gst_bin_add (GST_BIN (bin), element);
|
||||
gst_bin_remove (GST_BIN (bin), element);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,19 +2,22 @@
|
|||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
GstElement *bin, *decoder;
|
||||
GstElement *bin, *element;
|
||||
gint i=10000;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
bin = gst_pipeline_new("pipeline");
|
||||
bin = gst_pipeline_new ("pipeline");
|
||||
|
||||
while (TRUE)
|
||||
while (i--)
|
||||
{
|
||||
decoder = gst_elementfactory_make("mpeg2dec","mpeg2dec");
|
||||
if (!decoder)
|
||||
element = gst_elementfactory_make ("tee", "tee");
|
||||
if (!element)
|
||||
break;
|
||||
|
||||
gst_bin_add(GST_BIN(bin), decoder);
|
||||
gst_bin_remove(GST_BIN(bin), decoder);
|
||||
gst_element_request_pad_by_name (element, "src%d");
|
||||
|
||||
gst_bin_add (GST_BIN (bin), element);
|
||||
gst_bin_remove (GST_BIN (bin), element);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue