Example #1
0
        private void cbWMVAudioMode_SelectedIndexChanged(object sender, EventArgs e)
        {
            var mode = VFWMVStreamMode.CBR;

            switch (cbWMVAudioMode.SelectedIndex)
            {
            case 0:
            {
                mode = VFWMVStreamMode.CBR;
                break;
            }

            case 1:
            {
                mode = VFWMVStreamMode.VBRBitrate;
                break;
            }

            case 2:
            {
                mode = VFWMVStreamMode.VBRPeakBitrate;
                break;
            }

            case 3:
            {
                mode = VFWMVStreamMode.VBRQuality;
                break;
            }
            }

            cbWMVAudioCodec.Items.Clear();
            if (_coreVideoCapture != null)
            {
                foreach (string codec in _coreVideoCapture.WMV_CustomProfile_AudioCodecs(mode))
                {
                    cbWMVAudioCodec.Items.Add(codec);
                }
            }
            else
            {
                foreach (string codec in _coreVideoEdit.WMV_CustomProfile_AudioCodecs(mode))
                {
                    cbWMVAudioCodec.Items.Add(codec);
                }
            }

            if (cbWMVAudioCodec.Items.Count > 0)
            {
                cbWMVAudioCodec.SelectedIndex = 0;
            }
        }