Exemple #1
0
        public WMASettings()
        {
            InitializeComponent();
            //listBoxWMACodecs.Items.AddRange(
            uint profCount;
            IWMProfileManager2 profManager;
            IWMProfile         profile;
            IWMProfile3        profile3;
            IWMStreamConfig    streamConf;

            profManager = (IWMProfileManager2)WM.CreateProfileManager();

            profManager.CreateEmptyProfile(WMT_VERSION.WMT_VER_9_0, out profile);

            Guid            mediaTypeGuid = WmMediaTypeId.Audio;
            IWMCodecInfo    codecInfo     = (IWMCodecInfo)profManager;
            IWMStreamConfig streamConfig;

            codecInfo.GetCodecFormat(ref mediaTypeGuid, (uint)0, (uint)74, out streamConfig);
            streamConfig.SetStreamNumber(1);
            streamConfig.SetStreamName("AudioStream1");
            streamConfig.SetConnectionName("Audio1");
        }
Exemple #2
0
        private void Test()
        {
            int numCodecs = -1;

            m_pCodecInfo.GetCodecInfoCount(MediaType.Video, out numCodecs);
            Debug.Assert(numCodecs >= 0);

            if (numCodecs > 0)
            {
                int numFormats = -1;
                m_pCodecInfo.GetCodecFormatCount(MediaType.Video, 0, out numFormats);
                Debug.Assert(numFormats >= 0);

                if (numFormats > 0)
                {
                    IWMStreamConfig streamConfig;
                    m_pCodecInfo.GetCodecFormat(MediaType.Video, 0, 0, out streamConfig);

                    Guid streamType;
                    streamConfig.GetStreamType(out streamType);
                    Debug.Assert(streamType == MediaType.Video);
                }
            }
        }