상속: RtspRequest
예제 #1
0
 public void Pause()
 {
     Rtsp.Messages.RtspRequest pause_message = new Rtsp.Messages.RtspRequestPause();
     pause_message.RtspUri = new Uri(url);
     pause_message.Session = session;
     if (rtsp_client != null)
     {
         rtsp_client.SendMessage(pause_message);
     }
 }
예제 #2
0
 public void Pause()
 {
     if (rtsp_client != null)
     {
         // Send PAUSE
         Rtsp.Messages.RtspRequest pause_message = new Rtsp.Messages.RtspRequestPause();
         pause_message.RtspUri = new Uri(url);
         pause_message.Session = session;
         if (auth_type != null)
         {
             AddAuthorization(pause_message, username, password, auth_type, realm, nonce, url);
         }
         rtsp_client.SendMessage(pause_message);
     }
 }
예제 #3
0
        /// <summary>
        /// Gets the Rtsp request.
        /// </summary>
        /// <param name="aRequestParts">A request parts.</param>
        /// <returns>the parsed request</returns>
        internal static RtspMessage GetRtspRequest(string[] aRequestParts, ILogger logger)
        {
            // <pex>
            Debug.Assert(aRequestParts != (string[])null, "aRequestParts");
            Debug.Assert(aRequestParts.Length != 0, "aRequestParts.Length == 0");
            // </pex>
            // we already know this is a Request
            RtspRequest returnValue;

            switch (ParseRequest(aRequestParts[0]))
            {
            case RequestType.OPTIONS:
                returnValue = new RtspRequestOptions(logger);
                break;

            case RequestType.DESCRIBE:
                returnValue = new RtspRequestDescribe(logger);
                break;

            case RequestType.SETUP:
                returnValue = new RtspRequestSetup(logger);
                break;

            case RequestType.PLAY:
                returnValue = new RtspRequestPlay(logger);
                break;

            case RequestType.PAUSE:
                returnValue = new RtspRequestPause(logger);
                break;

            case RequestType.TEARDOWN:
                returnValue = new RtspRequestTeardown(logger);
                break;

            case RequestType.GET_PARAMETER:
                returnValue = new RtspRequestGetParameter(logger);
                break;

            case RequestType.ANNOUNCE:
                returnValue = new RtspRequestAnnounce(logger);
                break;

            case RequestType.RECORD:
                returnValue = new RtspRequestRecord(logger);
                break;

            /*
             * case RequestType.REDIRECT:
             * break;
             *
             * case RequestType.SET_PARAMETER:
             * break;
             */
            case RequestType.UNKNOWN:
            default:
                returnValue = new RtspRequest(logger);
                break;
            }



            return(returnValue);
        }
예제 #4
0
        /// <summary>
        /// Gets the Rtsp request.
        /// </summary>
        /// <param name="aRequestParts">A request parts.</param>
        /// <returns>the parsed request</returns>
        internal static RtspMessage GetRtspRequest(string[] aRequestParts)
        {
            // <pex>
            Debug.Assert(aRequestParts != (string[])null, "aRequestParts");
            Debug.Assert(aRequestParts.Length != 0, "aRequestParts.Length == 0");
            // </pex>
            // we already know this is a Request
            RtspRequest returnValue;
            switch (ParseRequest(aRequestParts[0]))
            {
                case RequestType.OPTIONS:
                    returnValue = new RtspRequestOptions();
                    break;
                case RequestType.DESCRIBE:
                    returnValue = new RtspRequestDescribe();
                    break;
                case RequestType.SETUP:
                    returnValue = new RtspRequestSetup();
                    break;
                case RequestType.PLAY:
                    returnValue = new RtspRequestPlay();
                    break;
                case RequestType.PAUSE:
                    returnValue = new RtspRequestPause();
                    break;
                case RequestType.TEARDOWN:
                    returnValue = new RtspRequestTeardown();
                    break;
                case RequestType.GET_PARAMETER:
                    returnValue = new RtspRequestGetParameter();
                    break;

                    /*
                case RequestType.ANNOUNCE:
                    break;

                case RequestType.RECORD:
                    break;
                case RequestType.REDIRECT:
                    break;

                case RequestType.SET_PARAMETER:
                    break;
                     */
                case RequestType.UNKNOWN:
                default:
                    returnValue = new RtspRequest();
                    break;
            }

            return returnValue;
        }