コード例 #1
0
        private void GetFormat(IBaseFilter filter)
        {
            var config = (IAMStreamConfig)GetOutputPin(filter);

            AMMediaType media;
            var         hr = config.GetFormat(out media);

            DsError.ThrowExceptionForHR(hr);

            if (currentFormat != null)
            {
                DsUtils.FreeAMMediaType(currentFormat);
            }
            currentFormat = media;

            var resolutionInfo = ResolutionInfo.Create(currentFormat);

            Settings.Default.Width  = resolutionInfo.Width;
            Settings.Default.Height = resolutionInfo.Height;
            Settings.Default.Bpp    = resolutionInfo.Bpp;
            Settings.Default.Save();

            OnFormatChanged(resolutionInfo);
        }
コード例 #2
0
 private void OnFormatChanged(ResolutionInfo resolutionInfo)
 {
     FormatChanged(this, new EventArgs<string>(resolutionInfo.ToString()));
 }
コード例 #3
0
 private void OnFormatChanged(ResolutionInfo resolutionInfo)
 {
     FormatChanged(this, new EventArgs <string>(resolutionInfo.ToString()));
 }