In This Topic ▼

LEAD RTSP Sink

The LEAD RTSP Sink is a DirectShow filter implementing an RTSP server. The data is streamed on a UDP port in RTP packets conforming to RFC 1889 and RFC 1890 in separate video and audio streams. You can use the LEAD RTSP Source filter for playing files from the RTSP Server.

The RTSP streaming technology is somewhat similar with the HTTP server technology, because it waits for connections and then it can stream various files present on the server. Multiple files can be streamed at the same time, independently of each other. Additionally, the clients can view different portions of the media (when the media is a file) or the live stream (if the source is a stream).

You can also implement RTSP server functionality using the Media Streaming SDK.

The simplest way to implement a live stream is to use the DVR engine and create a file with the LEAD DVR Sink filter.

Currently, the following formats are supported:

The LEAD RTSP Sink requires a specific form of H264 (AVC format stored in ISO files). So if the input file uses different H264 compression, you may need to use the LEAD H264 Transcoder.

The LEAD RTSP Sink requires a specific form of H265 (HEVC format stored in ISO files). So if the input file uses different H265 compression, you may need to use the LEAD H265 Transcoder.

The LEAD RTSP Sink requires a specific form of AAC compression (mp4a format stored in ISO files). So if the input file uses different AAC compression, you might need to use the LEAD AAC Transcoder.

Note that the LEADTOOLS Multimedia toolkit will automatically use these transcoder filters whenever necessary, so all you need to do is redistribute them with your application.

The filter implements multiple objects to achieve this:

  1. The Server is listening for connections. Use the IFileSinkFilter::SetFileName method of the standard IFileSinkFilter interface to specify which address and port should be used for listening. Also, use the ILMRTSPServer interface to manage the server.

  2. The Media object is streaming similar files. For example, you can implement a Media object for streaming all of the files from a specific folder. Use the ILMRTSPServerMedia interface to manage the Media object. Add Media objects to the Server using the ILMRTSPServer::AddMedia method.

  3. The Session object manages one connection. Create the Session objects by implementing the ILMRTSPServerSession interface and associating them with the Session list in the Media object. Each Session object has a Convert or Capture object that has the RTSP Sink filter as the sink. Listen to the RTSP commands to Set up, Play and Pause a specific session and issue the appropriate commands to render, play or pause the corresponding DirectShow graph. The ILMRTSPCommandParser and ILMRTSPResponseBuilder interfaces can be used to parse the RTSP command received from the client.

  4. The Security object manages security by implementing the ILMRTSPSecurity interface. The security settings can be the same for all of the Sessions or you can have different security settings for each Session.

All of this is functionality handled automatically by the LEADTOOLS Multimedia toolkit through the IltmmRTSPServer Interface (API) or RTSPServer Class (.NET).

Create the filter using the server CLSID (CLSID_LMRTSPServer) when you are going to use the filter as the main RTSP server.

Create the filter using the filter CLSID (CLSID_LMRTSPSnk) when you are going to use the filter as a sink in a DirectShow graph. See the Creating an RTSP Server using the RTSP Sink topic for more details on the various ways you can use this filter.

Technical details for the filter are provided in the following table:

Component Description
Filter Interfaces ILMRTSPServer
ILMRTSPServerMedia
ILMRTSPServerSession
ILMRTSPCommandParser
ILMRTSPResponseBuilder
ILMRTSPSecurity
IFileSinkFilter
Interface ID IID_ILMRTSPServer
IID_ILMRTSPServerMedia
IID_ILMRTSPServerSession
IID_ILMRTSPCommandParser
IID_ILMRTSPResponseBuilder
IID_IFileSourceFilter
Input Media Types Type:
MEDIATYPE_Video
Subtypes:
MEDIASUBTYPE_avc1
ISOMEDIATYPE_avc1
ISOMEDIATYPE_hvc1
ISOMEDIATYPE_HVC1
MEDIASUBTYPE_HVC1
MEDIASUBTYPE_hvc1
ISOMEDIATYPE_hev1
ISOMEDIATYPE_HEV1
MEDIASUBTYPE_hev1
MEDIASUBTYPE_HEV1
MEDIATYPE_Audio
Subtypes:
MEDIASUBTYPE_mp4a
Output Media Types N/A
Filter CLSID CLSID_LMRTSPSnk
Server CLSID CLSID_LMRTSPServer
Property Page CLSID N/A
Executable LMRTSPSnk.dll, DSKernel2.dll
Filter category CLSID_LegacyAmFilterCategory
Header ILMRTSPSrc.h

Comments

This filter is included as part of the following modules:

Platforms

Win32, x64.

See Also

Help Version 23.0.2024.9.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.