Results 1 to 7 of 7

Thread: Kill rtsp publish

  1. #1

    Default Kill rtsp publish

    Hi i need to kill a rtsp publish...

    This code works with rtmp publishing but not with rtsp...why?


    private void killClient(IMediaStream stream, String message) {
    			getLogger().info(
    					"InitEvents.killClient -- Message -- " + message
    							+ " -- streamname -- " + stream.getName());
    
    			sendStreamOnStatusError(stream, "NetStream.Publish.Rejected",
    					message);
    			stream.getClient().setShutdownClient(true);
    			
    		}

  2. #2

    Default

    I'm using now this code:
    private void killClient(IMediaStream stream, String message) {
    			getLogger().info(
    					"InitEvents.killClient -- Message -- " + message
    							+ " -- streamname -- " + stream.getName());
     
    			IClient client = stream.getClient();
    			if (client != null) {
    				sendStreamOnStatusError(stream, "NetStream.Publish.Rejected",
    						message);
    				client.setShutdownClient(true);
    			}
         
    			RTPStream rtpStream = stream.getRTPStream();
    			if (rtpStream != null) {
    				rtpStream.getRTPContext().shutdownRTPSession(
    						rtpStream.getSession());
    				rtpStream.getRTPContext().shutdown();
    			}
    
    		}
    this is possible to send a event error to a application..this is to integrate with the new Wowza GoCoder iOS

  3. #3

    Default

    Mary, have a look at this code snip-it, take note the session.rejectSession()
    How to control access to an RTSP/RTP stream
    Last edited by salvadore; 05-02-2013 at 12:31 PM.

  4. #4

    Default

    Thank's the rejectSession works...
    Last edited by MARY2006; 05-03-2013 at 04:15 AM.

  5. #5

    Default

    Hi what is the event to onUnPublish a rtsp stream?

    I'm using this example to monitor the rtsp publish.

    http://www.wowza.com/forums/content.php?141


    Thank's

  6. #6

    Default

    Hi,

    onUnPublish in the IMediaStreamActionNotify* interfaces should be called when the stream is unpublished.

    onTeardown will also be called in the IRTSPActionNotify interface. This will be called for all rtsp connections (play & publish).

    Roger.

  7. #7

    Default

    For rtsp publish, the events in order are:

    Announce, Setup (for each track), Record, Options or GetParameter (for keepalive sometimes) & Teardown.

    Roger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •