Linking Ghost Pad to Tee Pad

Howling wong watertreader at hotmail.com
Sun Dec 26 09:30:17 UTC 2021


Hi

I am trying to link a Tee (object tee,  in main pipeline)  to a Queue (object queue,     which is inside a bin, found inside the main pipeline)

I did this by creating a ghost pad for the queue inside the bin

          /// for queue within bin
          /// get the queue sink pad
         queue_pad = gst_element_get_static_pad (queue, "sink");
         ///  create the ghost proxy pad
        ghost_pad =  gst_ghost_pad_new ("sink_proxy", queue_pad);
        gst_pad_set_active(ghost_pad, TRUE);

        /// for tee
         tee_src_pad_template = gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS (tee),
                                                                                                                            "src_%u");
        tee_pad          = gst_element_request_pad (tee,
                                                                                     tee_src_pad_template,
                                                                                     NULL,
                                                                                     NULL);

           /// link the pad together
          GstPadLinkReturn value = gst_pad_link (tee_pad, ghost_pad);
           g_print ("thread Live: Pad return is %d .\n", value);

The GstPadLinkReturn value return -4 , suggesting no common format. What does this mean? both the caps type is not same?

I am trying to connect video/mpegts(from tee) to the queue (in the bin of mainline pipe) to be saved as ts file storage , something like below

                                                       <-------------------------    bin ------------------------------------------->
                          tee    ----------->     queue              --------------->  parser      -------------->   filesink

                           tee_pad  ----->   ghost_pad
                                                              |
                                                         queue_pad

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211226/874984c7/attachment.htm>


More information about the gstreamer-devel mailing list