Probem with output-selector

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Probem with output-selector

rasnaut
Hi to All!
I try to run example with output-selector (I copied code with gst-plugins-base-0.11.92/tests/icles/output-selector.c in QT). GStreamer get next Errors:

Got error message
Error: not negotiated
GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GstElement'
GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'
GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

I tried delete some code part, change plugins an etc. But nothing to changed. So anybody know what do with this?

And one more question: I wrote early about problem with xvimagesink plugin (that number of xvimagesink depends on the video card ports). So I want create one xvimagesink and switch it between my src streams. For implement this I want use output-selector. How I see this:
v4l2src device=/dev/video0 ! videorate ! identity ! output-selector ! | !  fakesink
                                                                                                 |_ _ _ _ _ _ _ _ _ _ _ _ _
                                                                                                                                      |
v4l2src device=/dev/video2 ! videorate ! identity ! output-selector ! | !  fakesink                    |
                                                                                                 |_ _ _ _ _ _ _ _ _ _          |
                                                                                                                            |          |
v4l2src device=/dev/video3 ! videorate ! identity ! output-selector ! | !  fakesink          ! xvimagesink
.                                                                                                |_ _ _ _ _ _ _ _ _ _|         |
.                                                                                                                                      |
.                                                                                                                                      |
v4l2src device=/dev/videoN ! videorate ! identity ! output-selector ! | !  fakesink                    |
                                                                                                 |_ _ _ _ _ _ _ _ _ _ _ _ _ _|
                                                                                                                                       
So, what do you think, It possible with output-selector? Or maybe I must use another gstreamer plugin?
Reply | Threaded
Open this post in threaded view
|

Re: Probem with output-selector

Stefan Sauer
On 07/31/2012 05:15 PM, rasnaut wrote:

> Hi to All!
> I try to run example with output-selector (I copied code with
> gst-plugins-base-0.11.92/tests/icles/output-selector.c in QT). GStreamer get
> next Errors:
>
> Got error message
> Error: not negotiated
> GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to
> `GstElement'
> GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to
> `GObject'
> GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)'
> failed
> GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to
> `GObject'
> GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)'
> failed
>
> I tried delete some code part, change plugins an etc. But nothing to
> changed. So anybody know what do with this?
The test now fails with
"""
Got error message
Error: not negotiated
"""

Someone will need to investigate and fix it.

Stefan

>
> And one more question: I wrote early about problem with xvimagesink plugin
> (that number of xvimagesink depends on the video card ports). So I want
> create one xvimagesink and switch it between my src streams. For implement
> this I want use output-selector. How I see this:
> v4l2src device=/dev/video0 ! videorate ! identity ! output-selector ! | !
> fakesink
>                                                                                                
> |_ _ _ _ _ _ _ _ _ _ _ _ _
>                                                                                                                                      
> |
> v4l2src device=/dev/video2 ! videorate ! identity ! output-selector ! | !
> fakesink                    |
>                                                                                                
> |_ _ _ _ _ _ _ _ _ _          |
>                                                                                                                            
> |          |
> v4l2src device=/dev/video3 ! videorate ! identity ! output-selector ! | !
> fakesink          ! xvimagesink
> .                                                                                              
> |_ _ _ _ _ _ _ _ _ _|         |
> .                                                                                                                                    
> |
> .                                                                                                                                    
> |
> v4l2src device=/dev/videoN ! videorate ! identity ! output-selector ! | !
> fakesink                    |
>                                                                                                
> |_ _ _ _ _ _ _ _ _ _ _ _ _ _|
>                                                                                                                                        
> So, what do you think, It possible with output-selector? Or maybe I must use
> another gstreamer plugin?
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Probem-with-output-selector-tp4655762.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Probem with output-selector

rasnaut
Hah... So, I tested many pipline combination and what I have seen. When I simple used code like output-selector-test.c:

gePipline = gst_pipeline_new("pipeline");
    g_assert(gePipline);
    geVideoSrc = gst_element_factory_make("v4l2src", "src");
    g_assert(geVideoSrc);
    geVideoRate = gst_element_factory_make("videorate", "vrate1");
    g_assert(geVideoRate);
    geVideoScale = gst_element_factory_make("videoscale", "vscale1");
    g_assert(geVideoScale);
    geIdentity = gst_element_factory_make("identity", "ident");
    g_assert(geIdentity);
    geOutputSelector = gst_element_factory_make("output-selector", "out_selector");
    g_assert(geOutputSelector);
    geConvert0 = gst_element_factory_make("videoconvert","v0");
    g_assert(geConvert0);
    geConvert1= gst_element_factory_make("videoconvert","v1");
    g_assert(geConvert1);
    geConvert2= gst_element_factory_make("videoconvert","v2");
    g_assert(geConvert2);
    geVideoOut2 = gst_element_factory_make("autovideosink", "video out2");
    g_assert(geVideoOut2);
    geVideoOut1 = gst_element_factory_make("fakesink", "video out1");
    g_assert(geVideoOut1);

    gst_bin_add_many(GST_BIN(gePipline), geVideoSrc, geVideoRate,geVideoScale,geIdentity,  geConvert0, geOutputSelector, geConvert1,geVideoOut1, geConvert2,geVideoOut2, NULL);

....
gst_element_link_filtered(geVideoSrc, geVideoRate, gcVideoCaps);
  gst_element_link( geVideoRate, geVideoScale);
  gst_element_link_filtered(geVideoScale, geIdentity, gcVideoScaleCaps);
  gst_element_link(geIdentity, geConvert0);
  gst_element_link( geConvert0, geOutputSelector);

  // link output 1
 gpSinkPad = gst_element_get_static_pad(geConvert1, "sink");
 gpOsel_Src1 = gst_element_get_request_pad (geOutputSelector, "src_%u");
 if (gst_pad_link (gpOsel_Src1, gpSinkPad) != GST_PAD_LINK_OK)
 {  g_print ("linking output 1 converter failed\n"); }
 gst_object_unref (gpSinkPad);

  if (!gst_element_link (geConvert1, geVideoOut1)) {
    g_print ("linking output 1 failed\n");
 }

  // link output 2
gpSinkPad= gst_element_get_static_pad (geConvert2, "sink");
  gpOsel_Src2 = gst_element_get_request_pad (geOutputSelector, "src_%u");
  if (gst_pad_link (gpOsel_Src2, gpSinkPad) != GST_PAD_LINK_OK)
  {
        g_print ("linking output 2 converter failed\n");
   }
 if (!gst_element_link (geConvert2, geVideoOut2))
  {
         g_print ("linking output 1 failed\n");
  }
  gst_object_unref (gpSinkPad);

  g_object_set (G_OBJECT (geOutputSelector), "active-pad",gpOsel_Src1, NULL);

....

gst_element_set_state(GST_ELEMENT(gePipline), GST_STATE_PLAYING);

Pipline cannot start, 'gst_element_set_state' returns '0' (GST_STATE_CHANGE_FAILURE). When I changed "videoconvert" plugins for "queue", Pipline started and was working few seconds (I saw it by "identity"), but after that all stopped again with "GST_STATE_CHANGE_FAILURE". But all combination worked if I deleted second sink from "gst_bin_add_many":
 
gst_bin_add_many(GST_BIN(gePipline), geVideoSrc, geVideoRate,geVideoScale,geIdentity,  geConvert0, geOutputSelector, geConvert1,geVideoOut1, NULL);

So, maybe, anybody have some thought about all this?