partially sharing a pipeline for multiple rtsp mount points

Maurizio Galimberti mgalimberti at marchnetworks.com
Fri Feb 22 11:56:24 UTC 2019



Hi Guys



I have a pipeline situation very similar to the one of Stefan, in details I have below pipeline


  gst_rtsp_media_factory_set_launch (factory, "( "
      "videotestsrc ! queue ! video/x-raw,width=352,height=288,framerate=15/1 !  x264enc ! queue !rtph264pay name=pay0 pt=96 "
      "audiotestsrc ! queue ! audio/x-raw,rate=8000 !   alawenc ! queue ! rtppcmapay name=pay1 pt=97 ) "

      "videotestsrc ! queue ! video/x-raw,width=800,height=600,framerate=15/1 !  x264enc ! queue !rtph264pay name=pay2 pt=98 "
      "audiotestsrc ! queue ! audio/x-raw,rate=8000 !   alawenc ! queue ! rtppcmapay name=pay3 pt=99 )"  );



And I want to associate below payloader with below mountPoint

pay0 and pay1 to /mount0

pay2 and pay3 to /mount1



It is not clear for me Mathieu suggestion and how I can setup previous pipeline with proxysink/proxysrc



So I tried to setup internally to rtspServer a direct mapping between mountPoint and payloder so Stefan said ...

            "pay0 -> /mount0"

            "pay1 -> /mount1"



And I added 1 payloder for each mountPoint because I need it



pay0 + pay1 to /mount0

pay2 + pay3 to /mount1



In this way I succeded in accessing from 1 external client a specific mountPoint like /mount0 associated to pay0+pay1 , but only 1 mountPoint for each time,

.. that's to say when I access with a second external client the second mountPoint /mount1 associated to pay2+pay3, ... the second video DO NOT stream !!!!



And it is strange, ... in details it seems that the sender part of pipeline referring to second mountPoint  /mount1  is not PLAYING



More specifically pn file "../gst/rtsp-server/rtsp-stream.c"  in method  "create_sender_part()" it reported below schema ....



    /* For the sender we create this bit of pipeline for both

     * RTP and RTCP.

     * Initially there will be only one active transport for

     * the stream, so the pipeline will look like this:

     *

     * .--------.      .-----.    .---------.

     * | rtpbin |      | tee |    |  sink   |

     * |       send->sink   src->sink       |

     * '--------'      '-----'    '---------'

     *

     * For each new transport, the already existing branch will

     * be reconfigured by adding a queue element:

     *

     * .--------.      .-----.    .---------.    .---------.

     * | rtpbin |      | tee |    |  queue  |    | udpsink |

     * |       send->sink   src->sink      src->sink       |

     * '--------'      |     |    '---------'    '---------'

     *                 |     |    .---------.    .---------.

     *                 |     |    |  queue  |    | udpsink |

     *                 |    src->sink      src->sink       |

     *                 |     |    '---------'    '---------'

     *                 |     |    .---------.    .---------.

     *                 |     |    |  queue  |    | appsink |

     *                 |    src->sink      src->sink       |

     *                 '-----'    '---------'    '---------'

     */





It seems that  rtsp-stream in rtsp-server automatically setup previous internal pipelines objects for sender part, .... Is it correct ?

but the sender part of pipeline referring to second mountPoint  /mount1  do not pass in PLAYING state !!!



How can I check it is in PLAYING state ?? ... And if it is not how can set it in PLAYING state, ....



Thankyou very much

For your support

Maurizio









-----Original Message-----
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Mathieu Duponchelle via gstreamer-devel
Sent: Thursday, February 14, 2019 4:03 PM
To: gstreamer-devel at lists.freedesktop.org
Cc: Mathieu Duponchelle
Subject: Re: partially sharing a pipeline for multiple rtsp mount points



You could perhaps use proxysink / proxysrc? You would instantiate a separate pipeline when needed, terminated with (multiple) proxysink (s), then each factory would instantiate a different pipeline starting with a proxysrc linked to the relevant proxysink, would that work for you?



On 2/14/19 3:14 PM, stfl via gstreamer-devel wrote:

> Hi,

>

> I am trying to write a rtsp server application that provides multiple

> mountpoints and (partially) shares the pipeline.

> There are cameras involved which can only be used once.

> The RTSP server shall offer mount points for different codecs

> simultaneously.

>

> On the first mountpoint I am outputting the regular stream. On the

> other mountpoint I want to tee off somewhere in the existing pipeline

> and terminate provide the end of this pipeline branch as another mountpoint.

>

> Another option would be to have a single pipeline with all branches

> set up and each mountpoint only provides as single stream.

> so with the naming convention on the rtppay: pay0 -> /mount0 pay1 ->

> /mount1

>

> Or another option would be to have a fully shared pipeline with all

> branches and some sort of selection of the streams on the network already.

> Some sort of mountpoint stream-selection like /mount0/stream0 and

> /mount0/stream1 which only transfers data of the selected stream on

> the network. I know I can select the stream later on the receiver side

> but in this case it's important to not transfer the unnecessary data.

>

> Is one of this features available and I just haven't figured it out

> yet or is there any other option to implement this?

> Thank you already for any input and ideas.

> If this is a known limitation of rtsp-server let me know as well so I

> can stop looking :)

>

> Thank you,

> Stefan

>

>

>

> --

> Sent from: http://gstreamer-devel.966125.n4.nabble.com/

> _______________________________________________

> gstreamer-devel mailing list

> gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>

> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________

gstreamer-devel mailing list

gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190222/9342ca84/attachment-0001.html>


More information about the gstreamer-devel mailing list