O
~ok|
Guest
hi everyone,
something i really miss in mediaportal is the ability to normalize sound volume on the fly (i.e. while listening to tv channels, music files, video files, vcd and dvd).
Video post-processing using ffdshow is really convenient and i wanted to add audio post-processing, still backed by ffdshow, using "ffdshow Audio Processor".
Here is a diff file against CVS from 01-04-2006 20:31:10. The patch does *NOT* work as-is, the filter does not connect properly most of the time and I don't know why (manually created graphs do). If anyone may find some time to fix this please do, this is the first time i try to play with directshow...
something i really miss in mediaportal is the ability to normalize sound volume on the fly (i.e. while listening to tv channels, music files, video files, vcd and dvd).
Video post-processing using ffdshow is really convenient and i wanted to add audio post-processing, still backed by ffdshow, using "ffdshow Audio Processor".
Here is a diff file against CVS from 01-04-2006 20:31:10. The patch does *NOT* work as-is, the filter does not connect properly most of the time and I don't know why (manually created graphs do). If anyone may find some time to fix this please do, this is the first time i try to play with directshow...
Code:
diff -u -r D:\Data\Sources\trunk\mediaportal/Configuration/MediaPortal.Configuration.csproj.orig D:\Data\Sources\trunk\mediaportal/Configuration/MediaPortal.Configuration.csproj
--- D:\Data\Sources\trunk\mediaportal/Configuration/MediaPortal.Configuration.csproj.orig 2006-04-01 19:30:59.984375000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Configuration/MediaPortal.Configuration.csproj 2006-04-01 21:53:11.000000000 +0200
@@ -288,6 +288,9 @@
<Compile Include="SectionSettings.cs">
<SubType>UserControl</SubType>
</Compile>
+ <Compile Include="Sections\MusicPostProcessing.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
<Compile Include="Sections\EncoderFilters.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -567,6 +570,7 @@
</EmbeddedResource>
<EmbeddedResource Include="ParameterForm.resx">
<DependentUpon>ParameterForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<SubType>Designer</SubType>
@@ -580,6 +584,10 @@
<DependentUpon>SectionSettings.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="Sections\MusicPostProcessing.resx">
+ <DependentUpon>MusicPostProcessing.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="Sections\EncoderFilters.resx">
<SubType>Designer</SubType>
<DependentUpon>EncoderFilters.cs</DependentUpon>
diff -u -r D:\Data\Sources\trunk\mediaportal/Configuration/Sections/DVDPostProcessing.cs.orig D:\Data\Sources\trunk\mediaportal/Configuration/Sections/DVDPostProcessing.cs
--- D:\Data\Sources\trunk\mediaportal/Configuration/Sections/DVDPostProcessing.cs.orig 2006-04-01 19:30:59.281250000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Configuration/Sections/DVDPostProcessing.cs 2006-04-01 21:53:10.718750000 +0200
@@ -35,6 +35,7 @@
{
private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox3;
private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowCheckBox;
+ private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowAudioCheckBox;
private MediaPortal.UserInterface.Controls.MPLabel label3;
private System.ComponentModel.IContainer components = null;
@@ -57,6 +58,7 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
ffdshowCheckBox.Checked = xmlreader.GetValueAsBool("dvdplayer", "ffdshow", false);
+ ffdshowAudioCheckBox.Checked = xmlreader.GetValueAsBool("dvdplayer", "ffdshowaudio", false);
}
}
@@ -65,6 +67,7 @@
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
xmlwriter.SetValueAsBool("dvdplayer", "ffdshow", ffdshowCheckBox.Checked);
+ xmlwriter.SetValueAsBool("dvdplayer", "ffdshowaudio", ffdshowAudioCheckBox.Checked);
}
}
@@ -90,55 +93,69 @@
/// </summary>
private void InitializeComponent()
{
- this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox();
- this.ffdshowCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
- this.label3 = new MediaPortal.UserInterface.Controls.MPLabel();
- this.mpGroupBox3.SuspendLayout();
- this.SuspendLayout();
- //
- // mpGroupBox3
- //
- this.mpGroupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.mpGroupBox3.Controls.Add(this.ffdshowCheckBox);
- this.mpGroupBox3.Controls.Add(this.label3);
- this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.mpGroupBox3.Location = new System.Drawing.Point(0, 0);
- this.mpGroupBox3.Name = "mpGroupBox3";
- this.mpGroupBox3.Size = new System.Drawing.Size(472, 96);
- this.mpGroupBox3.TabIndex = 0;
- this.mpGroupBox3.TabStop = false;
- this.mpGroupBox3.Text = "Settings";
- //
- // ffdshowCheckBox
- //
- this.ffdshowCheckBox.AutoSize = true;
- this.ffdshowCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.ffdshowCheckBox.Location = new System.Drawing.Point(16, 64);
- this.ffdshowCheckBox.Name = "ffdshowCheckBox";
- this.ffdshowCheckBox.Size = new System.Drawing.Size(182, 17);
- this.ffdshowCheckBox.TabIndex = 1;
- this.ffdshowCheckBox.Text = "Enable FFDshow post processing";
- //
- // label3
- //
- this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.label3.Location = new System.Drawing.Point(16, 24);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(440, 32);
- this.label3.TabIndex = 0;
- this.label3.Text = "Note that you need to install ffdshow separately to make any this option work. Pl" +
- "ease read the MediaPortal documentation for more information.";
- //
- // DVDPostProcessing
- //
- this.Controls.Add(this.mpGroupBox3);
- this.Name = "DVDPostProcessing";
- this.Size = new System.Drawing.Size(472, 408);
- this.mpGroupBox3.ResumeLayout(false);
- this.mpGroupBox3.PerformLayout();
- this.ResumeLayout(false);
+ this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox();
+ this.ffdshowCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
+ this.ffdshowAudioCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
+ this.label3 = new MediaPortal.UserInterface.Controls.MPLabel();
+ this.mpGroupBox3.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // mpGroupBox3
+ //
+ this.mpGroupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.mpGroupBox3.Controls.Add(this.ffdshowCheckBox);
+ this.mpGroupBox3.Controls.Add(this.ffdshowAudioCheckBox);
+ this.mpGroupBox3.Controls.Add(this.label3);
+ this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.mpGroupBox3.Location = new System.Drawing.Point(0, 0);
+ this.mpGroupBox3.Name = "mpGroupBox3";
+ this.mpGroupBox3.Size = new System.Drawing.Size(472, 112);
+ this.mpGroupBox3.TabIndex = 0;
+ this.mpGroupBox3.TabStop = false;
+ this.mpGroupBox3.Text = "Settings";
+ //
+ // ffdshowCheckBox
+ //
+ this.ffdshowCheckBox.AutoSize = true;
+ this.ffdshowCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.ffdshowCheckBox.Location = new System.Drawing.Point(16, 64);
+ this.ffdshowCheckBox.Name = "ffdshowCheckBox";
+ this.ffdshowCheckBox.Size = new System.Drawing.Size(211, 17);
+ this.ffdshowCheckBox.TabIndex = 1;
+ this.ffdshowCheckBox.Text = "Enable FFDshow video post processing";
+ this.ffdshowCheckBox.UseVisualStyleBackColor = true;
+ //
+ // ffdshowAudioCheckBox
+ //
+ this.ffdshowAudioCheckBox.AutoSize = true;
+ this.ffdshowAudioCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.ffdshowAudioCheckBox.Location = new System.Drawing.Point(16, 80);
+ this.ffdshowAudioCheckBox.Name = "ffdshowAudioCheckBox";
+ this.ffdshowAudioCheckBox.Size = new System.Drawing.Size(211, 17);
+ this.ffdshowAudioCheckBox.TabIndex = 1;
+ this.ffdshowAudioCheckBox.Text = "Enable FFDshow audio post processing";
+ this.ffdshowAudioCheckBox.UseVisualStyleBackColor = true;
+ //
+ // label3
+ //
+ this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.label3.Location = new System.Drawing.Point(16, 24);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(440, 32);
+ this.label3.TabIndex = 0;
+ this.label3.Text = "Note that you need to install ffdshow separately to make any this option work. Pl" +
+ "ease read the MediaPortal documentation for more information.";
+ //
+ // DVDPostProcessing
+ //
+ this.Controls.Add(this.mpGroupBox3);
+ this.Name = "DVDPostProcessing";
+ this.Size = new System.Drawing.Size(472, 408);
+ this.mpGroupBox3.ResumeLayout(false);
+ this.mpGroupBox3.PerformLayout();
+ this.ResumeLayout(false);
}
#endregion
diff -u -r D:\Data\Sources\trunk\mediaportal/Configuration/Sections/MoviePostProcessing.cs.orig D:\Data\Sources\trunk\mediaportal/Configuration/Sections/MoviePostProcessing.cs
--- D:\Data\Sources\trunk\mediaportal/Configuration/Sections/MoviePostProcessing.cs.orig 2006-04-01 19:30:58.515625000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Configuration/Sections/MoviePostProcessing.cs 2006-04-01 21:48:27.328125000 +0200
@@ -35,6 +35,7 @@
{
private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox3;
private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowCheckBox;
+ private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowAudioCheckBox;
private MediaPortal.UserInterface.Controls.MPLabel label3;
private System.ComponentModel.IContainer components = null;
@@ -57,6 +58,7 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
ffdshowCheckBox.Checked = xmlreader.GetValueAsBool("movieplayer", "ffdshow", false);
+ ffdshowAudioCheckBox.Checked = xmlreader.GetValueAsBool("movieplayer", "ffdshowaudio", false);
}
}
@@ -65,6 +67,7 @@
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
xmlwriter.SetValueAsBool("movieplayer", "ffdshow", ffdshowCheckBox.Checked);
+ xmlwriter.SetValueAsBool("movieplayer", "ffdshowaudio", ffdshowAudioCheckBox.Checked);
}
}
@@ -93,6 +96,7 @@
this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.label3 = new MediaPortal.UserInterface.Controls.MPLabel();
this.ffdshowCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
+ this.ffdshowAudioCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.mpGroupBox3.SuspendLayout();
this.SuspendLayout();
//
@@ -102,10 +106,11 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.mpGroupBox3.Controls.Add(this.label3);
this.mpGroupBox3.Controls.Add(this.ffdshowCheckBox);
+ this.mpGroupBox3.Controls.Add(this.ffdshowAudioCheckBox);
this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.mpGroupBox3.Location = new System.Drawing.Point(0, 0);
this.mpGroupBox3.Name = "mpGroupBox3";
- this.mpGroupBox3.Size = new System.Drawing.Size(472, 96);
+ this.mpGroupBox3.Size = new System.Drawing.Size(472, 112);
this.mpGroupBox3.TabIndex = 0;
this.mpGroupBox3.TabStop = false;
this.mpGroupBox3.Text = "Settings";
@@ -129,7 +134,17 @@
this.ffdshowCheckBox.Name = "ffdshowCheckBox";
this.ffdshowCheckBox.Size = new System.Drawing.Size(182, 17);
this.ffdshowCheckBox.TabIndex = 1;
- this.ffdshowCheckBox.Text = "Enable FFDshow post processing";
+ this.ffdshowCheckBox.Text = "Enable FFDshow video post processing";
+ //
+ // ffdshowAudioCheckBox
+ //
+ this.ffdshowAudioCheckBox.AutoSize = true;
+ this.ffdshowAudioCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.ffdshowAudioCheckBox.Location = new System.Drawing.Point(16, 80);
+ this.ffdshowAudioCheckBox.Name = "ffdshowAudioCheckBox";
+ this.ffdshowAudioCheckBox.Size = new System.Drawing.Size(182, 17);
+ this.ffdshowAudioCheckBox.TabIndex = 1;
+ this.ffdshowAudioCheckBox.Text = "Enable FFDshow audio post processing";
//
// MoviePostProcessing
//
diff -u -r D:\Data\Sources\trunk\mediaportal/Configuration/Sections/TVPostProcessing.cs.orig D:\Data\Sources\trunk\mediaportal/Configuration/Sections/TVPostProcessing.cs
--- D:\Data\Sources\trunk\mediaportal/Configuration/Sections/TVPostProcessing.cs.orig 2006-04-01 19:30:59.375000000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Configuration/Sections/TVPostProcessing.cs 2006-04-01 21:53:10.921875000 +0200
@@ -35,6 +35,7 @@
{
private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox3;
private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowCheckBox;
+ private MediaPortal.UserInterface.Controls.MPCheckBox ffdshowAudioCheckBox;
private MediaPortal.UserInterface.Controls.MPLabel label3;
private System.ComponentModel.IContainer components = null;
@@ -57,6 +58,7 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
ffdshowCheckBox.Checked = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ ffdshowAudioCheckBox.Checked = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
}
}
@@ -65,6 +67,7 @@
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
xmlwriter.SetValueAsBool("mytv", "ffdshow", ffdshowCheckBox.Checked);
+ xmlwriter.SetValueAsBool("mytv", "ffdshowaudio", ffdshowAudioCheckBox.Checked);
}
}
@@ -92,6 +95,7 @@
{
this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.ffdshowCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
+ this.ffdshowAudioCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.label3 = new MediaPortal.UserInterface.Controls.MPLabel();
this.mpGroupBox3.SuspendLayout();
this.SuspendLayout();
@@ -101,11 +105,12 @@
this.mpGroupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mpGroupBox3.Controls.Add(this.ffdshowCheckBox);
+ this.mpGroupBox3.Controls.Add(this.ffdshowAudioCheckBox);
this.mpGroupBox3.Controls.Add(this.label3);
this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.mpGroupBox3.Location = new System.Drawing.Point(0, 0);
this.mpGroupBox3.Name = "mpGroupBox3";
- this.mpGroupBox3.Size = new System.Drawing.Size(472, 96);
+ this.mpGroupBox3.Size = new System.Drawing.Size(472, 112);
this.mpGroupBox3.TabIndex = 0;
this.mpGroupBox3.TabStop = false;
this.mpGroupBox3.Text = "Settings";
@@ -118,7 +123,17 @@
this.ffdshowCheckBox.Name = "ffdshowCheckBox";
this.ffdshowCheckBox.Size = new System.Drawing.Size(182, 17);
this.ffdshowCheckBox.TabIndex = 1;
- this.ffdshowCheckBox.Text = "Enable FFDshow post processing";
+ this.ffdshowCheckBox.Text = "Enable FFDshow video post processing";
+ //
+ // ffdshowAudioCheckBox
+ //
+ this.ffdshowAudioCheckBox.AutoSize = true;
+ this.ffdshowAudioCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.ffdshowAudioCheckBox.Location = new System.Drawing.Point(16, 80);
+ this.ffdshowAudioCheckBox.Name = "ffdshowAudioCheckBox";
+ this.ffdshowAudioCheckBox.Size = new System.Drawing.Size(182, 17);
+ this.ffdshowAudioCheckBox.TabIndex = 1;
+ this.ffdshowAudioCheckBox.Text = "Enable FFDshow audio post processing";
//
// label3
//
diff -u -r D:\Data\Sources\trunk\mediaportal/Configuration/SettingsForm.cs.orig D:\Data\Sources\trunk\mediaportal/Configuration/SettingsForm.cs
--- D:\Data\Sources\trunk\mediaportal/Configuration/SettingsForm.cs.orig 2006-04-01 19:30:59.890625000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Configuration/SettingsForm.cs 2006-04-01 22:05:52.093750000 +0200
@@ -175,6 +175,8 @@
Log.Write(" add music import section");
AddChildSection(music, new MusicImport());
AddChildSection(music, new MusicSort());
+ Log.Write(" add music postprocessing section");
+ AddChildSection(music, new MusicPostProcessing());
Log.Write(" add music misc section");
AddChildSection(music, new MusicMisc());
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/AudioPlayerVMR.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/AudioPlayerVMR.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/AudioPlayerVMR.cs.orig 2006-04-01 19:26:52.093750000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/AudioPlayerVMR.cs 2006-04-01 23:29:59.734375000 +0200
@@ -62,6 +62,8 @@
private IBasicAudio basicAudio;
private const int WM_GRAPHNOTIFY = 0x00008001; // message from graph
+ protected IBaseFilter ffdShowFilterAudio = null;
+
private const int WS_CHILD = 0x40000000; // attributes for video window
private const int WS_CLIPCHILDREN = 0x02000000;
private const int WS_CLIPSIBLINGS = 0x04000000;
@@ -340,6 +342,12 @@
{
graphBuilder = (IGraphBuilder)new FilterGraph();
iStage = 5;
+ bool bAddFFDshowAudio = false;
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("musicplayer", "ffdshowaudio", false);
+ }
+ if (bAddFFDshowAudio) ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(graphBuilder, "ffdshow Audio Processor");
int hr = graphBuilder.RenderFile(m_strCurrentFile, null);
if (hr != 0)
{
@@ -409,6 +417,8 @@
mediaPos = null;
basicAudio = null;
+ if (ffdShowFilterAudio != null) Marshal.ReleaseComObject(ffdShowFilterAudio); ffdShowFilterAudio = null;
+
if (graphBuilder != null)
Marshal.ReleaseComObject(graphBuilder); graphBuilder = null;
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/BaseStreamBufferPlayer.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/BaseStreamBufferPlayer.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/BaseStreamBufferPlayer.cs.orig 2006-04-01 19:26:51.937500000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/BaseStreamBufferPlayer.cs 2006-04-01 22:20:59.328125000 +0200
@@ -91,6 +91,7 @@
protected IBaseFilter _audioCodecFilter = null;
protected IBaseFilter _audioRendererFilter = null;
protected IBaseFilter _ffdShowFilter = null;
+ protected IBaseFilter _ffdShowFilterAudio = null;
/// <summary> control interface. </summary>
protected IMediaControl _mediaCtrl = null;
@@ -1118,9 +1119,11 @@
string strAudioCodec = "";
string strAudiorenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudiorenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
@@ -1134,6 +1137,7 @@
}
if (strVideoCodec.Length > 0) _videoCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strVideoCodec);
if (strAudioCodec.Length > 0) _audioCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strAudioCodec);
+ if (bAddFFDshowAudio) _ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (strAudiorenderer.Length > 0) _audioRendererFilter = DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudiorenderer, false);
if (bAddFFDshow) _ffdShowFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow raw video filter");
@@ -1246,6 +1250,11 @@
while ((hr = Marshal.ReleaseComObject(_ffdShowFilter)) > 0) ;
_ffdShowFilter = null;
}
+ if (_ffdShowFilterAudio != null)
+ {
+ while ((hr = Marshal.ReleaseComObject(_ffdShowFilterAudio)) > 0) ;
+ _ffdShowFilterAudio = null;
+ }
if (streamConfig2 != null)
{
while ((hr = Marshal.ReleaseComObject(streamConfig2)) > 0) ;
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/BaseTStreamBufferPlayer.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/BaseTStreamBufferPlayer.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/BaseTStreamBufferPlayer.cs.orig 2006-04-01 19:26:51.734375000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/BaseTStreamBufferPlayer.cs 2006-04-01 22:20:59.421875000 +0200
@@ -83,6 +83,7 @@
protected IBaseFilter _audioCodecFilter = null;
protected IBaseFilter _audioRendererFilter = null;
protected IBaseFilter _ffdShowFilter = null;
+ protected IBaseFilter _ffdShowFilterAudio = null;
/// <summary> control interface. </summary>
protected IMediaControl _mediaCtrl = null;
@@ -1059,9 +1060,11 @@
string strAudioCodec = "";
string strAudiorenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudiorenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
@@ -1075,6 +1078,7 @@
}
if (strVideoCodec.Length > 0) _videoCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strVideoCodec);
if (strAudioCodec.Length > 0) _audioCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strAudioCodec);
+ if (bAddFFDshowAudio) _ffdShowFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (strAudiorenderer.Length > 0) _audioRendererFilter = DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudiorenderer, false);
if (bAddFFDshow) _ffdShowFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow raw video filter");
@@ -1180,6 +1184,11 @@
while ((hr = Marshal.ReleaseComObject(_ffdShowFilter)) > 0) ;
_ffdShowFilter = null;
}
+ if (_ffdShowFilterAudio != null)
+ {
+ while ((hr = Marshal.ReleaseComObject(_ffdShowFilterAudio)) > 0) ;
+ _ffdShowFilterAudio = null;
+ }
if (_fileSource != null)
{
while ((hr = Marshal.ReleaseComObject(_fileSource)) > 0) ;
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer.cs.orig 2006-04-01 19:26:51.843750000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer.cs 2006-04-01 22:20:59.500000000 +0200
@@ -117,6 +117,7 @@
protected IBaseFilter _audioCodecFilter=null;
protected IBaseFilter _audioRendererFilter=null;
protected IBaseFilter _ffdShowFilter=null;
+ protected IBaseFilter _ffdShowFilterAudio = null;
VMR7Util _vmr7 = null;
protected int _speed=1;
@@ -532,6 +533,12 @@
_ffdShowFilter=null;
}
+ if (_ffdShowFilterAudio != null)
+ {
+ while ((hr = Marshal.ReleaseComObject(_ffdShowFilterAudio)) > 0) ;
+ _ffdShowFilterAudio = null;
+ }
+
if( _dvdbasefilter != null )
{
while ((hr=Marshal.ReleaseComObject( _dvdbasefilter))>0);
@@ -1946,15 +1953,18 @@
string strAudioCodec="";
string strAudiorenderer="";
bool bAddFFDshow=false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader=new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow=xmlreader.GetValueAsBool("dvdplayer","ffdshow",false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("dvdplayer", "ffdshowaudio", false);
strVideoCodec=xmlreader.GetValueAsString("dvdplayer","videocodec","");
strAudioCodec=xmlreader.GetValueAsString("dvdplayer","audiocodec","");
strAudiorenderer=xmlreader.GetValueAsString("dvdplayer","audiorenderer","");
}
if (strVideoCodec.Length>0) _videoCodecFilter= DirectShowUtil.AddFilterToGraph(_graphBuilder,strVideoCodec);
if (strAudioCodec.Length>0) _audioCodecFilter= DirectShowUtil.AddFilterToGraph(_graphBuilder,strAudioCodec);
+ if (bAddFFDshowAudio) _ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (strAudiorenderer.Length>0) _audioRendererFilter=DirectShowUtil.AddAudioRendererToGraph(_graphBuilder,strAudiorenderer,false);
if (bAddFFDshow) _ffdShowFilter=DirectShowUtil.AddFilterToGraph(_graphBuilder,"ffdshow raw video filter");
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer9.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer9.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer9.cs.orig 2006-04-01 19:26:51.796875000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/DVDPlayer9.cs 2006-04-01 21:08:27.562500000 +0200
@@ -272,6 +272,11 @@
_ffdShowFilter=null;
}
+ if (_ffdShowFilterAudio != null)
+ {
+ while ((hr = Marshal.ReleaseComObject(_ffdShowFilterAudio)) > 0) ;
+ _ffdShowFilterAudio = null;
+ }
if( _cmdOption!= null )
Marshal.ReleaseComObject( _cmdOption );
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/StreamBufferPlayer9.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/StreamBufferPlayer9.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/StreamBufferPlayer9.cs.orig 2006-04-01 19:26:51.906250000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/StreamBufferPlayer9.cs 2006-04-01 22:20:59.625000000 +0200
@@ -153,9 +153,11 @@
string strAudioCodec = "";
string strAudioRenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudioRenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
@@ -170,6 +172,7 @@
}
if (strVideoCodec.Length > 0) _videoCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strVideoCodec);
if (strAudioCodec.Length > 0) _audioCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strAudioCodec);
+ if (bAddFFDshowAudio) _ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (strAudioRenderer.Length > 0) _audioRendererFilter = DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudioRenderer, false);
if (bAddFFDshow) _ffdShowFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow raw video filter");
@@ -305,6 +308,12 @@
_ffdShowFilter = null;
}
+ if (_ffdShowFilterAudio != null)
+ {
+ while ((hr = Marshal.ReleaseComObject(_ffdShowFilterAudio)) > 0) ;
+ _ffdShowFilterAudio = null;
+ }
+
DirectShowUtil.RemoveFilters(_graphBuilder);
if (_rotEntry != null)
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/TSStreamBufferPlayer9.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/TSStreamBufferPlayer9.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/TSStreamBufferPlayer9.cs.orig 2006-04-01 19:26:52.046875000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/TSStreamBufferPlayer9.cs 2006-04-01 22:20:59.671875000 +0200
@@ -125,9 +125,11 @@
string strAudioCodec = "";
string strAudioRenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudioRenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
@@ -142,6 +144,7 @@
}
if (strVideoCodec.Length > 0) _videoCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strVideoCodec);
if (strAudioCodec.Length > 0) _audioCodecFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, strAudioCodec);
+ if (bAddFFDshowAudio) _ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (strAudioRenderer.Length > 0) _audioRendererFilter = DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudioRenderer, false);
if (bAddFFDshow) _ffdShowFilter = DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow raw video filter");
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR7.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR7.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR7.cs.orig 2006-04-01 19:26:52.000000000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR7.cs 2006-04-01 22:20:59.718750000 +0200
@@ -153,6 +153,7 @@
protected IBaseFilter audioCodecFilter=null;
protected IBaseFilter audioRendererFilter=null;
protected IBaseFilter ffdShowFilter=null;
+ protected IBaseFilter ffdShowFilterAudio = null;
protected IDirectVobSub vobSub;
DateTime elapsedTimer=DateTime.Now;
@@ -827,10 +828,12 @@
string strAudioCodec="";
string strAudiorenderer="";
bool bAddFFDshow=false;
+ bool bAddFFDshowAudio = false;
string defaultLanguage;
using (MediaPortal.Profile.Settings xmlreader=new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow=xmlreader.GetValueAsBool("movieplayer","ffdshow",false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("movieplayer", "ffdshowaudio", false);
strVideoCodec=xmlreader.GetValueAsString("movieplayer","mpeg2videocodec","");
strAudioCodec=xmlreader.GetValueAsString("movieplayer","mpeg2audiocodec","");
strAudiorenderer=xmlreader.GetValueAsString("movieplayer","audiorenderer","");
@@ -844,6 +847,7 @@
if (strAudioCodec.Length>0) audioCodecFilter=DirectShowUtil.AddFilterToGraph(graphBuilder,strAudioCodec);
}
if (bAddFFDshow) ffdShowFilter= DirectShowUtil.AddFilterToGraph(graphBuilder,"ffdshow raw video filter");
+ if (bAddFFDshowAudio) ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(graphBuilder, "ffdshow Audio Processor");
if (strAudiorenderer.Length>0) audioRendererFilter= DirectShowUtil.AddAudioRendererToGraph(graphBuilder,strAudiorenderer,false);
@@ -962,6 +966,7 @@
if (audioCodecFilter!=null) Marshal.ReleaseComObject(audioCodecFilter); audioCodecFilter=null;
if (audioRendererFilter!=null) Marshal.ReleaseComObject(audioRendererFilter); audioRendererFilter=null;
if (ffdShowFilter!=null) Marshal.ReleaseComObject(ffdShowFilter); ffdShowFilter=null;
+ if (ffdShowFilterAudio != null) Marshal.ReleaseComObject(ffdShowFilterAudio); ffdShowFilterAudio = null;
if( vobSub != null )
{
while((hr=Marshal.ReleaseComObject( vobSub))>0);
diff -u -r D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR9.cs.orig D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR9.cs
--- D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR9.cs.orig 2006-04-01 19:26:52.031250000 +0200
+++ D:\Data\Sources\trunk\mediaportal/Core/Player/VideoPlayerVMR9.cs 2006-04-01 22:20:59.781250000 +0200
@@ -83,9 +83,11 @@
string strAudioCodec="";
string strAudiorenderer="";
bool bAddFFDshow=false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader=new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow=xmlreader.GetValueAsBool("movieplayer","ffdshow",false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("movieplayer", "ffdshowaudio", false);
strVideoCodec=xmlreader.GetValueAsString("movieplayer","mpeg2videocodec","");
strAudioCodec=xmlreader.GetValueAsString("movieplayer","mpeg2audiocodec","");
strAudiorenderer=xmlreader.GetValueAsString("movieplayer","audiorenderer","");
@@ -97,6 +99,7 @@
if (strAudioCodec.Length>0) audioCodecFilter= DirectShowUtil.AddFilterToGraph(graphBuilder,strAudioCodec);
}
if (bAddFFDshow) ffdShowFilter= DirectShowUtil.AddFilterToGraph(graphBuilder,"ffdshow raw video filter");
+ if (bAddFFDshowAudio) ffdShowFilterAudio = DirectShowUtil.AddFilterToGraph(graphBuilder, "ffdshow Audio Processor");
if (strAudiorenderer.Length>0) audioRendererFilter= DirectShowUtil.AddAudioRendererToGraph(graphBuilder,strAudiorenderer,false);
@@ -258,6 +261,7 @@
if (audioCodecFilter!=null) Marshal.ReleaseComObject(audioCodecFilter); audioCodecFilter=null;
if (audioRendererFilter!=null) Marshal.ReleaseComObject(audioRendererFilter); audioRendererFilter=null;
if (ffdShowFilter!=null) Marshal.ReleaseComObject(ffdShowFilter); ffdShowFilter=null;
+ if (ffdShowFilterAudio != null) Marshal.ReleaseComObject(ffdShowFilterAudio); ffdShowFilterAudio = null;
if( vobSub != null )
{
diff -u -r D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/Analog/SinkGraph.cs.orig D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/Analog/SinkGraph.cs
--- D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/Analog/SinkGraph.cs.orig 2006-04-01 19:26:04.046875000 +0200
+++ D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/Analog/SinkGraph.cs 2006-04-01 22:21:03.968750000 +0200
@@ -782,16 +782,19 @@
string strAudioCodec = "";
string strAudioRenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudioRenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
}
if (video && strVideoCodec.Length > 0) DirectShowUtil.AddFilterToGraph(_graphBuilderInterface, strVideoCodec);
if (audio && strAudioCodec.Length > 0) DirectShowUtil.AddFilterToGraph(_graphBuilderInterface, strAudioCodec);
+ if (audio && bAddFFDshowAudio) DirectShowUtil.AddFilterToGraph(_graphBuilderInterface, "ffdshow Audio Processor");
if (audio && strAudioRenderer.Length > 0) DirectShowUtil.AddAudioRendererToGraph(_graphBuilderInterface, strAudioRenderer, false);
if (video && bAddFFDshow) DirectShowUtil.AddFilterToGraph(_graphBuilderInterface, "ffdshow raw video filter");
}
diff -u -r D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/DVB/DVBGraphBase.cs.orig D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/DVB/DVBGraphBase.cs
--- D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/DVB/DVBGraphBase.cs.orig 2006-04-01 19:26:05.812500000 +0200
+++ D:\Data\Sources\trunk\mediaportal/TVCapture/Graphs/DVB/DVBGraphBase.cs 2006-04-01 22:21:04.093750000 +0200
@@ -1221,15 +1221,18 @@
string strAudioCodec = "";
string strAudioRenderer = "";
bool bAddFFDshow = false;
+ bool bAddFFDshowAudio = false;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
bAddFFDshow = xmlreader.GetValueAsBool("mytv", "ffdshow", false);
+ bAddFFDshowAudio = xmlreader.GetValueAsBool("mytv", "ffdshowaudio", false);
strVideoCodec = xmlreader.GetValueAsString("mytv", "videocodec", "");
strAudioCodec = xmlreader.GetValueAsString("mytv", "audiocodec", "");
strAudioRenderer = xmlreader.GetValueAsString("mytv", "audiorenderer", "");
}
if (video && strVideoCodec.Length > 0) DirectShowUtil.AddFilterToGraph(_graphBuilder, strVideoCodec);
if (audio && strAudioCodec.Length > 0) DirectShowUtil.AddFilterToGraph(_graphBuilder, strAudioCodec);
+ if (audio && bAddFFDshowAudio) DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow Audio Processor");
if (audio && strAudioRenderer.Length > 0) DirectShowUtil.AddAudioRendererToGraph(_graphBuilder, strAudioRenderer, false);
if (video && bAddFFDshow) DirectShowUtil.AddFilterToGraph(_graphBuilder, "ffdshow raw video filter");
}//void AddPreferredCodecs()
diff -u -r D:\Data\Sources\trunk\mediaportal/xbmc/bin/Release/keymap.xml.orig D:\Data\Sources\trunk\mediaportal/xbmc/bin/Release/keymap.xml
--- D:\Data\Sources\trunk\mediaportal/xbmc/bin/Release/keymap.xml.orig 2006-04-01 19:30:29.203125000 +0200
+++ D:\Data\Sources\trunk\mediaportal/xbmc/bin/Release/keymap.xml 2006-04-01 23:31:07.046875000 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-
+
<keymap>
<global>
<action>
diff -u -r D:\Data\Sources\trunk\mediaportal/xbmc/MediaPortal.csproj.orig D:\Data\Sources\trunk\mediaportal/xbmc/MediaPortal.csproj
--- D:\Data\Sources\trunk\mediaportal/xbmc/MediaPortal.csproj.orig 2006-04-01 19:30:30.218750000 +0200
+++ D:\Data\Sources\trunk\mediaportal/xbmc/MediaPortal.csproj 2006-04-01 21:59:08.093750000 +0200
@@ -270,6 +270,7 @@
<Compile Include="ThreadMessageFilter.cs" />
<EmbeddedResource Include="CodecsForm.resx">
<DependentUpon>CodecsForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="d3dapp.resx">
<DependentUpon>d3dapp.cs</DependentUpon>