LEADTOOLS Multimedia (Leadtools.Multimedia assembly)

RTSPSecurity Class

Show in webframe
Example 



Members 
This RTSPSecurity class is used for implementing security in the RTSP server.
Object Model
Syntax
'Declaration
 
Public Class RTSPSecurity 
   Implements System.IDisposable 
'Usage
 
Dim instance As RTSPSecurity
public class RTSPSecurity : System.IDisposable  
public ref class RTSPSecurity : public System.IDisposable  
Remarks

RTSP Servers use security that is similar to that used in HTML servers and is based on authentication. The authentication methods rely on the server specifying a username and a password pair with the right to access a certain Media file.

There are two authentication methods:

From a performance standpoint, the two authentication methods have roughly the same speed. So the method you choose depends on how secure you want your server to be and in what kind of authentication is supported in your client.

The LEAD RTSP Server supports both authentication methods.

Authentication is optional, you do not need to use it unless your application requires it.

If you don't do anything, the server will not restrict access.

To implement security, you create a RTSPSecurity object and set it to the RTSPServer object using RTSPServer.SetSecurity The RTSPServer object keeps a reference to the actual RTSPSecurity object, so if you add/remove users to the the RTSPSecurity object after you set it to the RTSPServer object, these changes will be reflected in the security settings for that RTSPServer instance.

To implement different security settings for each file, you create a different RTSPSecurity object for each session.

To use the same security settings for all the files, you can create one RTSPSecurity object and use it for every session you create.

In general, you need to do the following:

  1. Create a RTSPSecurity object.
  2. Specify the desired authentication method by setting the AuthenticationRequired property.
  3. Specify the name of your realm by setting the RealmName property.
  4. Add the authorized users with the AddUser method.
  5. Set the RTSPSecurity object to the session using RTSPServer.SetSecurity.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Multimedia
Imports LeadtoolsMultimediaExamples.Fixtures

Public Sub SetSecurity()
   Dim security As RTSPSecurity = New RTSPSecurity()
   security.RealmName = "MyRTSPServer"
   security.AuthenticationRequired = RTSPAuthenticationType.Basic
   security.AddUser("TestUser", "TestPassword")
   _server.SetSecurity(-1, security)
End Sub
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;

public void SetSecurity()
{
   RTSPSecurity security = new RTSPSecurity();
   security.RealmName = "MyRTSPServer";
   security.AuthenticationRequired = RTSPAuthenticationType.Basic;
   security.AddUser("TestUser", "TestPassword");
   _server.SetSecurity(-1, security);
}
Requirements

Target Platforms

See Also

Reference

RTSPSecurity Members
Leadtools.Multimedia Namespace

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Multimedia requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features