Audiosáv választásának lehetősége
authorOmar Sweidan <omar.sweidan@userrendszerhaz.hu>
Wed, 25 May 2022 09:57:51 +0000 (11:57 +0200)
committerOmar Sweidan <omar.sweidan@userrendszerhaz.hu>
Thu, 26 May 2022 09:01:57 +0000 (11:01 +0200)
client/DxPlay/Controls/PlayerControls.Designer.cs
client/DxPlay/Controls/PlayerControls.cs
client/DxPlay/DxPlayer.cs
client/DxPlay/LAVInterfaces.cs
client/DxPlay/PlayerForm.Designer.cs
client/DxPlay/PlayerForm.cs
client/DxPlay/PlayerForm.resx
client/DxPlay/PlayerGraph.cs

index 449bc60ef1745a35892a87c4a9362b796b7ebd7a..35083e2ac04f10e30360534d98788bd7522eb96c 100644 (file)
@@ -1,4 +1,7 @@
-namespace DxPlay.Controls\r
+using System;\r
+using System.Windows.Forms;\r
+\r
+namespace DxPlay.Controls\r
 {\r
     partial class PlayerControls\r
     {\r
@@ -48,6 +51,8 @@
             this.btnForward = new MaestroShared.Controls.NoFocusCueButton();\r
             this.lblPlaySpeed = new System.Windows.Forms.Label();\r
             this.playSpeed = new DxPlay.Controls.VideoSpeedTrackbar();\r
+            this.audioLabel = new System.Windows.Forms.Label();\r
+            this.audioTracks = new System.Windows.Forms.ComboBox();\r
             this.logoPanel = new System.Windows.Forms.Panel();\r
             this.mainPanel.SuspendLayout();\r
             this.timecodePanel.SuspendLayout();\r
             this.controlsPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
             this.controlsPanel.Size = new System.Drawing.Size(1105, 126);\r
             this.controlsPanel.TabIndex = 21;\r
-            this.controlsPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.controlsPanel_Paint);\r
             // \r
             // buttonsPanel\r
             // \r
             this.buttonsPanel.Controls.Add(this.btnForward);\r
             this.buttonsPanel.Controls.Add(this.lblPlaySpeed);\r
             this.buttonsPanel.Controls.Add(this.playSpeed);\r
+            this.buttonsPanel.Controls.Add(this.audioLabel);\r
+            this.buttonsPanel.Controls.Add(this.audioTracks);\r
             this.buttonsPanel.Dock = System.Windows.Forms.DockStyle.Left;\r
             this.buttonsPanel.Location = new System.Drawing.Point(0, 0);\r
             this.buttonsPanel.Margin = new System.Windows.Forms.Padding(0);\r
             this.buttonsPanel.Name = "buttonsPanel";\r
-            this.buttonsPanel.Size = new System.Drawing.Size(731, 126);\r
+            this.buttonsPanel.Size = new System.Drawing.Size(844, 126);\r
             this.buttonsPanel.TabIndex = 20;\r
             // \r
             // btnPlay\r
             this.btnRewind.FlatAppearance.BorderSize = 0;\r
             this.btnRewind.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnRewind.Image = ((System.Drawing.Image)(resources.GetObject("btnRewind.Image")));\r
-            this.btnRewind.Location = new System.Drawing.Point(193, 4);\r
+            this.btnRewind.Location = new System.Drawing.Point(84, 4);\r
             this.btnRewind.Margin = new System.Windows.Forms.Padding(4);\r
             this.btnRewind.Name = "btnRewind";\r
             this.btnRewind.Size = new System.Drawing.Size(72, 66);\r
             this.btnStepBack.FlatAppearance.BorderSize = 0;\r
             this.btnStepBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnStepBack.Image = global::DxPlay.Properties.Resources.baseline_skip_previous_black_24dp;\r
-            this.btnStepBack.Location = new System.Drawing.Point(273, 4);\r
+            this.btnStepBack.Location = new System.Drawing.Point(164, 4);\r
             this.btnStepBack.Margin = new System.Windows.Forms.Padding(4);\r
             this.btnStepBack.Name = "btnStepBack";\r
             this.btnStepBack.Size = new System.Drawing.Size(72, 66);\r
             this.btnStop.FlatAppearance.BorderSize = 0;\r
             this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnStop.Image = global::DxPlay.Properties.Resources.ic_stop_black_24dp_2x;\r
-            this.btnStop.Location = new System.Drawing.Point(353, 4);\r
+            this.btnStop.Location = new System.Drawing.Point(244, 4);\r
             this.btnStop.Margin = new System.Windows.Forms.Padding(4);\r
             this.btnStop.Name = "btnStop";\r
             this.btnStop.Size = new System.Drawing.Size(72, 66);\r
             this.btnStepForward.FlatAppearance.BorderSize = 0;\r
             this.btnStepForward.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnStepForward.Image = global::DxPlay.Properties.Resources.baseline_skip_next_black_24dp;\r
-            this.btnStepForward.Location = new System.Drawing.Point(433, 4);\r
+            this.btnStepForward.Location = new System.Drawing.Point(324, 4);\r
             this.btnStepForward.Margin = new System.Windows.Forms.Padding(4);\r
             this.btnStepForward.Name = "btnStepForward";\r
             this.btnStepForward.Size = new System.Drawing.Size(72, 66);\r
             this.btnForward.FlatAppearance.BorderSize = 0;\r
             this.btnForward.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnForward.Image = global::DxPlay.Properties.Resources.baseline_fast_forward_black_24dp;\r
-            this.btnForward.Location = new System.Drawing.Point(513, 4);\r
+            this.btnForward.Location = new System.Drawing.Point(404, 4);\r
             this.btnForward.Margin = new System.Windows.Forms.Padding(4);\r
             this.btnForward.Name = "btnForward";\r
             this.btnForward.Size = new System.Drawing.Size(72, 66);\r
             this.btnForward.TabStop = false;\r
             this.btnForward.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
             this.btnForward.UseVisualStyleBackColor = false;\r
-            //\r
+            // \r
             // lblPlaySpeed\r
             // \r
             this.lblPlaySpeed.AutoSize = true;\r
-            this.lblPlaySpeed.Location = new System.Drawing.Point(83, 0);\r
+            this.lblPlaySpeed.Location = new System.Drawing.Point(483, 0);\r
             this.lblPlaySpeed.Name = "lblPlaySpeed";\r
             this.lblPlaySpeed.Size = new System.Drawing.Size(22, 17);\r
             this.lblPlaySpeed.TabIndex = 27;\r
             // \r
             this.playSpeed.CurrentSpeed = 0F;\r
             this.playSpeed.LargeChange = 1;\r
-            this.playSpeed.Location = new System.Drawing.Point(592, 3);\r
+            this.playSpeed.Location = new System.Drawing.Point(511, 2);\r
+            this.playSpeed.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);\r
             this.playSpeed.Maximum = 5;\r
             this.playSpeed.Name = "playSpeed";\r
-            this.playSpeed.Size = new System.Drawing.Size(136, 56);\r
+            this.playSpeed.Size = new System.Drawing.Size(106, 56);\r
             this.playSpeed.TabIndex = 26;\r
             this.playSpeed.Tag = "PlaySpeed";\r
             this.playSpeed.TickStyle = System.Windows.Forms.TickStyle.None;\r
             this.playSpeed.Value = 2;\r
             // \r
+            // audioLabel\r
+            // \r
+            this.audioLabel.AutoSize = true;\r
+            this.audioLabel.Location = new System.Drawing.Point(623, 0);\r
+            this.audioLabel.Name = "audioLabel";\r
+            this.audioLabel.Size = new System.Drawing.Size(44, 17);\r
+            this.audioLabel.TabIndex = 28;\r
+            this.audioLabel.Tag = "";\r
+            this.audioLabel.Text = "Audio";\r
+            this.audioLabel.Visible = false;\r
+            // \r
+            // audioTracks\r
+            // \r
+            this.audioTracks.AllowDrop = true;\r
+            this.audioTracks.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\r
+            this.audioTracks.FormattingEnabled = true;\r
+            this.audioTracks.IntegralHeight = false;\r
+            this.audioTracks.ItemHeight = 16;\r
+            this.audioTracks.Location = new System.Drawing.Point(673, 3);\r
+            this.audioTracks.Name = "audioTracks";\r
+            this.audioTracks.Size = new System.Drawing.Size(168, 24);\r
+            this.audioTracks.TabIndex = 29;\r
+            this.audioTracks.Visible = false;\r
+            // \r
             // logoPanel\r
             // \r
             this.logoPanel.AutoSize = true;\r
             ((System.ComponentModel.ISupportInitialize)(this.playSpeed)).EndInit();\r
             this.ResumeLayout(false);\r
 \r
-        }\r
+        }        \r
 \r
         #endregion\r
 \r
         private MaestroShared.Controls.NoFocusCueButton btnStepForward;\r
         private VideoSpeedTrackbar playSpeed;\r
         private System.Windows.Forms.Label lblPlaySpeed;\r
+        private Label audioLabel;\r
+        private ComboBox audioTracks;\r
     }\r
 }
\ No newline at end of file
index 98e6e8f88ec02e5092065f6c5a0b14c85ead0328..6bee2b3e2d4d338b2c5639cacbec4c69b31ce74c 100644 (file)
@@ -30,10 +30,7 @@ namespace DxPlay.Controls
         public NoFocusCueButton StepForward { get => btnStepForward; }\r
         public Label PlaySpeedLabel { get => lblPlaySpeed; }\r
         public VideoSpeedTrackbar PlaySpeed { get => playSpeed; }\r
-\r
-        private void controlsPanel_Paint(object sender, PaintEventArgs e)\r
-        {\r
-\r
-        }\r
+        public Label AudioLabel { get => audioLabel; }\r
+        public ComboBox AudioTracks { get => audioTracks; }\r
     }\r
 }
\ No newline at end of file
index 24f7fc802b742889c5a3f0222971320f5e53b227..689b845d9fe8676ad9d57f748370c30cd3f0e162 100644 (file)
@@ -588,5 +588,13 @@ namespace DxPlay {
                 Graph.MediaSeeking.SetRate(value);\r
             }\r
         }\r
+\r
+        public void SetAudioTrack(int selectedTrackIndex)\r
+        {\r
+            if (Graph != null)\r
+            {\r
+                Graph.SetAudioTrack(selectedTrackIndex);\r
+            }\r
+        }\r
     }\r
 }\r
index 3aab20c6d55dfa9008918b859c7242e52bc53e12..ef7e8b4f11976c8cc8fe6d47eeb39cb77a9b10ba 100644 (file)
@@ -922,7 +922,7 @@ namespace DxPlay {
         /// <summary>\r
         /// Gets the IFileSourceFilter interface for the LAVSplitter filter - you must release this when finished using it with Marshal.ReleaseComObject\r
         /// </summary>\r
-        /// <param name="settings">Get the Lav splitter settings interface used to control the splitter filter\r
+        /// <param name="settings">Get the Lav Splitter settings interface used to control the Splitter filter\r
         ///  - you must release this when finished using it with Marshal.ReleaseComObject</param>\r
         /// <param name="subDir">subdirectory of your app where you store codec files (LAV*.ax) - default "codecs\"</param>\r
         /// <returns>LAVSplitterSource filter to put into filterGraph - set the filesource on it and release when finished</returns>           \r
@@ -1021,7 +1021,7 @@ namespace DxPlay {
         /// <summary>\r
         /// Gets the IBaseFilter interface for the LAVSplitter filter - you must release this when finished using it with Marshal.ReleaseComObject\r
         /// </summary>\r
-        /// <param name="settings">Get the Lav splitter settings interface used to control the splitter filter\r
+        /// <param name="settings">Get the Lav Splitter settings interface used to control the Splitter filter\r
         ///  - you must release this when finished using it with Marshal.ReleaseComObject</param>\r
         /// <param name="subDir">subdirectory of your app where you store codec files (LAV*.ax) - default "codecs\"</param>\r
         /// <returns>LAVSplitter filter to put into filterGraph - release when finished</returns>                              \r
index e745714fcb8bbd4411b2fdae43bfec7b08d89b84..1a51f19a03095abc07104d1e6e1aef7572b8b6f2 100644 (file)
@@ -88,7 +88,7 @@ namespace DxPlay {
             this.pVideo.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.pVideo.Location = new System.Drawing.Point(0, 0);\r
             this.pVideo.Name = "pVideo";\r
-            this.pVideo.Size = new System.Drawing.Size(478, 363);\r
+            this.pVideo.Size = new System.Drawing.Size(472, 295);\r
             this.pVideo.TabIndex = 0;\r
             this.pVideo.TabStop = true;\r
             this.pVideo.SizeChanged += new System.EventHandler(this.Panel1_SizeChanged);\r
@@ -99,7 +99,7 @@ namespace DxPlay {
             this.mainSplit.BackColor = System.Drawing.Color.Black;\r
             this.mainSplit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
             this.mainSplit.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.mainSplit.Location = new System.Drawing.Point(0, 24);\r
+            this.mainSplit.Location = new System.Drawing.Point(0, 28);\r
             this.mainSplit.Name = "mainSplit";\r
             // \r
             // mainSplit.Panel1\r
@@ -111,8 +111,8 @@ namespace DxPlay {
             this.mainSplit.Panel2.Controls.Add(this.tableLayoutPanel1);\r
             this.mainSplit.Panel2.Controls.Add(this.pMetadataDisplay);\r
             this.mainSplit.Panel2MinSize = 300;\r
-            this.mainSplit.Size = new System.Drawing.Size(784, 365);\r
-            this.mainSplit.SplitterDistance = 480;\r
+            this.mainSplit.Size = new System.Drawing.Size(931, 297);\r
+            this.mainSplit.SplitterDistance = 474;\r
             this.mainSplit.TabIndex = 20;\r
             // \r
             // panelPlayer\r
@@ -121,7 +121,7 @@ namespace DxPlay {
             this.panelPlayer.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.panelPlayer.Location = new System.Drawing.Point(0, 0);\r
             this.panelPlayer.Name = "panelPlayer";\r
-            this.panelPlayer.Size = new System.Drawing.Size(478, 363);\r
+            this.panelPlayer.Size = new System.Drawing.Size(472, 295);\r
             this.panelPlayer.TabIndex = 0;\r
             // \r
             // tableLayoutPanel1\r
@@ -137,7 +137,7 @@ namespace DxPlay {
             this.tableLayoutPanel1.Name = "tableLayoutPanel1";\r
             this.tableLayoutPanel1.RowCount = 1;\r
             this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));\r
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(298, 300);\r
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(451, 223);\r
             this.tableLayoutPanel1.TabIndex = 4;\r
             // \r
             // tabEditor\r
@@ -148,13 +148,13 @@ namespace DxPlay {
             this.tabEditor.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.tabEditor.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
             this.tabEditor.ImageList = this.imagesTabEdit;\r
-            this.tabEditor.Location = new System.Drawing.Point(23, 4);\r
+            this.tabEditor.Location = new System.Drawing.Point(28, 4);\r
             this.tabEditor.Margin = new System.Windows.Forms.Padding(0, 4, 4, 4);\r
             this.tabEditor.Multiline = true;\r
             this.tabEditor.Name = "tabEditor";\r
             this.tabEditor.Padding = new System.Drawing.Point(10, 5);\r
             this.tabEditor.SelectedIndex = 0;\r
-            this.tabEditor.Size = new System.Drawing.Size(271, 292);\r
+            this.tabEditor.Size = new System.Drawing.Size(419, 215);\r
             this.tabEditor.TabIndex = 2;\r
             // \r
             // tpMetadata\r
@@ -166,7 +166,7 @@ namespace DxPlay {
             this.tpMetadata.Location = new System.Drawing.Point(4, 4);\r
             this.tpMetadata.Name = "tpMetadata";\r
             this.tpMetadata.Padding = new System.Windows.Forms.Padding(3);\r
-            this.tpMetadata.Size = new System.Drawing.Size(263, 253);\r
+            this.tpMetadata.Size = new System.Drawing.Size(411, 176);\r
             this.tpMetadata.TabIndex = 0;\r
             this.tpMetadata.Text = "Metadata";\r
             // \r
@@ -179,7 +179,7 @@ namespace DxPlay {
             this.trafficBrowser.Margin = new System.Windows.Forms.Padding(0);\r
             this.trafficBrowser.Name = "trafficBrowser";\r
             this.trafficBrowser.Parameters = null;\r
-            this.trafficBrowser.Size = new System.Drawing.Size(257, 247);\r
+            this.trafficBrowser.Size = new System.Drawing.Size(405, 170);\r
             this.trafficBrowser.TabIndex = 0;\r
             // \r
             // tpSegments\r
@@ -191,7 +191,7 @@ namespace DxPlay {
             this.tpSegments.Location = new System.Drawing.Point(4, 4);\r
             this.tpSegments.Name = "tpSegments";\r
             this.tpSegments.Padding = new System.Windows.Forms.Padding(3);\r
-            this.tpSegments.Size = new System.Drawing.Size(214, 192);\r
+            this.tpSegments.Size = new System.Drawing.Size(315, 145);\r
             this.tpSegments.TabIndex = 1;\r
             this.tpSegments.Text = "Segments";\r
             this.tpSegments.UseVisualStyleBackColor = true;\r
@@ -216,13 +216,13 @@ namespace DxPlay {
             this.dgSegments.DefaultCellStyle = dataGridViewCellStyle1;\r
             this.dgSegments.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.dgSegments.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;\r
-            this.dgSegments.Location = new System.Drawing.Point(3, 28);\r
+            this.dgSegments.Location = new System.Drawing.Point(3, 32);\r
             this.dgSegments.MultiSelect = false;\r
             this.dgSegments.Name = "dgSegments";\r
             this.dgSegments.RowHeadersVisible = false;\r
             this.dgSegments.RowHeadersWidth = 51;\r
             this.dgSegments.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;\r
-            this.dgSegments.Size = new System.Drawing.Size(208, 161);\r
+            this.dgSegments.Size = new System.Drawing.Size(309, 110);\r
             this.dgSegments.TabIndex = 1;\r
             this.dgSegments.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.OnSegmentsCellBeginEdit);\r
             this.dgSegments.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.OnSegmentsCellContentClick);\r
@@ -249,7 +249,7 @@ namespace DxPlay {
             this.segmentActions.Location = new System.Drawing.Point(3, 3);\r
             this.segmentActions.Name = "segmentActions";\r
             this.segmentActions.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;\r
-            this.segmentActions.Size = new System.Drawing.Size(208, 25);\r
+            this.segmentActions.Size = new System.Drawing.Size(309, 29);\r
             this.segmentActions.TabIndex = 0;\r
             this.segmentActions.Text = "toolStrip1";\r
             // \r
@@ -260,14 +260,14 @@ namespace DxPlay {
             this.tbDefineSegment.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.tbDefineSegment.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.tbDefineSegment.Name = "tbDefineSegment";\r
-            this.tbDefineSegment.Size = new System.Drawing.Size(23, 22);\r
+            this.tbDefineSegment.Size = new System.Drawing.Size(29, 26);\r
             this.tbDefineSegment.Text = "toolStripButton5";\r
             this.tbDefineSegment.Click += new System.EventHandler(this.OnDefineOneSegmentClick);\r
             // \r
             // toolStripSeparator2\r
             // \r
             this.toolStripSeparator2.Name = "toolStripSeparator2";\r
-            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);\r
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 29);\r
             // \r
             // tbPositionAsTCIn\r
             // \r
@@ -276,7 +276,7 @@ namespace DxPlay {
             this.tbPositionAsTCIn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.tbPositionAsTCIn.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.tbPositionAsTCIn.Name = "tbPositionAsTCIn";\r
-            this.tbPositionAsTCIn.Size = new System.Drawing.Size(23, 22);\r
+            this.tbPositionAsTCIn.Size = new System.Drawing.Size(29, 26);\r
             this.tbPositionAsTCIn.Text = "toolStripButton1";\r
             this.tbPositionAsTCIn.Click += new System.EventHandler(this.OnActualPositionToTCInToolStripMenuItem1Click);\r
             // \r
@@ -287,7 +287,7 @@ namespace DxPlay {
             this.tbSplitSegment.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.tbSplitSegment.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.tbSplitSegment.Name = "tbSplitSegment";\r
-            this.tbSplitSegment.Size = new System.Drawing.Size(23, 22);\r
+            this.tbSplitSegment.Size = new System.Drawing.Size(29, 26);\r
             this.tbSplitSegment.Text = "toolStripButton4";\r
             this.tbSplitSegment.Click += new System.EventHandler(this.OnSplitSegmentAtCurrentPositionClick);\r
             // \r
@@ -298,14 +298,14 @@ namespace DxPlay {
             this.tbPositionAsTCOut.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.tbPositionAsTCOut.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.tbPositionAsTCOut.Name = "tbPositionAsTCOut";\r
-            this.tbPositionAsTCOut.Size = new System.Drawing.Size(23, 22);\r
+            this.tbPositionAsTCOut.Size = new System.Drawing.Size(29, 26);\r
             this.tbPositionAsTCOut.Text = "toolStripButton2";\r
             this.tbPositionAsTCOut.Click += new System.EventHandler(this.OnActualPositionToTCOutToolStripMenuItem1Click);\r
             // \r
             // toolStripSeparator1\r
             // \r
             this.toolStripSeparator1.Name = "toolStripSeparator1";\r
-            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);\r
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 29);\r
             // \r
             // tbDeleteSegment\r
             // \r
@@ -314,7 +314,7 @@ namespace DxPlay {
             this.tbDeleteSegment.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;\r
             this.tbDeleteSegment.ImageTransparentColor = System.Drawing.Color.Magenta;\r
             this.tbDeleteSegment.Name = "tbDeleteSegment";\r
-            this.tbDeleteSegment.Size = new System.Drawing.Size(23, 22);\r
+            this.tbDeleteSegment.Size = new System.Drawing.Size(29, 26);\r
             this.tbDeleteSegment.Text = "toolStripButton3";\r
             this.tbDeleteSegment.Click += new System.EventHandler(this.OnDeleteSegmentClick);\r
             // \r
@@ -334,7 +334,7 @@ namespace DxPlay {
             this.btnToggleSegmentEditor.Location = new System.Drawing.Point(0, 4);\r
             this.btnToggleSegmentEditor.Margin = new System.Windows.Forms.Padding(0, 4, 0, 0);\r
             this.btnToggleSegmentEditor.Name = "btnToggleSegmentEditor";\r
-            this.btnToggleSegmentEditor.Size = new System.Drawing.Size(23, 63);\r
+            this.btnToggleSegmentEditor.Size = new System.Drawing.Size(28, 72);\r
             this.btnToggleSegmentEditor.TabIndex = 0;\r
             this.btnToggleSegmentEditor.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
             this.btnToggleSegmentEditor.UseVisualStyleBackColor = false;\r
@@ -350,13 +350,13 @@ namespace DxPlay {
             this.pMetadataDisplay.Controls.Add(this.labelSelectedMetadata, 0, 0);\r
             this.pMetadataDisplay.Controls.Add(this.txtSelectedID, 0, 1);\r
             this.pMetadataDisplay.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.pMetadataDisplay.Location = new System.Drawing.Point(0, 300);\r
+            this.pMetadataDisplay.Location = new System.Drawing.Point(0, 223);\r
             this.pMetadataDisplay.Margin = new System.Windows.Forms.Padding(0);\r
             this.pMetadataDisplay.Name = "pMetadataDisplay";\r
             this.pMetadataDisplay.RowCount = 2;\r
             this.pMetadataDisplay.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
             this.pMetadataDisplay.RowStyles.Add(new System.Windows.Forms.RowStyle());\r
-            this.pMetadataDisplay.Size = new System.Drawing.Size(298, 63);\r
+            this.pMetadataDisplay.Size = new System.Drawing.Size(451, 72);\r
             this.pMetadataDisplay.TabIndex = 5;\r
             // \r
             // btnApprove\r
@@ -368,10 +368,10 @@ namespace DxPlay {
             this.btnApprove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
             this.btnApprove.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
             this.btnApprove.Image = ((System.Drawing.Image)(resources.GetObject("btnApprove.Image")));\r
-            this.btnApprove.Location = new System.Drawing.Point(196, 29);\r
+            this.btnApprove.Location = new System.Drawing.Point(340, 32);\r
             this.btnApprove.Margin = new System.Windows.Forms.Padding(0, 4, 0, 0);\r
             this.btnApprove.Name = "btnApprove";\r
-            this.btnApprove.Size = new System.Drawing.Size(102, 30);\r
+            this.btnApprove.Size = new System.Drawing.Size(111, 30);\r
             this.btnApprove.TabIndex = 17;\r
             this.btnApprove.Text = "Approve";\r
             this.btnApprove.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;\r
@@ -388,7 +388,7 @@ namespace DxPlay {
             this.labelSelectedMetadata.Location = new System.Drawing.Point(3, 0);\r
             this.labelSelectedMetadata.Name = "labelSelectedMetadata";\r
             this.labelSelectedMetadata.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);\r
-            this.labelSelectedMetadata.Size = new System.Drawing.Size(190, 25);\r
+            this.labelSelectedMetadata.Size = new System.Drawing.Size(334, 28);\r
             this.labelSelectedMetadata.TabIndex = 13;\r
             this.labelSelectedMetadata.Text = "Selected metadata";\r
             // \r
@@ -398,9 +398,9 @@ namespace DxPlay {
             this.txtSelectedID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\r
             this.txtSelectedID.Dock = System.Windows.Forms.DockStyle.Fill;\r
             this.txtSelectedID.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));\r
-            this.txtSelectedID.Location = new System.Drawing.Point(3, 28);\r
+            this.txtSelectedID.Location = new System.Drawing.Point(3, 31);\r
             this.txtSelectedID.Name = "txtSelectedID";\r
-            this.txtSelectedID.Size = new System.Drawing.Size(190, 32);\r
+            this.txtSelectedID.Size = new System.Drawing.Size(334, 38);\r
             this.txtSelectedID.TabIndex = 12;\r
             // \r
             // mainMenu\r
@@ -410,7 +410,7 @@ namespace DxPlay {
             this.fileToolStripMenuItem});\r
             this.mainMenu.Location = new System.Drawing.Point(0, 0);\r
             this.mainMenu.Name = "mainMenu";\r
-            this.mainMenu.Size = new System.Drawing.Size(784, 24);\r
+            this.mainMenu.Size = new System.Drawing.Size(931, 28);\r
             this.mainMenu.TabIndex = 21;\r
             this.mainMenu.Text = "menuStrip1";\r
             // \r
@@ -422,14 +422,14 @@ namespace DxPlay {
             this.toolStripSeparator3,\r
             this.menuRedefineSegments});\r
             this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";\r
-            this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\r
+            this.fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24);\r
             this.fileToolStripMenuItem.Text = "File";\r
             // \r
             // menuOpenFile\r
             // \r
             this.menuOpenFile.Name = "menuOpenFile";\r
             this.menuOpenFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\r
-            this.menuOpenFile.Size = new System.Drawing.Size(215, 22);\r
+            this.menuOpenFile.Size = new System.Drawing.Size(269, 26);\r
             this.menuOpenFile.Text = "Open file";\r
             this.menuOpenFile.Click += new System.EventHandler(this.MenuOpenFile_Click);\r
             // \r
@@ -437,20 +437,20 @@ namespace DxPlay {
             // \r
             this.menuApprove.Name = "menuApprove";\r
             this.menuApprove.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));\r
-            this.menuApprove.Size = new System.Drawing.Size(215, 22);\r
+            this.menuApprove.Size = new System.Drawing.Size(269, 26);\r
             this.menuApprove.Text = "Approve";\r
             this.menuApprove.Click += new System.EventHandler(this.OnApprove);\r
             // \r
             // toolStripSeparator3\r
             // \r
             this.toolStripSeparator3.Name = "toolStripSeparator3";\r
-            this.toolStripSeparator3.Size = new System.Drawing.Size(212, 6);\r
+            this.toolStripSeparator3.Size = new System.Drawing.Size(266, 6);\r
             // \r
             // menuRedefineSegments\r
             // \r
             this.menuRedefineSegments.Name = "menuRedefineSegments";\r
             this.menuRedefineSegments.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));\r
-            this.menuRedefineSegments.Size = new System.Drawing.Size(215, 22);\r
+            this.menuRedefineSegments.Size = new System.Drawing.Size(269, 26);\r
             this.menuRedefineSegments.Text = "Redefine segments";\r
             this.menuRedefineSegments.Click += new System.EventHandler(this.OnRedefineSegments);\r
             // \r
@@ -460,17 +460,17 @@ namespace DxPlay {
             this.flowLayoutPanel1.Controls.Add(this.btnSave);\r
             this.flowLayoutPanel1.Controls.Add(this.btnCancel);\r
             this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 532);\r
+            this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 528);\r
             this.flowLayoutPanel1.Name = "flowLayoutPanel1";\r
             this.flowLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;\r
-            this.flowLayoutPanel1.Size = new System.Drawing.Size(784, 29);\r
+            this.flowLayoutPanel1.Size = new System.Drawing.Size(931, 33);\r
             this.flowLayoutPanel1.TabIndex = 23;\r
             // \r
             // btnSave\r
             // \r
-            this.btnSave.Location = new System.Drawing.Point(706, 3);\r
+            this.btnSave.Location = new System.Drawing.Point(838, 3);\r
             this.btnSave.Name = "btnSave";\r
-            this.btnSave.Size = new System.Drawing.Size(75, 23);\r
+            this.btnSave.Size = new System.Drawing.Size(90, 27);\r
             this.btnSave.TabIndex = 0;\r
             this.btnSave.Text = "Save";\r
             this.btnSave.UseVisualStyleBackColor = true;\r
@@ -478,9 +478,9 @@ namespace DxPlay {
             // \r
             // btnCancel\r
             // \r
-            this.btnCancel.Location = new System.Drawing.Point(625, 3);\r
+            this.btnCancel.Location = new System.Drawing.Point(742, 3);\r
             this.btnCancel.Name = "btnCancel";\r
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);\r
+            this.btnCancel.Size = new System.Drawing.Size(90, 27);\r
             this.btnCancel.TabIndex = 1;\r
             this.btnCancel.Text = "Cancel";\r
             this.btnCancel.UseVisualStyleBackColor = true;\r
@@ -492,25 +492,25 @@ namespace DxPlay {
             this.playerControls.BackColor = System.Drawing.Color.Transparent;\r
             this.playerControls.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;\r
             this.playerControls.Dock = System.Windows.Forms.DockStyle.Bottom;\r
-            this.playerControls.Location = new System.Drawing.Point(0, 389);\r
+            this.playerControls.Location = new System.Drawing.Point(0, 325);\r
             this.playerControls.Margin = new System.Windows.Forms.Padding(0);\r
             this.playerControls.Name = "playerControls";\r
-            this.playerControls.Size = new System.Drawing.Size(784, 143);\r
+            this.playerControls.Size = new System.Drawing.Size(931, 203);\r
             this.playerControls.TabIndex = 22;\r
             // \r
             // PlayerForm\r
             // \r
             this.AllowDrop = true;\r
-            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
+            this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);\r
             this.BackColor = System.Drawing.Color.White;\r
-            this.ClientSize = new System.Drawing.Size(784, 561);\r
+            this.ClientSize = new System.Drawing.Size(931, 561);\r
             this.Controls.Add(this.mainSplit);\r
             this.Controls.Add(this.mainMenu);\r
             this.Controls.Add(this.playerControls);\r
             this.Controls.Add(this.flowLayoutPanel1);\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
             this.KeyPreview = true;\r
-            this.MinimumSize = new System.Drawing.Size(640, 480);\r
+            this.MinimumSize = new System.Drawing.Size(768, 554);\r
             this.Name = "PlayerForm";\r
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
             this.Text = "MediaCube Player";\r
index 7c744435271604e2daa838e5f65e24273d5b637a..2dfb06da542dd5678d9e271b31b2f0f339539bfc 100644 (file)
@@ -1,3 +1,4 @@
+using DirectShowLib;\r
 using DxPlay.Controls;\r
 using DxPlay.Model;\r
 using DxPlay.Properties;\r
@@ -118,10 +119,11 @@ namespace DxPlay {
             playerControls.StepForward.MouseUp += OnStepForwardMouseUp;\r
             playerControls.StepForward.MouseDown += OnStepForwardMouseDown;\r
             playerControls.PlaySpeed.ValueChanged += OnPlaySpeedChanged;\r
+            playerControls.AudioTracks.SelectedIndexChanged += OnAudioTrackSelected;\r
 \r
             playerControls.TrackBar.MouseDown += OnTrackBarMouseDown;\r
             playerControls.TrackBar.MouseUp += OnTrackBarMouseUp;\r
-            playerControls.TrackBar.Scroll += OnTrackBarScroll;\r
+            playerControls.TrackBar.Scroll += OnTrackBarScroll;            \r
         }\r
 \r
         private void InitializeTexts() {\r
@@ -210,6 +212,17 @@ namespace DxPlay {
             }\r
             model.IsRedefineSegments = redefine;\r
 \r
+            if (m_play != null)\r
+            {\r
+                m_play.Graph.SearchAudioTracks(m_play.Graph.Splitter);\r
+                if (m_play.Graph.AudioCount > 1) { \r
+                    playerControls.AudioLabel.Visible = true;\r
+                    m_play.Graph.AvailableAudioTracks = new List<string>(m_play.Graph.AudioCount);\r
+                    m_play.Graph.SearchAudioTracks(m_play.Graph.Splitter);\r
+                    playerControls.AudioTracks.DataSource = m_play.Graph.AvailableAudioTracks;\r
+                    playerControls.AudioTracks.Visible = true;\r
+                }\r
+            }\r
 \r
             //for (int i = 0; i < 100; i++) {\r
             //    m_play.Seek(i);\r
@@ -297,7 +310,6 @@ namespace DxPlay {
             }\r
         }\r
 \r
-\r
         private bool buttonDown;\r
 \r
         private void OnRewindMouseUp(object sender, MouseEventArgs e) {\r
@@ -608,5 +620,13 @@ namespace DxPlay {
             SetVideoSpeed((sender as VideoSpeedTrackbar).CurrentSpeed);\r
             playerControls.PlaySpeedLabel.Text = "x" + (sender as VideoSpeedTrackbar).CurrentSpeed.ToString();\r
         }\r
+        private void OnAudioTrackSelected(object sender, EventArgs e)\r
+        {\r
+            int selectedTrackIndex = (sender as ComboBox).SelectedIndex;\r
+            if (m_play != null)\r
+            {\r
+                m_play.SetAudioTrack(selectedTrackIndex);\r
+            }\r
+        }\r
     }\r
 }\r
index 11d3d89de8b5fe664bc1a7dc409f225e895f9db8..196f8add971126c5b7c8b53d31d0f99abc4d59de 100644 (file)
   <data name="tbDefineSegment.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC8SURBVDhP1ZO9DcIwFISfqKGjpaENG4S/GZiEOiWMkR2Y\r
+        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAC8SURBVDhP1ZO9DcIwFISfqKGjpaENG4S/GZiEOiWMkR2Y\r
         gREo2IEVaBDcOXnS48m24lRw0qf4nHeXxFLkZ3UC15GcQVAF3uAGYoM5mGF2BWTfG15LpdmdNb6Ib3ro\r
         lkkNKtJ9fgJLY9KZrTWpIvICLZgDq+Ii8gQNsNKZjTW5ogtYAq/BRXcQDjIhza6t8UVTMOmWSX0V8aBo\r
         joA3SmCG2RrIDDz6jTEwy46gBfBPi4WIn2M2K/9fKX8hkQ9xw2LrlhXH8QAAAABJRU5ErkJggg==\r
   <data name="tbPositionAsTCIn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABOSURBVDhPYxgFVAWOUJoiUALE/4HYB8wjE8AMmQbmkQmo\r
+        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABOSURBVDhPYxgFVAWOUJoiUALE/4HYB8wjE8AMmQbmkQmo\r
         asg8MI8C0ADEMIMYQQKUgG4gpoqrQABmGEXhBAMww3zBPAqBG5QeBWQBBgYAaigQp+qpuEkAAAAASUVO\r
         RK5CYII=\r
 </value>\r
   <data name="tbSplitSegment.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABlSURBVDhPYxjZ4AAUUwxGDUIFFUDcD2HCATaDQGoKIEzs\r
+        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABlSURBVDhPYxjZ4AAUUwxGDUIFFUDcD2HCATaDQGoKIEzs\r
         oIGRkfE/kEY2DN2gfqiaBggXN+hGMwzZIJgh3RAuYQAzrB2IYQa1k2oIDMAM+wHC5BoCA2DDKDUEBkAG\r
         UGzIkAUMDABv+SVD4UMwTwAAAABJRU5ErkJggg==\r
 </value>\r
   <data name="tbPositionAsTCOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABOSURBVDhPYxgFFAMnKE0R8APi/0BcAuZRCKYBMdUMmwfE\r
+        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABOSURBVDhPYxgFFAMnKE0R8APi/0BcAuZRCKYBMdUMmwfE\r
         VDGMEYiXADHFhoEMgrmqASRADkA2pBskQC6giiH+QEyxITDgBqVHAcWAgQEAtZ4QxOLkcD0AAAAASUVO\r
         RK5CYII=\r
 </value>\r
   <data name="tbDeleteSegment.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
     <value>\r
         iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABvSURBVDhPYxhZwBVK4wOOUBoncAPi/0DcDuZhByA5kBon\r
+        YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAABvSURBVDhPYxhZwBVK4wOOUBoncAPi/0DcDuZhByA5kBon\r
         MA8P6AdiXIbBDAGpIQpgM4xkQ2AAZlg9EDdA2SQbAgPTgBhkAEWGgADMVRQZBDME5C2yvQYzhKLAxmYI\r
         DBBtGFUTJDFZhBg1wwMwMAAAvx8nVwi8b+UAAAAASUVORK5CYII=\r
 </value>\r
         AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w\r
         LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0\r
         ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo\r
-        CAAAAk1TRnQBSQFMAgEBAgEAAZgBAgGYAQIBGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo\r
+        CAAAAk1TRnQBSQFMAgEBAgEAATgBAwE4AQMBGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo\r
         AwABYAMAARgDAAEBAQABCAYAAQkYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA\r
         AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5\r
         AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA\r
index 2f832641dc7d9d89f11e093755f4c2bf3127fbea..8fad9c5a7c759d13e92722e7c8b5d9fd5f4510a1 100644 (file)
@@ -3,6 +3,7 @@ using DirectShowLib.Utils;
 using MaestroShared.Commons;\r
 using NLog;\r
 using System;\r
+using System.Collections.Generic;\r
 using System.Runtime.InteropServices;\r
 \r
 namespace DxPlay {\r
@@ -19,6 +20,9 @@ namespace DxPlay {
         //public IVMRWindowlessControl9 WindowlessControl { get; private set; }\r
 \r
         private bool isDisposed;\r
+        public int AudioCount { get; set; }\r
+        public List<string> AvailableAudioTracks { get; set; }\r
+        public IBaseFilter Splitter { get; set; }\r
 \r
         public PlayerGraph(string fileName, IntPtr handle, VideoRendererType rendererType)\r
         {\r
@@ -35,12 +39,12 @@ namespace DxPlay {
                 logger.Debug("Add SourceFilter to graph");\r
                 DsError.ThrowExceptionForHR(graphBuilder.AddSourceFilter(fileName, fileName, out IBaseFilter sourceFilter));\r
 \r
-                IBaseFilter splitter = AddSplitter(graphBuilder, sourceFilter);\r
+                Splitter = AddSplitter(graphBuilder, sourceFilter);\r
                 bool audioOnly = true;\r
-                if (DsFindPin.ByName(splitter, "Video") != null)\r
+                if (DsFindPin.ByName(Splitter, "Video") != null)\r
                 {\r
                     audioOnly = false;\r
-                    IBaseFilter videoDecoder = AddVideoDecoder(graphBuilder, splitter);\r
+                    IBaseFilter videoDecoder = AddVideoDecoder(graphBuilder, Splitter);\r
                     EnableDeinterlace(videoDecoder);\r
                     IBaseFilter sampleGrabber = AddSampleGrabber(graphBuilder, videoDecoder);\r
                     SampleGrabber = (ISampleGrabber)sampleGrabber;\r
@@ -64,16 +68,15 @@ namespace DxPlay {
                             break;\r
                     }\r
                     FilterGraphTools.RenderPin(graphBuilder, sampleGrabber, "Output");\r
-                    ConfigureSimpleRenderer(handle);\r
-\r
+                    ConfigureSimpleRenderer(handle);                    \r
                 }\r
                 else\r
                 {\r
                     logger.Warn("Video pin not available");\r
                 }\r
-                if (DsFindPin.ByName(splitter, "Audio") != null)\r
+                if (DsFindPin.ByName(Splitter, "Audio") != null)\r
                 {\r
-                    IBaseFilter audioDecoder = AddAudioDecoder(graphBuilder, splitter);\r
+                    IBaseFilter audioDecoder = AddAudioDecoder(graphBuilder, Splitter);\r
                     if (audioOnly)\r
                     {\r
                         throw new Exception("Audio only file is not supported.");\r
@@ -83,24 +86,14 @@ namespace DxPlay {
                     }\r
                     else\r
                         FilterGraphTools.RenderPin(graphBuilder, audioDecoder, "Output");\r
-\r
-                    //TODO hang stream selector kivezetese a feluletre. 0. a video...\r
-                    /*\r
-                    IAMStreamSelect streamSelect = (IAMStreamSelect)splitter;\r
-                    if (streamSelect != null)\r
-                    {\r
-                        streamSelect.Enable(3, AMStreamSelectEnableFlags.Enable);\r
-                    }\r
-                    */\r
-\r
                 }\r
                 else\r
                 {\r
                     logger.Warn("Audio pin not available");\r
                 }\r
 \r
-                SearchAudioTracks(splitter);\r
-\r
+                SearchAudioTracks(Splitter);\r
+                SetAudioTrack(0);\r
             }\r
             catch (Exception e)\r
             {\r
@@ -250,27 +243,31 @@ namespace DxPlay {
             logger.Debug("Add LAVSplitter to graph");\r
             IBaseFilter splitter = LoadSplitter(graphBuilder);\r
             if (splitter == null) {\r
-                throw new Exception("Can not load splitter!");\r
+                throw new Exception("Can not load Splitter!");\r
             }\r
             logger.Debug("Connect SourceFilter -> LAVSplitter");\r
             FilterGraphTools.ConnectFilters(graphBuilder, sourceFilter, "Output", splitter, "Input", true);\r
             return splitter;\r
         }\r
 \r
-        private void SearchAudioTracks(IBaseFilter splitter)\r
+        public void SearchAudioTracks(IBaseFilter splitter)\r
         {\r
             IAMStreamSelect amStreamSelect = (IAMStreamSelect)splitter;\r
             if (amStreamSelect != null)\r
             {\r
                 amStreamSelect.Count(out int count);\r
-                int audioCount = 0;\r
+                AudioCount = 0;\r
                 for (int i = 0; i < count; i++)\r
                 {\r
-                    amStreamSelect.Info(i, out AMMediaType ppmt, out AMStreamSelectInfoFlags pdwFlags, out int plcid, out int pdwGroup, out string ppszName, out object ppObject, out object ppUnk);\r
+                    amStreamSelect.Info(i, out AMMediaType ppmt, out AMStreamSelectInfoFlags pdwFlags, out int plcid, out int pdwGroup, \r
+                        out string ppszName, out object ppObject, out object ppUnk);\r
                     if (ppmt.majorType == MediaType.Audio)\r
                     {\r
                         logger.Debug("Found audio channel");\r
-                        audioCount++;\r
+                        AudioCount++;\r
+                        if (AvailableAudioTracks != null && ppszName != null) { \r
+                            AvailableAudioTracks.Add(i+". "+ppszName); \r
+                        }\r
                     }\r
                     DsUtils.FreeAMMediaType(ppmt);\r
                     if (ppObject != null)\r
@@ -278,7 +275,7 @@ namespace DxPlay {
                     if (ppUnk != null)\r
                         DsUtils.ReleaseComObject(ppUnk);\r
                 }\r
-                logger.Debug("Audio count: " + audioCount);\r
+                logger.Debug("Audio count: " + AudioCount);\r
             }\r
         }\r
 \r
@@ -319,8 +316,8 @@ namespace DxPlay {
             if (splitter == null) \r
                 splitter = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Splitter");\r
 \r
-            //if (splitter != null)\r
-            //    graphBuilder.AddFilter(splitter, "LAV Splitter");\r
+            //if (Splitter != null)\r
+            //    graphBuilder.AddFilter(Splitter, "LAV Splitter");\r
             return splitter;\r
         }\r
 \r
@@ -353,5 +350,13 @@ namespace DxPlay {
             }\r
         }\r
 \r
+        public void SetAudioTrack(int selectedTrackIndex)\r
+        {\r
+            IAMStreamSelect streamSelect = (IAMStreamSelect)Splitter;\r
+            if (streamSelect != null)\r
+            {\r
+                streamSelect.Enable(selectedTrackIndex+1, AMStreamSelectEnableFlags.Enable);\r
+            }\r
+        }\r
     }\r
 }\r