Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Multimedia API Help

ILMDVRSink::SetOffsetToReach

Show in webframe

#include "ILMDVRSink.h"

C Syntax

HRESULT ILMDVRSink_SetOffsetToReach(pILMDVRSink, nRegistrationID, Offset)

C++ Syntax

HRESULT SetOffsetToReach(nRegistrationID, Offset)

 

ILMDVRSink *pILMDVRSink ;

/* pointer to an interface */

long nRegistrationID;

/* events registration id */

double Offset;

/* the offset to reach */

Indicate the DVR sink object to set the offset reached event when it writes data past a certain offset.

Parameter

Description

pILMDVRSink

Pointer to an ILMDVRSink interface.

nRegistrationID

The unique identifier used to create the offset reached event.

Offset

The target offset.

Returns

S_OK

The function was successful.

E_INVALIDARG

The registration ID or the offset are invalid.

<> S_OK

An error occurred. Refer to the Error Codes or the HRESULT error codes in the DirectShow documentation.

Comments

Use this method to instruct the DVR sink object to set the offset reached event once it has written data past a certain offset. This method is used internally by the DVR source object.

For example, if an application wants to read N bytes from offset X, then it will do the following:

  1. Reset the offset reached event

  2. Call SetOffsetToReach(X + N)

  3. Use a windows waiting function and wait for the offset reached event to be set. (This of course, assumes the event was created through an earlier call to ILMDVRSink::CreateEvents2.

The offset must be > 0 and it indicates the offset of the first byte that is not needed. So, the byte at offset 'Offset -1' will be present in the DVR buffer, but the byte at offset 'Offset' might not be written yet.

Required DLLs and Libraries

LMDVRSink

 

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

See Also

Elements:

ILMDVRSink::CreateEvents2, ILMDVRSink::FreeEvents,

Topics:

Multimedia Function Group, DVR Function Groups, Introduction to the LEADTOOLS MPEG-2 Transport Module, DVR Component FAQs, LEAD DVR Sink Filter, Accessing the DVR Sink Object,How to Use the DVR Sink Object to Control Capture Buffer Settings (C++), How to Set Capture Buffers on More Than One Physical Disk, How to Copy Buffered DVR Data to a New File

Example

For a C example, refer to ILMDVRSink::SetOffsetToReach Example for C

For a C++ example, refer to ILMDVRSink::SetOffsetToReach Example for C++

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.