Example #1
0
        public HRESULT SetUINT64(Guid guidKey, ulong unValue)
        {
            var hr = _type.SetUINT64(guidKey, unValue);

            Trace("key: " + guidKey.ToName() + " value: " + unValue + " hr: " + hr);
            return(hr);
        }
        private IMFMediaType CreateTargetVideoMediaType()
        {
            IMFMediaType mediaType = null;

            MFHelper.MFCreateMediaType(out mediaType);

            mediaType.SetGUID(new Guid(Consts.MF_MT_MAJOR_TYPE), new Guid(Consts.MFMediaType_Video));

            mediaType.SetGUID(new Guid(Consts.MF_MT_SUBTYPE), this.videoOutput.Subtype);
            mediaType.SetUINT64(new Guid(Consts.MF_MT_FRAME_SIZE), this.videoOutput.FrameSize.Packed);
            mediaType.SetUINT64(new Guid(Consts.MF_MT_FRAME_RATE), this.videoOutput.FrameRate.Packed);
            mediaType.SetUINT64(new Guid(Consts.MF_MT_PIXEL_ASPECT_RATIO), this.videoOutput.PixelAspectRatio.Packed);
            mediaType.SetUINT32(new Guid(Consts.MF_MT_AVG_BITRATE), this.videoOutput.AvgBitRate);
            mediaType.SetUINT32(new Guid(Consts.MF_MT_INTERLACE_MODE), this.videoOutput.InterlaceMode);

            return(mediaType);
        }