ref_iface_IVDXVideoSource_GetFrameNumberForSample - shekh/VirtualDub2 GitHub Wiki

VirtualDub Plugin SDK 1.2

IVDXVideoSource interface

IVDXVideoSource:: GetFrameNumberForSample

Converts a frame number to the corresponding sample number.

sint64 GetFrameNumberForSample(sint64 sample_num);

Parameters

sample_num Sample number to convert to a frame number. This is always in the range of 0 to N-1, where N is the number of frames in the video source.

Thread safety

This method is not thread-safe.

Errors

Errors may not be returned from this function (see SetError()).

Return value

The frame number of the frame decoded by that sample. This must be in the range of 0 to N-1, where N is the number of frames in the video source.

Remarks

This mapping must be reversible with GetSampleNumberForFrame() — that is, GetFrameNumberForSample(GetSampleNumberForFrame(frame)) == frame in all cases.

When using the default I/P decoder model, this function must return sample_num directly.


Copyright (C) 2007-2012 Avery Lee.

⚠️ **GitHub.com Fallback** ⚠️