/// <summary>
 /// initializes MediaFoundation - only needs to be called once per process
 /// </summary>
 public static void Startup()
 {
     if (!initialized)
     {
         MediaFoundationInterop.MFStartup(MediaFoundationInterop.MF_VERSION, 0);
         initialized = true;
     }
 }
Esempio n. 2
0
 public static void Startup()
 {
     if (!MediaFoundationApi.initialized)
     {
         int             num       = 2;
         OperatingSystem osversion = Environment.OSVersion;
         if (osversion.Version.Major == 6 && osversion.Version.Minor == 0)
         {
             num = 1;
         }
         MediaFoundationInterop.MFStartup(num << 16 | 112, 0);
         MediaFoundationApi.initialized = true;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// initializes MediaFoundation - only needs to be called once per process
        /// </summary>
        public static void Startup()
        {
            if (!initialized)
            {
                var sdkVersion = MediaFoundationInterop.MF_SDK_VERSION;
#if !NETFX_CORE
                var os = Environment.OSVersion;
                if (os.Version.Major == 6 && os.Version.Minor == 0)
                {
                    sdkVersion = 1;
                }
#endif
                MediaFoundationInterop.MFStartup((sdkVersion << 16) | MediaFoundationInterop.MF_API_VERSION, 0);
                initialized = true;
            }
        }