[gst-devel] GstRtpBin Elemenst Signal "on-timeout"

Aniruddha aniruddhachourasia at tataelxsi.co.in
Mon Dec 15 05:42:28 CET 2008


Hi Eric,
          Thanks for the reply. The rtspsrc element you mentioned is probably a RTSP Client. But i am implementing a RTSP Server. The pipeline i am using is a general pipeline we use for implementing gstrtpbin as a RTP sender. The pipeline is as below :-

gst-launch-0.10 gstrtpbin name=rtpbin filesrc location=<filename> ! mpeg4videoparse ! rtpmp4vpay ! rtpbin.send_rtp_sink_2 rtpbin.send_rtp_src_2 ! udpsink port=5000 host=<IP> name=vrtpsink rtpbin.send_rtcp_src_2 ! udpsink port=5001 host=<IP> sync=false async=false name=vrtcpsink udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_2

Please suggest on how to implement the "time out" when the client crashes.

Regards
Aniruddha
  ----- Original Message ----- 
  From: Eric Zhang 
  To: Aniruddha ; Discussion of the development of GStreamer 
  Sent: Monday, December 15, 2008 9:11 AM
  Subject: Re: [gst-devel] GstRtpBin Elemenst Signal "on-timeout"


  Hi, gstreamer-devel:

      1. If the client crash/power failure/network disconnected, there is no way to send TEARDOWN to server so the server will keep sending packets to the client. I think there is no way to notify server stopping the streaming.

      2. on-bye-timeout, on-timeout will be emitted by GstRtpBin if bye packet is received or there is no any packets received for a while. I noticed you mentioned "TEARDOWN", so I think maybe you're playing a RTSP movie and so rtspsrc maybe is used in your pipeline. Rtspsrc uses GstRtpBin internally and connects these signals then do the EOS logics. So I am surprised you have a GstRtpBin element in your pipeline and wanna connect these signals manually. Paste your pipeline here, maybe it can make things clear.

  Eric Zhang


  2008/12/12 Aniruddha <aniruddhachourasia at tataelxsi.co.in>

    Hi All,
            I am using GstRtpBin element in the gst-plugins-bad-0.10.8 for implementing
    rtsp/rtp streaming over udp. I am able to stream properly. Both SR and RRs are 
    getting transfered. But when the client stops because of any reason(crash, power
    failure, network disconnection, etc) without giving a TEARDOWN signal, the 
    server should also stop streaming. I have attached a signal handler for the signals 
    on-timeout, on-bye-timeout, on-bye-ssrc emitted by the gstrtpbin element. But the 
    signal handlers are not getting called. Following is the sample code for the above 
    implementation:-

    ------------------------------------------------------------------------------------------------------------------------------------
    void on_bye_ssrc (GstElement* object,
                                           guint arg0,
                                           guint arg1,
                                           gpointer user_data)
    {
            printf ("\n\n######### Inside on-bye-ssrc() callback function#########\n\n");
    }


    void on_bye_timeout (GstElement* object,
                                           guint arg0,
                                           guint arg1,
                                           gpointer user_data)
    {
            printf ("\n\n#########Inside on-bye-timeout() callback function#########\n\n");
    }



    void on_timeout (GstElement* object,
                                           guint arg0,
                                           guint arg1,
                                           gpointer user_data)
    {
            printf ("\n\n#########Inside on-timeout() callback function#########\n\n");
    }

    int main (){
    ---
    ---
    g_signal_connect (pstGstRtpBin, "on-bye-ssrc", G_CALLBACK (on_bye_ssrc), NULL);
    g_signal_connect (pstGstRtpBin, "on-timeout", G_CALLBACK (on_timeout), NULL);
    g_signal_connect (pstGstRtpBin, "on-bye-timeout", G_CALLBACK (on_bye_timeout), NULL);
    ---
    ---
    }
    ------------------------------------------------------------------------------------------------------------------------------------

    Please suggest how to attach the signal handlers.


    Regards
    Aniruddha



    The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


    ------------------------------------------------------------------------------
    SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
    The future of the web can't happen without you.  Join us at MIX09 to help
    pave the way to the Next Web now. Learn more and register at
    http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
    _______________________________________________
    gstreamer-devel mailing list
    gstreamer-devel at lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081215/c31a2510/attachment.htm>


More information about the gstreamer-devel mailing list