private void ConfigAudioRendererCodecSection(object sender, EventArgs e, string selection) { foreach (DsDevice device in DsDevice.GetDevicesOfCat(DirectShowLib.FilterCategory.AudioRendererCategory)) { try { if (device.Name != null) { { if (selection.Equals(device.Name)) { DirectShowPropertyPage page = new DirectShowPropertyPage((DsDevice)device); page.Show(this); } } } } catch (Exception) { } } }
private void ConfigCodecSection(object sender, EventArgs e, string selection) { foreach (DsDevice device in DsDevice.GetDevicesOfCat(DirectShowLib.FilterCategory.LegacyAmFilterCategory)) { try { if (device.Name != null) { { if (selection.Equals(device.Name)) { if (selection.Contains("CyberLink")) { // Rename MediaPortal subkey to Configuration for Cyberlink take setting RegMPtoConfig(@"Software\Cyberlink\Common\clcvd"); RegMPtoConfig(@"Software\Cyberlink\Common\cl264dec"); RegMPtoConfig(@"Software\Cyberlink\Common\CLVSD"); RegMPtoConfig(@"Software\Cyberlink\Common\CLAud"); // Show Codec page Setting DirectShowPropertyPage page = new DirectShowPropertyPage((DsDevice) device); page.Show(this); // Rename Configuration subkey to MediaPortal to apply Cyberlink setting RegConfigtoMP(@"Software\Cyberlink\Common\clcvd"); RegConfigtoMP(@"Software\Cyberlink\Common\cl264dec"); RegConfigtoMP(@"Software\Cyberlink\Common\CLVSD"); RegConfigtoMP(@"Software\Cyberlink\Common\CLAud"); } else { DirectShowPropertyPage page = new DirectShowPropertyPage((DsDevice) device); page.Show(this); } } } } } catch (Exception) { } } }
private void advancedButton_Click(object sender, EventArgs e) { string selection = (string)subEnginesCombo.SelectedItem; if (selection.Equals("MPC-HC")) { MpcHcSubsForm dlg = new MpcHcSubsForm(); DialogResult dialogResult = dlg.ShowDialog(); } else if (selection.Equals("FFDShow")) { DirectShowLib.IBaseFilter ffdshow = null; try { ffdshow = (DirectShowLib.IBaseFilter)ClassId.CoCreateInstance(ClassId.FFDShowVideo); DirectShowPropertyPage page = new DirectShowPropertyPage(ffdshow); page.Show(this); } catch (Exception) { MessageBox.Show( "FFDShow is not installed, please download and install it from http://ffdshow-tryout.sourceforge.net/"); } finally { if (ffdshow != null) Marshal.ReleaseComObject(ffdshow); } } else if (selection.Equals("DirectVobSub")) { DirectShowLib.IBaseFilter vobSub = null; try { vobSub = (DirectShowLib.IBaseFilter)ClassId.CoCreateInstance(ClassId.DirectVobSubAutoload); DirectShowPropertyPage page = new DirectShowPropertyPage(vobSub); page.Show(this); } catch (Exception) { MessageBox.Show("DirectVobSub is not installed!"); } finally { if (vobSub != null) Marshal.ReleaseComObject(vobSub); } } }
private void advancedButton_Click(object sender, EventArgs e) { string selection = (string)subEnginesCombo.SelectedItem; if (selection.Equals("MPC-HC")) { MpcHcSubsForm dlg = new MpcHcSubsForm(); DialogResult dialogResult = dlg.ShowDialog(); } else if (selection.Equals("FFDShow")) { DirectShowLib.IBaseFilter ffdshow = null; try { ffdshow = (DirectShowLib.IBaseFilter)ClassId.CoCreateInstance(ClassId.FFDShowVideo); DirectShowPropertyPage page = new DirectShowPropertyPage(ffdshow); page.Show(this); } catch (Exception) { MessageBox.Show( "FFDShow is not installed, please download and install it from http://ffdshow-tryout.sourceforge.net/"); } finally { if (ffdshow != null) Marshal.ReleaseComObject(ffdshow); } } else if (selection.Equals("DirectVobSub")) { DirectShowLib.IBaseFilter vobSub = null; try { vobSub = (DirectShowLib.IBaseFilter) ClassId.CoCreateInstance(ClassId.DirectVobSubAutoload); DirectShowPropertyPage page = new DirectShowPropertyPage(vobSub); page.Show(this); } catch (Exception) { MessageBox.Show("DirectVobSub is not installed!"); } finally { if (vobSub != null) Marshal.ReleaseComObject(vobSub); } } else if (selection.Equals("XySubFilter")) { DirectShowLib.IBaseFilter vobSub = null; try { foreach (DsDevice device in DsDevice.GetDevicesOfCat(DirectShowLib.FilterCategory.LegacyAmFilterCategory)) { try { if (device.Name != null) { if (device.Name.Contains("XySubFilter") && device.DevicePath.ToLowerInvariant() .Contains(ClassId.XySubFilterNormal.ToString().ToLowerInvariant())) { DirectShowPropertyPage page = new DirectShowPropertyPage((DsDevice) device); page.Show(this); } } } catch (Exception) { MessageBox.Show("XySubFilter is not installed!"); } } } catch (Exception) { MessageBox.Show("XySubFilter is not installed!"); } finally { if (vobSub != null) Marshal.ReleaseComObject(vobSub); } } }
private void bSetup_Click(object sender, EventArgs e) { if (cLBDSFilter.SelectedIndex != -1) { DirectShowPropertyPage page = new DirectShowPropertyPage((DsDevice)cLBDSFilter.SelectedItem); page.Show(this); } }