Adding vertigotv filter between videotestsrc and autovideosink

ArifHossain aftnix at gmail.com
Thu Nov 28 07:02:23 PST 2013


On Nov 28, 2013, at 8:17 PM, Sebastian Dröge <sebastian at centricular.com> wrote:

> On Do, 2013-11-28 at 19:58 +0600, ArifHossain wrote:
>> Hi,
>> 
>> I'm trying to add a vertigotv filter between videotestsrc and autovideosink like follows :
>> 
>> GstElement *pipeline, *source, *sink, *filter;
>> 
>> 
>>  source = gst_element_factory_make ("videotestsrc", "source");
>>  sink = gst_element_factory_make ("autovideosink", "sink");
>>  filter = gst_element_factory_make("vertigotv", "filter");
>> 
>>  pipeline = gst_pipeline_new ("test-pipeline");
>> 
>>  if (!pipeline || !source || !sink) {
>>    g_printerr ("Not all elements could be created.\n");
>>    return -1;
>>  }
>> 
>>  /* Build the pipeline */
>>  gst_bin_add_many (GST_BIN (pipeline), source, filter, sink, NULL);
>>  if (((gst_element_link (source, filter)) && (gst_element_link (filter, sink)))  != TRUE) {
>>    g_printerr ("Elements could not be linked.\n");
>>    gst_object_unref (pipeline);
>>    return -1;
>>  }
>> 
>> But when it stops with following message :
>> 
>> "Unable to set the pipeline to the playing state"
> 
> Problem here is that vertigotv only handles RGB but your sink probably
> wants RGB in a different order or some YUV color format. Try adding a
> videoconvert element between vertigotv and the video sink
> (ffmpegcolorspace in case you still have to use 0.10). 

I've changed to following snippet :

source = gst_element_factory_make ("videotestsrc", "source");
  sink = gst_element_factory_make ("autovideosink", "sink");
  filter = gst_element_factory_make("vertigotv", "filter");
  spec = gst_element_factory_make("ffmpegcolorspec", "spec");
  
    
  /* Create the empty pipeline */
  pipeline = gst_pipeline_new ("test-pipeline");
    
  if (!pipeline || !source || !sink) {
    g_printerr ("Not all elements could be created.\n");
    return -1;
  }
   
  /* Build the pipeline */
  gst_bin_add_many (GST_BIN (pipeline), source, filter,spec, sink, NULL);
  if ((gst_element_link (source, filter) && gst_element_link (filter, spec) && gst_element_link(spec,sink))  != TRUE) {
    g_printerr ("Elements could not be linked.\n");
    gst_object_unref (pipeline);
    return -1;
  }

It shows the following error :

(a.out:1301): GStreamer-CRITICAL **: gst_element_link_pads_full: assertion `GST_IS_ELEMENT (dest)' failed
Elements could not be linked.



> 
>> Another thing is how should i debug this kind of scenario to find out what actually went wrong?
> 
> Check the output on the terminal, the error messages you get on the bus
> and if all fails the GStreamer debug output:
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-checklist-debug.html
> 
> Instead of --gst-debug you can also set the environment variable
> GST_DEBUG.
> 
> -- 
> Sebastian Dröge <sebastian at centricular.com>
> Centricular Ltd - http://www.centricular.com
> Expertise, Straight from the Source
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list