Indicate the DVR sink object to set the offset reached event when it writes data past a certain offset.
#include "ILMDVRSink.h"
Language | Syntax |
---|---|
C | HRESULT ILMDVRSink_SetOffsetToReach(pILMDVRSink, nRegistrationID, Offset) |
C++ | HRESULT SetOffsetToReach(nRegistrationID, Offset) |
Pointer to an ILMDVRSink interface.
The unique identifier used to create the offset reached event.
The target offset.
Value | Meaning |
---|---|
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. |
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:
Reset the offset reached event
Call SetOffsetToReach(X + N)
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.
Win32, x64.
Language | Example |
---|---|
C | ILMDVRSink::SetOffsetToReach |
C++ | ILMDVRSink::SetOffsetToReach |
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