GNOME Bugzilla – Bug 551584
Crash when modifying the videobox "top" and "left" live while pipe is running
Last modified: 2008-10-03 16:00:17 UTC
I was trying to move a small video stream over a bigger video stream using videomixer and videobox to have a moving feed over the main video. But when moving the small video feed (even if I pause and then play...), the whole process crash. I was able to move from left to right If I added a border at the right using "right=-200" (or any value...) giving a space to move into but doing the same thing with "bottom" to move down does not work at all. Note, moving from right to left or bottom to top seem to work... Here is a small source code that reproduce this behaviour: ///////////// Start of source code ///////////////// #include <gst/gst.h> #include <gst/gstelement.h> #include <gst/gstelementfactory.h> #include <gst/gstpipeline.h> #include <gst/gstbin.h> #include <gst/gstcaps.h> #include <gst/gstutils.h> #include <glib.h> #include <stdio.h> #include <stdlib.h> #include <err.h> static gboolean incr_top_border(gpointer data); static int border; /* * */ int main(int argc, char* argv[]) { GstElement* pipeline; GstElement* videosrc; GstElement* videofilter; GstElement* videobox; GstElement* videosink; GstCaps* caps; GMainLoop* loop; int border; gst_init(&argc, &argv); loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new("Crash"); videosrc = gst_element_factory_make("videotestsrc", "src"); videofilter = gst_element_factory_make("capsfilter", "filter"); videobox = gst_element_factory_make("videobox", "videobox"); videosink = gst_element_factory_make("fakesink", "sink"); if (!videosrc || !videofilter || !videobox || !videosink) { err(1, "Failed to create one of the pipeline components"); } caps = gst_caps_from_string("video/x-raw-yuv, width=720, height=576, bpp=32, depth=32, framerate=25/1"); if (!caps) { err(1, "Failed to create caps from string"); } g_object_set(videofilter, "caps", caps, NULL); gst_bin_add_many(GST_BIN(pipeline), videosrc, videofilter, videobox, videosink, NULL); gst_element_link_many(videosrc, videofilter, videobox, videosink, NULL); gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_PLAYING); g_timeout_add(1000, incr_top_border, videobox); g_main_loop_run(loop); puts("Exiting"); fflush(stdout); gst_element_set_state(GST_ELEMENT(pipeline), GST_STATE_NULL); gst_object_unref(GST_OBJECT(pipeline)); return (EXIT_SUCCESS); } static gboolean incr_top_border(gpointer data) { GstElement* videobox = (GstElement *) data; printf("Setting top=%d\n", 0 - border); fflush(stdout); g_object_set(videobox, "top", 0 - border, NULL); ++border; } /////////////////// END of source code //////////////////////////
This example seems to work fine with latest basetransform and good.