#include "ltmm.h"
C Syntax |
HRESULT IltmmRTSPServer_put_LiveLatency(pThis, index, newValue) |
C++ Syntax |
HRESULT put_LiveLatency(index, newValue) |
IltmmRTSPServer *pThis; |
pointer to the interface |
long index; |
source index |
double newValue; |
the LiveLatency value (in seconds) |
Sets the LiveLatency settings for a source folder or the whole server.
Parameter |
Description |
pThis |
Pointer to the IltmmRTSPServer interface. |
index |
0-based index of the source folder whose live latency should be set. Use -1 to set the default RTSP Server LiveLatency setting. |
newValue |
The live latency value in seconds. |
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 treats growing DVR buffers as a live stream. When an RTSP client connects and requests playing a growing DVR buffer, the RTSP server starts playing from the current position in this live stream. For performance purposes, it starts a little bit behind the live stream. The amount by which it is behind the is called "live stream latency" and its amount is set using this function. The live stream latency is a double value and is measured in seconds.
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 LiveLatency settings for the source with the index equal to index.
If index is set to -1, this function sets the default LiveLatency setting for the RTSP server. All the current folders are set to this LiveLatency setting. Also, all future folders added with IltmmRTSPServer::put_SourceFolder will use the default LiveLatency setting.
If you never set the LiveLatency setting for the RTSP server, the default value is 0.5 (for 0.5 seconds behind live).
A DVR buffer is considered to be growing if it is still being written to by the DVR engine when an RTSP client requests it. See the Programming with the LEADTOOLS DVR Module topic for more information on DVR files.
If the source DVR buffer is using a compression compatible to the RTSP server, the streaming will start from the first key frame found before the "Live Stream Position" - "LiveLatency". This is done for performance purposes, because the streaming must start with a key frame.
Required DLLs and Libraries
LTMM For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64
Elements: |
IltmmRTSPServer interface, IltmmRTSPServer::get_LiveLatency, IltmmRTSPServer::put_SourceFolder |
Topics: |
For a C++ example, refer to IltmmRTSPServer Example for C++.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET