ILMDVRSource::GetFragmentAlignment

Include

#include "ILMDVRSource.h"

Syntax

Language Syntax
C Syntax HRESULT ILMDVRSource_GetFragmentAlignment(pILMDVRSource, startOffset, endOffset, pAlignedStartOffset, pAlignedEndOffset)
C++ Syntax HRESULT GetFragmentAlignment(startOffset, endOffset, pAlignedStartOffset, pAlignedEndOffset)

Summary

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

Data Type Description
ILMDVRSource *pILMDVRSource; pointer to an interface
double startOffset; starting byte offset
double endOffset; ending byte offset
double *pAlignedStartOffset; pointer storing offset of first transport fragment
double *pAlignedEndOffset; pointer storing offset of last transport fragment

Remarks

Takes the user-supplied byte range and scans for transport fragment boundaries. Use this function along with ILMDVRSource::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).

Parameters

Parameter Description
pILMDVRSource; Pointer to an ILMDVRSource interface
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.

Returns

Value Meaning
S_OK No error.
S_FALSE No transport fragment found: pAlignedStartOffset and pAlignedEndOffset are equal to startOffset, and indicate an empty search.

Required DLLs and Libraries

LMDVRSource
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64

Example

For a C++ example, refer to ILMDVRSource::GetFragmentAlignment Example For C++

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

LEADTOOLS Multimedia C API Help