C Source
IltmmRTSPServer* pServer;
CoCreateInstance(&CLSID_ltmmRTSPServer, NULL, CLSCTX_INPROC_SERVER, &IID_IltmmRTSPServer, (void**)&pServer);
C++ Source
IltmmRTSPServer* pServer;
CoCreateInstance(CLSID_ltmmRTSPServer, NULL, CLSCTX_INPROC_SERVER, IID_IltmmRTSPServer, (void**)&pServer);
2.Specify the source folder that will contain the media files that will be streamed:
C Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"c:\\RTSPSourceFolder");
// assign the source file path to the convert object
IltmmRTSPServer_put_SourceFolder(pServer, 0, bstr);
// free the string
SysFreeString(bstr);
C++ Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"c:\\RTSPSourceFolder");
// assign the source file path to the convert object
pServer->put_SourceFolder(0, bstr);
// free the string
SysFreeString(bstr);
The above code tells the server to look in the c:\RTSPSourceFolder folder whenever an RTSP client asks for a file to be streamed. We are adding only one source folder, but you can add a second or third folder by changing the index from 0 to 1 and 2.
C Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"127.0.0.1");
// assign the source file path to the convert object
IltmmRTSPServer_put_TargetAddress(pServer, bstr);
// free the string
SysFreeString(bstr);
C++ Source
BSTR bstr;
// create a string containing the source file path
bstr = SysAllocString(L"127.0.0.1");
// assign the source file path to the convert object
pServer->put_TargetAddress(bstr);
// free the string
SysFreeString(bstr);
You can also specify now specify the live latency, security settings and default settings for the encoders (which would be used for automatically recompressing the files whose compression does not match the compressions supported by the RTSP server). For best performance, it is recommended that you make sure the files stored in the source folders are already compressed using compression settings compatible with the RTSP Server.
C Source
IltmmRTSPServer_StartServer(pServer, ltmmRTSP_DefaultPort);
C++ Source
pServer->StartServer(ltmmRTSP_DefaultPort);
rtsp://127.0.0.1/file.ext, where c:\RTSPSourceFolder\file.ext is a valid media file.
When you are done, stop the server and release the pServer interface
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document