Sets the default compression settings used for recompressing files whose compression is not compatible with the RTSP Server.
#include "ltmm.h"
Language | Syntax |
---|---|
C | HRESULT IltmmRTSPServer_LoadSettingsFromStream(This, index, SourceStream, Flags) |
C++ | HRESULT LoadSettingsFromStream(index, SourceStream, Flags) |
Pointer to the IltmmRTSPServer Interface.
0-based index of the source folder whose default compression settings should be set.Use -1 to set the default compression settings for the RTSP server.
The source stream containing the compression settings.
Flags indicating which compression settings were saved in the file. For a list of possible values, refer to ltmmConvert_Settings constants.
Value | Meaning |
---|---|
S_OK | The function was successful. |
<> S_OK | An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation. |
The RTSP server will automatically recompress the audio or video stream in a file whose compression is not compatible with the RTSP server. See the LEAD RTSP Sink topic for the list of compressions supported by the RTSP server.
The SourceStream and Flags parameters are similar to the ones with same name in IltmmConvert::LoadSettingsFromStream. Only the compression settings for the video and audio compressor are loaded from the file. So, when necessary, the RTSP Server will call IltmmConvert::LoadSettingsFromStream(SourceStream, Flags & (ltmmConvert_Settings_AudioCompressors | ltmmConvert_Settings_VideoCompressors)) on the convert object doing the recompression.
While the server can recompress files on the fly, it is more efficient to make sure all the files have compatible compression settings to begin with to reduce the server load.
If index is between 0 and SourceCount - 1 (where SourceCount is the number of folders in the list, as indicated by IltmmRTSPServer::get_SourceCount), this function sets the compression settings for the source with the index equal to index.
If index is set to -1, this function sets the default compression settings for the RTSP server. All the current folders are set to these compression settings. Also, all future folders added with IltmmRTSPServer::put_SourceFolder will use the default compression settings.
If you never set the security settings for the RTSP server, the default compression settings are the ones saved in the registry for each default compressor.
These are the default compressors used at the moment:
For incompatible Video streams: LEAD H264 Encoder (4.0)
For incompatible Audio streams: LEAD AAC Encoder
You can also load the settings from a file using IltmmRTSPServer::LoadSettingsFromFile. Note that this function cancels the compression settings set previously for the same index using IltmmRTSPServer::LoadSettingsFromFile.
Win32, x64.
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