Beispiel #1
0
        private static bool SupportsFlags(VideoCompressorFlags dwFlags)
        {
            const VideoCompressorFlags unsupportedFlags = VideoCompressorFlags.Quality | VideoCompressorFlags.Crunch | VideoCompressorFlags.CompressFrames;

            if ((dwFlags & unsupportedFlags) != 0)
            {
                return(false);
            }

            return((dwFlags & VideoCompressorFlags.Temporal) == 0 || (dwFlags & VideoCompressorFlags.FastTemporalC) != 0);
        }
Beispiel #2
0
        private static bool SupportsVideoCompressor(ref ICINFO icInfo)
        {
#if COMPATIBILITY
            if (icInfo.fccHandler == FourCC.x264)
            {
                return(true);
            }
#endif

            const VideoCompressorFlags unsupportedFlags = VideoCompressorFlags.Quality |
                                                          VideoCompressorFlags.Crunch |
                                                          VideoCompressorFlags.CompressFrames;

            if ((icInfo.dwFlags & unsupportedFlags) != 0)
            {
                return(false);
            }

            bool requiresPreviousFrame = (icInfo.dwFlags & VideoCompressorFlags.Temporal) != 0 &&
                                         (icInfo.dwFlags & VideoCompressorFlags.FastTemporalC) == 0;

            return(!requiresPreviousFrame);
        }