How to expose only supported FPS and not full FPS range in avstream

I’m writing an AVStream MInidriver
I need to expose the FPS I support.
currently I support 30 and 60 FPS.
in graph studio all range between 30 and 60 is exposed.
how can I enable only 30 and 60 and not the full range between them?

my KS_DATARANGE_VIDEO is defined as

const KS_DATARANGE_VIDEO
FormatRGB_480 =
{
// KSDATARANGE
{
sizeof(KS_DATARANGE_VIDEO), // FormatSize
0, // Flags
X_640 * Y_480 * 2, // SampleSize
0, // Reserved
STATICGUIDOF(KSDATAFORMAT_TYPE_VIDEO), // aka. MEDIATYPE_Video
SUBTYPE_RGB,
STATICGUIDOF(KSDATAFORMAT_SPECIFIER_VIDEOINFO) // aka. FORMAT_VideoInfo
},

TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
0, // Reserved (was StreamDescriptionFlags)
0, // Reserved (was MemoryAllocationFlags
// (KS_VIDEO_ALLOC_*))

// KS_VIDEO_STREAM_CONFIG_CAPS
{
STATICGUIDOF(KSDATAFORMAT_SPECIFIER_VIDEOINFO), // GUID
0, // AnalogVideoStandard
X_640, Y_480, // InputSize, (the inherent size of the incoming signal
// with every digitized pixel unique)
X_640, Y_480, // MinCroppingSize, smallest rcSrc cropping rect
allowed
X_640, Y_480, // MaxCroppingSize, largest rcSrc cropping rect allowed
8, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
8, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
X_640, Y_480, // MinOutputSize, smallest bitmap stream can produce
X_640, Y_480, // MaxOutputSize, largest bitmap stream can produce
8, // OutputGranularityX, granularity of output
bitmap size
1, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2
interp…)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
MIN_FRAME_INTERVAL_FOR_30FPS, // MinFrameInterval, 100 nS
units
MAX_FRAME_INTERVAL_FOR_FPS, // MaxFrameInterval, 100 nS units
16 * FRAME_RATE_30FPS * X_640 * Y_480, // MinBitsPerSecond;
16 * FRAME_RATE_30FPS * X_640 * Y_480, // MaxBitsPerSecond;
},

On Oct 28, 2014, at 1:59 PM, NtDev mm > wrote:
I’m writing an AVStream MInidriver
I need to expose the FPS I support.
currently I support 30 and 60 FPS.
in graph studio all range between 30 and 60 is exposed.
how can I enable only 30 and 60 and not the full range between them?

In reality, most users don’t select a frame rate. They use whatever you can deliver at the appropriate resolution. I?m not sure why I would chose 30 if you supported 60. What do you do if the user asks for 30? Do you cut the pixel clock?

You have two choices. One, you can leave your data range as it is, and override the frame rate in your data intersection callback. Two, you can have two data ranges, one at 60fps and one at 30fps. If you really want to limit the list, I?d take the first option.

Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.</mailto:xxxxx>