<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><font face="Comic Sans MS">Hey,</font></p>
    <p><font face="Comic Sans MS"><br>
      </font></p>
    <p><font face="Comic Sans MS">One suggestion I have seen for this is
        to use intervideosrc and intervideosink (gst-plugins-bad) in
        your gst_rtsp_media_factory_set_launch command.  Then set the
        rtsp media factory to be shared with gst_rtsp_media_factory_set_shared.</font></p>
    <p><font face="Comic Sans MS"><br>
      </font></p>
    <p><font face="Comic Sans MS">But if you don't need your pipeline to
        run while there are no clients connected you shouldn't need to
        do this.</font></p>
    <p><font face="Comic Sans MS"><br>
      </font></p>
    <p><font face="Comic Sans MS">You are also probably going to run
        into issues with blocking your pipeline, so you might need to
        dynamically connect your pipeline via blocking probes to the
        intervideosink, or use a valve, or use a leaky queue.</font></p>
    <p><font face="Comic Sans MS"><br>
      </font></p>
    <p><font face="Comic Sans MS">Hope that helps!<br>
      </font></p>
    <p><font face="Comic Sans MS"><br>
      </font></p>
    <p><font face="Comic Sans MS">Cheers,</font></p>
    <p><font face="Comic Sans MS">Michael</font><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 6/2/2017 3:24 AM, Liu Xin wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:HK2PR02MB0612992CC27ED973D6F551D7C9F70@HK2PR02MB0612.apcprd02.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;"
        dir="ltr">
        <p>hi folks,</p>
        <p><br>
        </p>
        <p>I have the same question as Oliver had asked.</p>
        <p><br>
        </p>
        <p>In the gst-rtsp-server/examples, all the source code uses
          gst_rtsp_media_factory_set_launch() to let the factory make
          pipelines with gst-launch string. But what if I have a
          pipeline already, and I want to assign the rtsp URI to that
          pipeline?</p>
        <div><br>
        </div>
        Any ideas?
        <div><br>
          Thanks,
          <div>Xin<br>
            <div style="color: rgb(0, 0, 0);">
              <hr tabindex="-1" style="display:inline-block; width:98%">
              <div id="divRplyFwdMsg" dir="ltr"><font
                  style="font-size:11pt" face="Calibri, sans-serif"
                  color="#000000"><b>发件人:</b> gstreamer-devel
                  <a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel-bounces@lists.freedesktop.org"><gstreamer-devel-bounces@lists.freedesktop.org></a>
                  代表 Oliver <a class="moz-txt-link-rfc2396E" href="mailto:ogtifs@gmail.com"><ogtifs@gmail.com></a><br>
                  <b>发送时间:</b> 2017年5月21日 19:39<br>
                  <b>收件人:</b> <a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
                  <b>主题:</b> Synchronizing h264 stream from appsink to
                  appsrc for RTSP</font>
                <div> </div>
              </div>
              <div>
                <div dir="ltr">Hi all,
                  <div><br>
                  </div>
                  <div>I am trying to use gstreamer to simultaneously
                    stream a video source via RTSP and record it (and in
                    the future, more parallel processes).</div>
                  <div><br>
                  </div>
                  <div>My main problem with the gst-rtsp-server examples
                    is that the RTSP component wants to control the
                    whole pipeline, and I don't want it to impact one of
                    the other branches. My approach to this problem (I
                    would be happy to hear a simpler way) is to use a
                    primary, always-running pipeline which branches to
                    an appsink, and allow the RTSP server to create its
                    own pipeline using an appsrc, which I connect to the
                    appsink in the GstRtspMediaFactory's
                    "media-configured" signal handler.</div>
                  <div><br>
                  </div>
                  <div>For the purposes of example, my "main" pipeline
                    can be "videotestsrc ! appsink" (later with tee to
                    filesink), and the rtsp factory bin can be "appsrc !
                    x264enc ! rtph264pay". In this case, it works, that
                    is to say I can connect a media player to the RTSP
                    stream and see the test image, although the memory
                    usage explodes uncontrollably quite quickly.</div>
                  <div><br>
                  </div>
                  <div>If I move the x264enc element to the "main"
                    pipeline, which I want to do so it can be shared
                    between the parallel functions, I never see any
                    picture, and gst-play reports "Could not receive any
                    udp packets". In neither case do I see errors on the
                    server side with GST_DEBUG=*:3, and in both cases I
                    set the appsrc caps to the caps from the last
                    element in the "main" pipeline before the appsink.</div>
                  <div><br>
                  </div>
                  <div>I checked that the RTSP pipeline's clock is
                    slaved to the main pipeline clock (this seemed to
                    happen automatically), but I guess I have some
                    synchronization issues. Perhaps that can explain the
                    memory explosion when passing raw packets too? Since
                    assumedly the appsink is receiving frames much more
                    quickly than the appsrc can send them onwards. In
                    any case I am more interested in first getting the
                    h264 appsink->appsrc link to work.</div>
                  <div><br>
                  </div>
                  <div>I pasted a short code listing at <a
                      href="http://pastebin.com/Lgc7BF1p"
                      id="LPlnk807456" previewremoved="true"
                      moz-do-not-send="true"><font color="red"><b>MailScanner has detected definite fraud in the website at "pastebin.com". Do <i>not</i> trust this website:</b></font> <font color="red"><b>MailScanner
                          has detected definite fraud in the website at
                          "pastebin.com". Do <i>not</i> trust this
                          website:</b></font> pastebin.com/Lgc7BF1p</a>
                    (not sure of the preferred etiquette for this ML)
                    <div
                      id="LPBorder_GT_14963977422080.8317549198709502"
                      style="margin-bottom: 20px; overflow: auto; width:
                      100%; text-indent: 0px;">
                      <table
                        id="LPContainer_14963977422000.9434567373446654"
                        role="presentation" style="width: 90%; position:
                        relative; overflow: auto; padding-top: 20px;
                        padding-bottom: 20px; margin-top: 20px;
                        border-top-width: 1px; border-top-style: dotted;
                        border-top-color: rgb(200, 200, 200);
                        border-bottom-width: 1px; border-bottom-style:
                        dotted; border-bottom-color: rgb(200, 200, 200);
                        background-color: rgb(255, 255, 255);"
                        cellspacing="0">
                        <tbody>
                          <tr style="border-spacing: 0px;" valign="top">
                            <td
                              id="ImageCell_14963977422030.4421684881925001"
                              colspan="1" style="width: 250px; position:
                              relative; display: table-cell;
                              padding-right: 20px;">
                              <div
                                id="LPImageContainer_14963977422030.2241862159095711"
                                style="height: 250px; position:
                                relative; margin: auto; display: table;
                                width: 250px; background-color: rgb(255,
                                255, 255);">
                                <a
                                  id="LPImageAnchor_14963977422050.356159268162638"
                                  href="http://pastebin.com/Lgc7BF1p"
                                  target="_blank" style="display:
                                  table-cell; text-align: center;"
                                  moz-do-not-send="true"><img
                                    id="LPThumbnailImageID_14963977422050.3712945345431329"
                                    style="display: inline-block;
                                    max-width: 250px; max-height: 250px;
                                    height: 250px; width: 250px;
                                    border-width: 0px; vertical-align:
                                    bottom;"
                                    src="https://pastebin.com/i/facebook.png"
                                    moz-do-not-send="true" height="250"
                                    width="250"></a></div>
                            </td>
                            <td
                              id="TextCell_14963977422060.9546935333630526"
                              colspan="2" style="vertical-align: top;
                              position: relative; padding: 0px; display:
                              table-cell;">
                              <div
                                id="LPTitle_14963977422060.8764159803074558"
                                style="top: 0px; color: rgb(0, 120,
                                215); font-weight: normal; font-size:
                                21px; font-family: "Microsoft YaHei
                                UI", "Microsoft YaHei",
                                微软雅黑, SimSun, 宋体, sans-serif;
                                line-height: 21px;">
                                <a
                                  id="LPUrlAnchor_14963977422070.7129620849479017"
                                  href="http://pastebin.com/Lgc7BF1p"
                                  target="_blank"
                                  style="text-decoration: none;"
                                  moz-do-not-send="true"><font color="red"><b>MailScanner has detected definite fraud in the website at "pastebin.com". Do <i>not</i> trust this website:</b></font> <font
                                    color="red"><b>MailScanner has
                                      detected definite fraud in the
                                      website at "pastebin.com". Do <i>not</i>
                                      trust this website:</b></font> [C]
                                  gst-rtsp-server with appsrc -
                                  Pastebin.com</a></div>
                              <div
                                id="LPMetadata_14963977422070.5479740733262368"
                                style="margin: 10px 0px 16px; color:
                                rgb(102, 102, 102); font-weight: normal;
                                font-family: "Microsoft YaHei
                                UI", "Microsoft YaHei",
                                微软雅黑, SimSun, 宋体, sans-serif; font-size:
                                14px; line-height: 14px;">
                                pastebin.com</div>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                    <br>
                    <br>
                  </div>
                  <div><br>
                  </div>
                  <div>Thanks for all advice!</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>