}
return false;
}
+ bool VideoIsAvailable() const
+ {
+ return ((subType == MFVideoFormat_RGB32) ||
+ (subType == MFVideoFormat_RGB24) ||
+ (subType == MFVideoFormat_YUY2));
+ }
};
void printFormat(std::ostream& out, const GUID& fmt)
{
if (i->second.majorType == MFMediaType_Video)
{
- if (best.second.isEmpty() || i->second.VideoIsBetterThan(best.second, newType))
+ if (best.second.isEmpty() || (i->second.VideoIsBetterThan(best.second, newType) && i->second.VideoIsAvailable()))
{
best = *i;
}