ref_struct_VDXFilterStateInfo - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
VDXFilterStateInfo structure
Reflects the video pipeline state while a video filter is active.
struct VDXFilterStateInfo {
sint32 lCurrentFrame;
sint32 lMicrosecsPerFrame;
sint32 lCurrentSourceFrame;
sint32 lMicrosecsPerSrcFrame;
sint32 lSourceFrameMS;
sint32 lDestFrameMS;
enum {
kStateNone = 0x00000000,
kStatePreview = 0x00000001,
kStateRealTime = 0x00000002,
kStateMax = 0xFFFFFFFF
};
uint32 flags;
sint32 mOutputFrame;
};
lCurrentFrame
The frame number of the current frame being produced by the video
filter, starting at zero.
lMicrosecsPerFrame
Approximate frame rate of the destination video stream, in microseconds
per frame.
lCurrentSourceFrame
The frame number of the current source frame being processed by the
video filter, starting at zero. This is useful for associating data that
must be tracked with the source, such as field order and subtitling
data. The frame number sequence need not be sequential; gaps in the
frame sequence reflect where portions of the source may have been
omitted from processing. It is also possible for source numbers to be
duplicated when the source is resampled to a higher frame rate prior to
the filter.
lMicrosecsPerSrcFrame
Approximate frame rate of the source video stream, in microseconds per
frame.
lSourceFrameMS
Starting time of the source video frame, in milliseconds. Note that this
is not simply the same as combining lCurrentSourceFrame
and
lMicrosecsPerSrcFrame
, as the host can internally use a higher
precision value in computing this field.
lDestFrameMS
Starting time of the destination video frame, in milliseconds. Note that
this is not simply the same as combining lCurrentFrame
and
lMicrosecsPerFrame
, as the host can internally use a higher precision
value in computing this field.
flags
(V10+ only) A bitfield with the following flags:
kStatePreview
Set when the filter chain is being run for preview purposes only, such
as when scrubbing through the timeline or previewing the output; cleared
when the processed video is saved or an analysis pass is running. If
your filter records data about the video or otherwise expects a full
pass through it, you should suppress that action when this flag is set.
kStateRealTime
Set when the filter chain is being run in a situation with real-time
constraints, such as preview or capture mode. A filter might switch to a
different algorithm when this flag is present.
mOutputFrame
(V13+ only)
Frame number of the output, in the transformed sequence produced by the
filter. The prefetchProc method maps
each output frame to a source frame. When prefetchProc
is omitted,
therefore, lCurrentSourceFrame
and mOutputFrame
will be the same.
The main differences between lDestFrameMS
and mOutputFrame
have to
do with editing and frame rate changing filters. lDestFrame
counts up
sequentially for each frame and is the same for all filters in the
pipeline, regardless of whether there are frame rate doublers or editing
involved. mOutputFrame
, on the other hand, indicates frame numbers for
frames just after they are produced by the filter, before they are
reordered by editing or downstream prefetchProc
routines.
Copyright (C) 2007-2012 Avery Lee.