ILMDVRSource Interface

Interface Properties:

Type

Name

Description

long

FolderCount

(Read only) Gets the number of buffer folder locations. Use this to determine the number of DVR buffer folder locations on the system.

BSTR

FolderName( long nFolderIndex)

(Read only) Gets the name of the fully qualified folder path for the specified buffer location.  Use this to determine the full pathname of the specified DVR buffer folder location.

Interface Methods:

HRESULT GetAvailabilityInfo(double * pStartOffset, double * pEndOffset, double * pTotalSize)

Parameters

pStartOffset

A pointer to a double type that receives the first offset of available video.

pEndOffset

A pointer to a double type that receives the last offset of available video.

pTotalSize

Total size of all video data available.

Description

Gets the availability information for data for the current playback range.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

HRESULT GetBufferTotalSize(long nFolderIndex, long uFlags, long * pnFiles, double * pnTotalFileSize)

Parameters

nFolderIndex

The index of the desired buffer location.

uFlags

Flag specifying how to calculate the total size.
Values can be:

   DVRGetTotalSize_Actual  = 0x0000

   DVRGetTotalSize_Allowed = 0x0001

 

pnFiles

Total number of files included in the buffer size calculation.

pnTotalFileSize

The total calculated buffer file size.

Description

Sets the number of buffer (.LRC) files and the allowed size per buffer file for the specified buffer location.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

HRESULT CopyBufferToFile(BSTR pszTargetFile, double startOffset, double endOffset)

Parameters

pszTargetFile

Fully qualified pathname of destination file.

startOffset

Starting offset of data to copy.

endOffset

Ending offset of data to copy.

Description

Copies the buffered recording data to the specified fully qualified file pathname.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

HRESULT ReadData(double startOffset, long minSize, long maxSize, DWORD dwUserData, BYTE * pData, long * pSizeRead)

Parameters

startOffset

A double value indicating the starting offset for the read operation.

minSize

A long value specifying the minimum size to read.

maxSize

A long value specifying the maximum size to read.

dwUserData

Reserved.

pData

A pointer to a block of memory that will receive the read data.

pSizeRead

A pointer to a long type that will receive the size of the read data.

Description

Reads DVR data from the specified offset.

Return

S_OK if successful, otherwise a return code indicating the reason for failure:

HRESULT ResetToDefaultsEx(LMDVRSink_APILEVEL ApiLevel)

Parameters

ApiLevel

The desired API Level for reset.

Value can be:
     LMDVRSink_APILEVEL_1

 

Description

Resets the DVRSink interface object to the default settings for the API level specified.

Return

S_OK if successful; otherwise, S_FALSE.

HRESULT GetBufferInfo(long nBufferIndex, BSTR * pszFileName, double * pnUsefulSize, double * pnFileSize, long * pnPlayIndex, long * pnFlags, BSTR * pszStubFilePathName)

Parameters

nBufferIndex

The index of the buffer file for which to get information.

pszFileName

A pointer to a string type that will receive the filename of the related buffer recording file.

pnUsefulSize

A pointer to a double type that will receive the used file size of this recording chunk file.

pnFileSize

A pointer to a double type that will receive the physical file size of this recording chunk file.

pnPlayIndex

A pointer to a long type that will receive the index in the play order (the first index might not be 0, but all files should have sequential and incrementing indexes after the first index value)

pnFlags

A pointer to a long type that will receive a DVRBufferFlagConstant setting.

Value can be:

   DVRBuffer_Empty  = 0x0001,

   DVRBuffer_Writing = 0x0002,

   DVRBuffer_Finished = 0x0004

 

pszStubFilePathName

A pointer to a string type that will receive the fully qualified path name to the .LBL file.

Description

Gets the buffer information associated with the buffer file index specified.

Return

S_OK if successful; otherwise, a return code indicating the reason for failure:

 

HRESULT GetFragmentAlignment([in]double startOffset, [in]double endOffset, [out]double *pAlignedStartOffset, [out]double *pAlignedEndOffset)

Parameters

startOffset Specifies the byte offset at which to begin scanning for transport fragments.
endOffset Specifies the byte offset at which to stop scanning for transport fragments.
pAlignedStartOffset A pointer to a double variable, storing the offset of the start of the first transport fragment found.
pAlignedEndOffset A pointer to a double variable, storing the offset of the end of the last transport fragment.

Description

Takes the user-supplied byte range and scans for transport fragment boundaries.

Use this function along with CopyBufferToFile to save a completely intact MPEG transport fragment. This is demonstrated in the example.

Set up the MPEG multiplexer used for recording to DVR by calling put_OutputType(Mpg2MxT_OutputType_HLS). Doing so guarantees that fragment boundaries start with synchronization frames. Specify the boundary time interval by calling put_ResyncInterval(intervalTime).

Return

S_OK if no error.

S_FALSE if no transport fragment is found: pAlignedStartOffset and pAlignedEndOffset are set equal to startOffset, and indicate an empty search.

HRESULT GetTimedFragmentAlignment([in]double startOffset, [in]double endOffset, [in]double timeThreshold, [out]double *pAlignedStartOffset, [out]double *pAlignedEndOffset, [out]double *pAlignedDuration)

Parameters

startOffset Specifies the byte offset at which to begin scanning for transport fragments.
endOffset Specifies the byte offset at which to stop scanning for transport fragments.
timeThreshold Specifies the minimum time (in seconds) of the fragments to find.
pAlignedStartOffset A pointer to a double variable, storing the offset of the start of the first transport fragment found.
pAlignedEndOffset A pointer to a double variable, storing the offset of the end of the last transport fragment.
pAlignedDuration A pointer to a double variable, storing the time (in seconds) of the transport fragments found.

Description

Takes the user-supplied byte range and scans for transport fragment boundaries. It will only return the minimum number of fragments that meet or exceed the timeThreshold.

Use this function along with CopyBufferToFile to save a completely intact MPEG transport fragment.

Set up the MPEG multiplexer used for recording to DVR by calling put_OutputType(Mpg2MxT_OutputType_HLS). Doing so guarantees that fragment boundaries start with synchronization frames. Specify the boundary time interval by calling put_ResyncInterval(intervalTime).

Return

S_OK if no error.

S_FALSE if no transport fragment is found: pAlignedStartOffset and pAlignedEndOffset are set equal to startOffset, and indicate an empty search.

Enums

typedef enum 
{ 
   LMDVRSource_APILEVEL_1 = 0, 
} LMDVRSource_APILEVEL; 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Filters C API Help