|
From: <moi...@us...> - 2007-04-17 21:08:54
|
Revision: 340
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=340&view=rev
Author: moiristo
Date: 2007-04-17 14:08:51 -0700 (Tue, 17 Apr 2007)
Log Message:
-----------
- vlc opts are now created using arraylist
- improved the configuration form
Modified Paths:
--------------
trunk/plugins/VideoLAN/ConfigurationForm.cs
trunk/plugins/VideoLAN/VideoLAN.csproj
trunk/plugins/VideoLAN/VideoLAN.suo
trunk/plugins/VideoLAN/VideoLanPlugin.cs
Modified: trunk/plugins/VideoLAN/ConfigurationForm.cs
===================================================================
--- trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-17 17:42:39 UTC (rev 339)
+++ trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-17 21:08:51 UTC (rev 340)
@@ -41,21 +41,49 @@
/// </summary>
public class ConfigurationForm : System.Windows.Forms.Form
{
-
- private string m_enabledExt = "";
- private string m_enabledStreams = "";
private string bufsize = "";
private string m_deinterlace = "Disable";
- private MediaPortal.UserInterface.Controls.MPButton buttonEnable;
- private MediaPortal.UserInterface.Controls.MPTextBox extensionBox;
- private TextBox streamBox;
- private Label label1;
+ private MediaPortal.UserInterface.Controls.MPButton okBtn;
private GroupBox groupBox1;
- private Label label2;
private TextBox bufBox;
private Label label3;
private Label label4;
private ComboBox deintBox;
+ private GroupBox groupBox2;
+ private CheckBox checkBox6;
+ private CheckBox checkBox5;
+ private CheckBox checkBox4;
+ private CheckBox checkBox3;
+ private CheckBox checkBox2;
+ private CheckBox checkBox1;
+ private CheckBox checkBox19;
+ private CheckBox checkBox20;
+ private CheckBox checkBox21;
+ private CheckBox checkBox22;
+ private CheckBox checkBox23;
+ private CheckBox checkBox14;
+ private CheckBox checkBox15;
+ private CheckBox checkBox16;
+ private CheckBox checkBox17;
+ private CheckBox checkBox10;
+ private CheckBox checkBox11;
+ private CheckBox checkBox13;
+ private CheckBox checkBox7;
+ private CheckBox checkBox8;
+ private CheckBox checkBox9;
+ private Button allAudBtn;
+ private Button allVidBtn;
+ private GroupBox protBox;
+ private CheckBox httpOpt;
+ private CheckBox udpOpt;
+ private CheckBox rtspOpt;
+ private CheckBox mmsOpt;
+ private CheckBox checkBox27;
+ private Button cancelBtn;
+ private Button applyBtn;
+ private Panel audPanel;
+ private Panel vidPanel;
+ private bool isCancelled = false;
/// <summary>
/// Required designer variable.
/// </summary>
@@ -91,69 +119,75 @@
/// </summary>
private void InitializeComponent()
{
- this.buttonEnable = new MediaPortal.UserInterface.Controls.MPButton();
- this.extensionBox = new MediaPortal.UserInterface.Controls.MPTextBox();
- this.streamBox = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
+ this.okBtn = new MediaPortal.UserInterface.Controls.MPButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.deintBox = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
+ this.bufBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
- this.bufBox = new System.Windows.Forms.TextBox();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.audPanel = new System.Windows.Forms.Panel();
+ this.checkBox19 = new System.Windows.Forms.CheckBox();
+ this.checkBox20 = new System.Windows.Forms.CheckBox();
+ this.checkBox21 = new System.Windows.Forms.CheckBox();
+ this.checkBox22 = new System.Windows.Forms.CheckBox();
+ this.checkBox23 = new System.Windows.Forms.CheckBox();
+ this.checkBox14 = new System.Windows.Forms.CheckBox();
+ this.checkBox16 = new System.Windows.Forms.CheckBox();
+ this.checkBox17 = new System.Windows.Forms.CheckBox();
+ this.checkBox9 = new System.Windows.Forms.CheckBox();
+ this.checkBox4 = new System.Windows.Forms.CheckBox();
+ this.vidPanel = new System.Windows.Forms.Panel();
+ this.checkBox27 = new System.Windows.Forms.CheckBox();
+ this.checkBox15 = new System.Windows.Forms.CheckBox();
+ this.checkBox10 = new System.Windows.Forms.CheckBox();
+ this.checkBox11 = new System.Windows.Forms.CheckBox();
+ this.checkBox7 = new System.Windows.Forms.CheckBox();
+ this.checkBox8 = new System.Windows.Forms.CheckBox();
+ this.checkBox6 = new System.Windows.Forms.CheckBox();
+ this.checkBox5 = new System.Windows.Forms.CheckBox();
+ this.checkBox3 = new System.Windows.Forms.CheckBox();
+ this.checkBox2 = new System.Windows.Forms.CheckBox();
+ this.checkBox1 = new System.Windows.Forms.CheckBox();
+ this.allAudBtn = new System.Windows.Forms.Button();
+ this.allVidBtn = new System.Windows.Forms.Button();
+ this.checkBox13 = new System.Windows.Forms.CheckBox();
+ this.protBox = new System.Windows.Forms.GroupBox();
+ this.httpOpt = new System.Windows.Forms.CheckBox();
+ this.udpOpt = new System.Windows.Forms.CheckBox();
+ this.rtspOpt = new System.Windows.Forms.CheckBox();
+ this.mmsOpt = new System.Windows.Forms.CheckBox();
+ this.cancelBtn = new System.Windows.Forms.Button();
+ this.applyBtn = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.audPanel.SuspendLayout();
+ this.vidPanel.SuspendLayout();
+ this.protBox.SuspendLayout();
this.SuspendLayout();
//
- // buttonEnable
+ // okBtn
//
- this.buttonEnable.Location = new System.Drawing.Point(12, 163);
- this.buttonEnable.Name = "buttonEnable";
- this.buttonEnable.Size = new System.Drawing.Size(75, 23);
- this.buttonEnable.TabIndex = 3;
- this.buttonEnable.Text = "Save";
- this.buttonEnable.UseVisualStyleBackColor = true;
- this.buttonEnable.Click += new System.EventHandler(this.buttonEnable_Click);
+ this.okBtn.Location = new System.Drawing.Point(170, 367);
+ this.okBtn.Name = "okBtn";
+ this.okBtn.Size = new System.Drawing.Size(75, 23);
+ this.okBtn.TabIndex = 3;
+ this.okBtn.Text = "Ok";
+ this.okBtn.UseVisualStyleBackColor = true;
+ this.okBtn.Click += new System.EventHandler(this.buttonEnable_Click);
//
- // extensionBox
- //
- this.extensionBox.BorderColor = System.Drawing.Color.Empty;
- this.extensionBox.Location = new System.Drawing.Point(135, 25);
- this.extensionBox.Name = "extensionBox";
- this.extensionBox.Size = new System.Drawing.Size(256, 20);
- this.extensionBox.TabIndex = 4;
- //
- // streamBox
- //
- this.streamBox.Location = new System.Drawing.Point(135, 52);
- this.streamBox.Name = "streamBox";
- this.streamBox.Size = new System.Drawing.Size(256, 20);
- this.streamBox.TabIndex = 5;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(6, 28);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(115, 13);
- this.label1.TabIndex = 6;
- this.label1.Text = "Associated extensions:";
- //
// groupBox1
//
this.groupBox1.Controls.Add(this.deintBox);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.bufBox);
this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.label1);
- this.groupBox1.Controls.Add(this.streamBox);
- this.groupBox1.Controls.Add(this.extensionBox);
this.groupBox1.Location = new System.Drawing.Point(11, 12);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(411, 145);
+ this.groupBox1.Size = new System.Drawing.Size(222, 89);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
- this.groupBox1.Text = "General";
+ this.groupBox1.Text = "General settings";
//
// deintBox
//
@@ -167,15 +201,15 @@
"Linear",
"Mean",
"X"});
- this.deintBox.Location = new System.Drawing.Point(135, 107);
+ this.deintBox.Location = new System.Drawing.Point(104, 50);
this.deintBox.Name = "deintBox";
- this.deintBox.Size = new System.Drawing.Size(256, 21);
+ this.deintBox.Size = new System.Drawing.Size(110, 21);
this.deintBox.TabIndex = 11;
//
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(6, 107);
+ this.label4.Location = new System.Drawing.Point(6, 54);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 13);
this.label4.TabIndex = 10;
@@ -183,7 +217,7 @@
//
// bufBox
//
- this.bufBox.Location = new System.Drawing.Point(135, 80);
+ this.bufBox.Location = new System.Drawing.Point(104, 24);
this.bufBox.Name = "bufBox";
this.bufBox.Size = new System.Drawing.Size(59, 20);
this.bufBox.TabIndex = 9;
@@ -191,34 +225,398 @@
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(6, 83);
+ this.label3.Location = new System.Drawing.Point(6, 24);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(59, 13);
+ this.label3.Size = new System.Drawing.Size(92, 13);
this.label3.TabIndex = 8;
- this.label3.Text = "Buffer size:";
+ this.label3.Text = "Buffer size (in ms):";
//
- // label2
+ // groupBox2
//
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(6, 55);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(108, 13);
- this.label2.TabIndex = 7;
- this.label2.Text = "Associated protocols:";
+ this.groupBox2.Controls.Add(this.audPanel);
+ this.groupBox2.Controls.Add(this.vidPanel);
+ this.groupBox2.Controls.Add(this.allAudBtn);
+ this.groupBox2.Controls.Add(this.allVidBtn);
+ this.groupBox2.Location = new System.Drawing.Point(239, 12);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(169, 349);
+ this.groupBox2.TabIndex = 8;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Associated extensions";
//
+ // audPanel
+ //
+ this.audPanel.Controls.Add(this.checkBox19);
+ this.audPanel.Controls.Add(this.checkBox20);
+ this.audPanel.Controls.Add(this.checkBox21);
+ this.audPanel.Controls.Add(this.checkBox22);
+ this.audPanel.Controls.Add(this.checkBox23);
+ this.audPanel.Controls.Add(this.checkBox14);
+ this.audPanel.Controls.Add(this.checkBox16);
+ this.audPanel.Controls.Add(this.checkBox17);
+ this.audPanel.Controls.Add(this.checkBox9);
+ this.audPanel.Controls.Add(this.checkBox4);
+ this.audPanel.Location = new System.Drawing.Point(86, 19);
+ this.audPanel.Name = "audPanel";
+ this.audPanel.Size = new System.Drawing.Size(74, 277);
+ this.audPanel.TabIndex = 26;
+ //
+ // checkBox19
+ //
+ this.checkBox19.AutoSize = true;
+ this.checkBox19.Location = new System.Drawing.Point(10, 100);
+ this.checkBox19.Name = "checkBox19";
+ this.checkBox19.Size = new System.Drawing.Size(40, 17);
+ this.checkBox19.TabIndex = 21;
+ this.checkBox19.Text = ".flv";
+ this.checkBox19.UseVisualStyleBackColor = true;
+ //
+ // checkBox20
+ //
+ this.checkBox20.AutoSize = true;
+ this.checkBox20.Location = new System.Drawing.Point(10, 77);
+ this.checkBox20.Name = "checkBox20";
+ this.checkBox20.Size = new System.Drawing.Size(46, 17);
+ this.checkBox20.TabIndex = 20;
+ this.checkBox20.Text = ".flac";
+ this.checkBox20.UseVisualStyleBackColor = true;
+ //
+ // checkBox21
+ //
+ this.checkBox21.AutoSize = true;
+ this.checkBox21.Location = new System.Drawing.Point(10, 31);
+ this.checkBox21.Name = "checkBox21";
+ this.checkBox21.Size = new System.Drawing.Size(47, 17);
+ this.checkBox21.TabIndex = 19;
+ this.checkBox21.Text = ".ac3";
+ this.checkBox21.UseVisualStyleBackColor = true;
+ //
+ // checkBox22
+ //
+ this.checkBox22.AutoSize = true;
+ this.checkBox22.Location = new System.Drawing.Point(10, 8);
+ this.checkBox22.Name = "checkBox22";
+ this.checkBox22.Size = new System.Drawing.Size(47, 17);
+ this.checkBox22.TabIndex = 18;
+ this.checkBox22.Text = ".aac";
+ this.checkBox22.UseVisualStyleBackColor = true;
+ //
+ // checkBox23
+ //
+ this.checkBox23.AutoSize = true;
+ this.checkBox23.Location = new System.Drawing.Point(10, 54);
+ this.checkBox23.Name = "checkBox23";
+ this.checkBox23.Size = new System.Drawing.Size(43, 17);
+ this.checkBox23.TabIndex = 17;
+ this.checkBox23.Text = ".dts";
+ this.checkBox23.UseVisualStyleBackColor = true;
+ //
+ // checkBox14
+ //
+ this.checkBox14.AutoSize = true;
+ this.checkBox14.Location = new System.Drawing.Point(10, 215);
+ this.checkBox14.Name = "checkBox14";
+ this.checkBox14.Size = new System.Drawing.Size(49, 17);
+ this.checkBox14.TabIndex = 16;
+ this.checkBox14.Text = ".wav";
+ this.checkBox14.UseVisualStyleBackColor = true;
+ //
+ // checkBox16
+ //
+ this.checkBox16.AutoSize = true;
+ this.checkBox16.Location = new System.Drawing.Point(10, 192);
+ this.checkBox16.Name = "checkBox16";
+ this.checkBox16.Size = new System.Drawing.Size(49, 17);
+ this.checkBox16.TabIndex = 14;
+ this.checkBox16.Text = ".ogm";
+ this.checkBox16.UseVisualStyleBackColor = true;
+ //
+ // checkBox17
+ //
+ this.checkBox17.AutoSize = true;
+ this.checkBox17.Location = new System.Drawing.Point(10, 169);
+ this.checkBox17.Name = "checkBox17";
+ this.checkBox17.Size = new System.Drawing.Size(47, 17);
+ this.checkBox17.TabIndex = 13;
+ this.checkBox17.Text = ".ogg";
+ this.checkBox17.UseVisualStyleBackColor = true;
+ //
+ // checkBox9
+ //
+ this.checkBox9.AutoSize = true;
+ this.checkBox9.Location = new System.Drawing.Point(10, 146);
+ this.checkBox9.Name = "checkBox9";
+ this.checkBox9.Size = new System.Drawing.Size(49, 17);
+ this.checkBox9.TabIndex = 6;
+ this.checkBox9.Text = ".mp3";
+ this.checkBox9.UseVisualStyleBackColor = true;
+ //
+ // checkBox4
+ //
+ this.checkBox4.AutoSize = true;
+ this.checkBox4.Location = new System.Drawing.Point(10, 123);
+ this.checkBox4.Name = "checkBox4";
+ this.checkBox4.Size = new System.Drawing.Size(49, 17);
+ this.checkBox4.TabIndex = 3;
+ this.checkBox4.Text = ".m4a";
+ this.checkBox4.UseVisualStyleBackColor = true;
+ //
+ // vidPanel
+ //
+ this.vidPanel.Controls.Add(this.checkBox27);
+ this.vidPanel.Controls.Add(this.checkBox15);
+ this.vidPanel.Controls.Add(this.checkBox10);
+ this.vidPanel.Controls.Add(this.checkBox11);
+ this.vidPanel.Controls.Add(this.checkBox13);
+ this.vidPanel.Controls.Add(this.checkBox7);
+ this.vidPanel.Controls.Add(this.checkBox8);
+ this.vidPanel.Controls.Add(this.checkBox6);
+ this.vidPanel.Controls.Add(this.checkBox5);
+ this.vidPanel.Controls.Add(this.checkBox3);
+ this.vidPanel.Controls.Add(this.checkBox2);
+ this.vidPanel.Controls.Add(this.checkBox1);
+ this.vidPanel.Location = new System.Drawing.Point(6, 19);
+ this.vidPanel.Name = "vidPanel";
+ this.vidPanel.Size = new System.Drawing.Size(74, 295);
+ this.vidPanel.TabIndex = 25;
+ //
+ // checkBox27
+ //
+ this.checkBox27.AutoSize = true;
+ this.checkBox27.Location = new System.Drawing.Point(8, 102);
+ this.checkBox27.Name = "checkBox27";
+ this.checkBox27.Size = new System.Drawing.Size(53, 17);
+ this.checkBox27.TabIndex = 24;
+ this.checkBox27.Text = ".h264";
+ this.checkBox27.UseVisualStyleBackColor = true;
+ //
+ // checkBox15
+ //
+ this.checkBox15.AutoSize = true;
+ this.checkBox15.Location = new System.Drawing.Point(8, 125);
+ this.checkBox15.Name = "checkBox15";
+ this.checkBox15.Size = new System.Drawing.Size(49, 17);
+ this.checkBox15.TabIndex = 15;
+ this.checkBox15.Text = ".mkv";
+ this.checkBox15.UseVisualStyleBackColor = true;
+ //
+ // checkBox10
+ //
+ this.checkBox10.AutoSize = true;
+ this.checkBox10.Location = new System.Drawing.Point(8, 10);
+ this.checkBox10.Name = "checkBox10";
+ this.checkBox10.Size = new System.Drawing.Size(47, 17);
+ this.checkBox10.TabIndex = 12;
+ this.checkBox10.Text = ".3gp";
+ this.checkBox10.UseVisualStyleBackColor = true;
+ //
+ // checkBox11
+ //
+ this.checkBox11.AutoSize = true;
+ this.checkBox11.Location = new System.Drawing.Point(8, 171);
+ this.checkBox11.Name = "checkBox11";
+ this.checkBox11.Size = new System.Drawing.Size(49, 17);
+ this.checkBox11.TabIndex = 11;
+ this.checkBox11.Text = ".mp4";
+ this.checkBox11.UseVisualStyleBackColor = true;
+ //
+ // checkBox7
+ //
+ this.checkBox7.AutoSize = true;
+ this.checkBox7.Location = new System.Drawing.Point(8, 240);
+ this.checkBox7.Name = "checkBox7";
+ this.checkBox7.Size = new System.Drawing.Size(51, 17);
+ this.checkBox7.TabIndex = 8;
+ this.checkBox7.Text = ".wma";
+ this.checkBox7.UseVisualStyleBackColor = true;
+ //
+ // checkBox8
+ //
+ this.checkBox8.AutoSize = true;
+ this.checkBox8.Location = new System.Drawing.Point(8, 33);
+ this.checkBox8.Name = "checkBox8";
+ this.checkBox8.Size = new System.Drawing.Size(43, 17);
+ this.checkBox8.TabIndex = 7;
+ this.checkBox8.Text = ".asf";
+ this.checkBox8.UseVisualStyleBackColor = true;
+ //
+ // checkBox6
+ //
+ this.checkBox6.AutoSize = true;
+ this.checkBox6.Location = new System.Drawing.Point(8, 194);
+ this.checkBox6.Name = "checkBox6";
+ this.checkBox6.Size = new System.Drawing.Size(49, 17);
+ this.checkBox6.TabIndex = 5;
+ this.checkBox6.Text = ".mpg";
+ this.checkBox6.UseVisualStyleBackColor = true;
+ //
+ // checkBox5
+ //
+ this.checkBox5.AutoSize = true;
+ this.checkBox5.Location = new System.Drawing.Point(8, 148);
+ this.checkBox5.Name = "checkBox5";
+ this.checkBox5.Size = new System.Drawing.Size(49, 17);
+ this.checkBox5.TabIndex = 4;
+ this.checkBox5.Text = ".mov";
+ this.checkBox5.UseVisualStyleBackColor = true;
+ //
+ // checkBox3
+ //
+ this.checkBox3.AutoSize = true;
+ this.checkBox3.Location = new System.Drawing.Point(8, 56);
+ this.checkBox3.Name = "checkBox3";
+ this.checkBox3.Size = new System.Drawing.Size(43, 17);
+ this.checkBox3.TabIndex = 2;
+ this.checkBox3.Text = ".avi";
+ this.checkBox3.UseVisualStyleBackColor = true;
+ //
+ // checkBox2
+ //
+ this.checkBox2.AutoSize = true;
+ this.checkBox2.Location = new System.Drawing.Point(8, 79);
+ this.checkBox2.Name = "checkBox2";
+ this.checkBox2.Size = new System.Drawing.Size(49, 17);
+ this.checkBox2.TabIndex = 1;
+ this.checkBox2.Text = ".gary";
+ this.checkBox2.UseVisualStyleBackColor = true;
+ //
+ // checkBox1
+ //
+ this.checkBox1.AutoSize = true;
+ this.checkBox1.Location = new System.Drawing.Point(8, 217);
+ this.checkBox1.Name = "checkBox1";
+ this.checkBox1.Size = new System.Drawing.Size(37, 17);
+ this.checkBox1.TabIndex = 0;
+ this.checkBox1.Text = ".ts";
+ this.checkBox1.UseVisualStyleBackColor = true;
+ //
+ // allAudBtn
+ //
+ this.allAudBtn.Location = new System.Drawing.Point(85, 320);
+ this.allAudBtn.Name = "allAudBtn";
+ this.allAudBtn.Size = new System.Drawing.Size(75, 23);
+ this.allAudBtn.TabIndex = 23;
+ this.allAudBtn.Text = "All audio";
+ this.allAudBtn.UseVisualStyleBackColor = true;
+ this.allAudBtn.Click += new System.EventHandler(this.allAudBtn_Click);
+ //
+ // allVidBtn
+ //
+ this.allVidBtn.Location = new System.Drawing.Point(6, 320);
+ this.allVidBtn.Name = "allVidBtn";
+ this.allVidBtn.Size = new System.Drawing.Size(75, 23);
+ this.allVidBtn.TabIndex = 22;
+ this.allVidBtn.Text = "All video";
+ this.allVidBtn.UseVisualStyleBackColor = true;
+ this.allVidBtn.Click += new System.EventHandler(this.allVidBtn_Click);
+ //
+ // checkBox13
+ //
+ this.checkBox13.AutoSize = true;
+ this.checkBox13.Location = new System.Drawing.Point(6, 263);
+ this.checkBox13.Name = "checkBox13";
+ this.checkBox13.Size = new System.Drawing.Size(51, 17);
+ this.checkBox13.TabIndex = 9;
+ this.checkBox13.Text = ".wmv";
+ this.checkBox13.UseVisualStyleBackColor = true;
+ //
+ // protBox
+ //
+ this.protBox.Controls.Add(this.httpOpt);
+ this.protBox.Controls.Add(this.udpOpt);
+ this.protBox.Controls.Add(this.rtspOpt);
+ this.protBox.Controls.Add(this.mmsOpt);
+ this.protBox.Location = new System.Drawing.Point(12, 109);
+ this.protBox.Name = "protBox";
+ this.protBox.Size = new System.Drawing.Size(221, 84);
+ this.protBox.TabIndex = 24;
+ this.protBox.TabStop = false;
+ this.protBox.Text = "Associated protocols";
+ //
+ // httpOpt
+ //
+ this.httpOpt.AutoSize = true;
+ this.httpOpt.Location = new System.Drawing.Point(8, 26);
+ this.httpOpt.Name = "httpOpt";
+ this.httpOpt.Size = new System.Drawing.Size(44, 17);
+ this.httpOpt.TabIndex = 12;
+ this.httpOpt.Text = "http";
+ this.httpOpt.UseVisualStyleBackColor = true;
+ //
+ // udpOpt
+ //
+ this.udpOpt.AutoSize = true;
+ this.udpOpt.Location = new System.Drawing.Point(8, 49);
+ this.udpOpt.Name = "udpOpt";
+ this.udpOpt.Size = new System.Drawing.Size(44, 17);
+ this.udpOpt.TabIndex = 7;
+ this.udpOpt.Text = "udp";
+ this.udpOpt.UseVisualStyleBackColor = true;
+ //
+ // rtspOpt
+ //
+ this.rtspOpt.AutoSize = true;
+ this.rtspOpt.Location = new System.Drawing.Point(71, 26);
+ this.rtspOpt.Name = "rtspOpt";
+ this.rtspOpt.Size = new System.Drawing.Size(43, 17);
+ this.rtspOpt.TabIndex = 2;
+ this.rtspOpt.Text = "rtsp";
+ this.rtspOpt.UseVisualStyleBackColor = true;
+ //
+ // mmsOpt
+ //
+ this.mmsOpt.AutoSize = true;
+ this.mmsOpt.Location = new System.Drawing.Point(71, 49);
+ this.mmsOpt.Name = "mmsOpt";
+ this.mmsOpt.Size = new System.Drawing.Size(47, 17);
+ this.mmsOpt.TabIndex = 1;
+ this.mmsOpt.Text = "mms";
+ this.mmsOpt.UseVisualStyleBackColor = true;
+ //
+ // cancelBtn
+ //
+ this.cancelBtn.Location = new System.Drawing.Point(251, 367);
+ this.cancelBtn.Name = "cancelBtn";
+ this.cancelBtn.Size = new System.Drawing.Size(75, 23);
+ this.cancelBtn.TabIndex = 25;
+ this.cancelBtn.Text = "Cancel";
+ this.cancelBtn.UseVisualStyleBackColor = true;
+ this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
+ //
+ // applyBtn
+ //
+ this.applyBtn.Location = new System.Drawing.Point(333, 367);
+ this.applyBtn.Name = "applyBtn";
+ this.applyBtn.Size = new System.Drawing.Size(75, 23);
+ this.applyBtn.TabIndex = 26;
+ this.applyBtn.Text = "Apply";
+ this.applyBtn.UseVisualStyleBackColor = true;
+ this.applyBtn.Click += new System.EventHandler(this.applyBtn_Click);
+ //
// ConfigurationForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(440, 198);
+ this.ClientSize = new System.Drawing.Size(417, 398);
+ this.Controls.Add(this.applyBtn);
+ this.Controls.Add(this.cancelBtn);
+ this.Controls.Add(this.protBox);
+ this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.buttonEnable);
+ this.Controls.Add(this.okBtn);
this.Name = "ConfigurationForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Configuration";
+ this.Text = "VideoLan Player Configuration";
this.Closing += new System.ComponentModel.CancelEventHandler(this.ConfigurationForm_Closing);
this.Load += new System.EventHandler(this.ConfigurationForm_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.audPanel.ResumeLayout(false);
+ this.audPanel.PerformLayout();
+ this.vidPanel.ResumeLayout(false);
+ this.vidPanel.PerformLayout();
+ this.protBox.ResumeLayout(false);
+ this.protBox.PerformLayout();
this.ResumeLayout(false);
}
@@ -228,24 +626,33 @@
{
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml"))
{
- m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary");
- m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp");
+ string m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary");
+ string m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp");
bufsize = xmlreader.GetValueAsString("vlcplugin", "buffer", "5000");
m_deinterlace = xmlreader.GetValueAsString("vlcplugin", "deinterlace", "Disable");
m_enabledExt.Replace(":", ","); // in case it was using the old plugin code where the separator was ":"
+ if (m_enabledExt != null && m_enabledExt.Length > 0)
+ {
+ ArrayList extArrayList = new ArrayList();
+ ArrayList protArrayList = new ArrayList();
+ extArrayList.AddRange(m_enabledExt.Split(','));
+ protArrayList.AddRange(m_enabledStreams.Split(','));
+
+ foreach (CheckBox vbox in vidPanel.Controls)
+ if (extArrayList.Contains(vbox.Text)) vbox.Checked = true;
+ foreach (CheckBox abox in audPanel.Controls)
+ if (extArrayList.Contains(abox.Text)) abox.Checked = true;
+ foreach (CheckBox pbox in protBox.Controls)
+ if (protArrayList.Contains(pbox.Text)) pbox.Checked = true;
+ }
}
- if (m_enabledExt != null && m_enabledExt.Length > 0)
- extensionBox.Text = m_enabledExt;
-
- this.extensionBox.Text = m_enabledExt;
- this.streamBox.Text = m_enabledStreams;
this.bufBox.Text = bufsize;
this.deintBox.SelectedItem = m_deinterlace;
}
private void ConfigurationForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
- writeConfiguration();
+ if(!isCancelled) writeConfiguration();
}
private void buttonEnable_Click(object sender, System.EventArgs e)
@@ -254,15 +661,62 @@
this.Close();
}
- private void writeConfiguration()
- {
- using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml"))
- {
- xmlWriter.SetValue("vlcplugin", "enabledextensions", extensionBox.Text);
- xmlWriter.SetValue("vlcplugin", "enabledstreams", streamBox.Text);
- xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text);
- xmlWriter.SetValue("vlcplugin", "deinterlace", deintBox.Text);
- }
- }
+ private void allVidBtn_Click(object sender, EventArgs e)
+ {
+ foreach(CheckBox vbox in vidPanel.Controls)
+ {
+ vbox.Checked = true;
+ }
+ }
+
+ private void allAudBtn_Click(object sender, EventArgs e)
+ {
+ foreach (CheckBox abox in audPanel.Controls)
+ {
+ abox.Checked = true;
+ }
+ }
+
+ private void applyBtn_Click(object sender, EventArgs e)
+ {
+ writeConfiguration();
+ }
+
+ private void cancelBtn_Click(object sender, EventArgs e)
+ {
+ isCancelled = true;
+ this.Close();
+ }
+
+ private void writeConfiguration()
+ {
+ using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml"))
+ {
+ xmlWriter.SetValue("vlcplugin", "enabledextensions", getCheckedExtensions());
+ xmlWriter.SetValue("vlcplugin", "enabledstreams", getCheckedProtocols());
+ xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text);
+ xmlWriter.SetValue("vlcplugin", "deinterlace", deintBox.Text);
+ }
+ }
+
+ private string getCheckedExtensions()
+ {
+ string result = "";
+ foreach (CheckBox vbox in vidPanel.Controls)
+ if (vbox.Checked) result += vbox.Text + ",";
+ foreach (CheckBox abox in audPanel.Controls)
+ if (abox.Checked) result += abox.Text + ",";
+
+ return result.Substring(0, result.Length - 1);
+ }
+
+ private string getCheckedProtocols()
+ {
+ string result = "";
+ foreach (CheckBox pbox in protBox.Controls)
+ if (pbox.Checked) result += pbox.Text + ",";
+
+ return result.Substring(0, result.Length - 1);
+ }
}
}
Modified: trunk/plugins/VideoLAN/VideoLAN.csproj
===================================================================
--- trunk/plugins/VideoLAN/VideoLAN.csproj 2007-04-17 17:42:39 UTC (rev 339)
+++ trunk/plugins/VideoLAN/VideoLAN.csproj 2007-04-17 21:08:51 UTC (rev 340)
@@ -36,18 +36,18 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\AXVLC.dll</HintPath>
</Reference>
- <Reference Include="Core, Version=1.0.2586.6922, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Core, Version=1.0.2546.32606, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\trunk\mediaportal\xbmc\bin\Release\Core.dll</HintPath>
+ <HintPath>C:\Program Files (x86)\MediaPortal\Core.DLL</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="Utils, Version=1.0.2586.6921, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\trunk\mediaportal\xbmc\bin\Release\Utils.dll</HintPath>
+ <HintPath>C:\Program Files (x86)\MediaPortal\Utils.DLL</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/VideoLAN/VideoLAN.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/VideoLAN/VideoLanPlugin.cs
===================================================================
--- trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-17 17:42:39 UTC (rev 339)
+++ trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-17 21:08:51 UTC (rev 340)
@@ -1,6 +1,6 @@
using System;
using System.IO;
-using System.Collections.Generic;
+using System.Collections;
using System.Text;
using System.Drawing;
using AXVLC;
@@ -142,37 +142,27 @@
GUIWindowManager.SendThreadMessage(msg);
Player_Initializing();
+
+ // Set options
string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv";
if (!Directory.Exists(vlciptvdir)) Directory.CreateDirectory(vlciptvdir);
-
+
string deinterlace = getDeinterlace();
+ int bufferSize = getBufferSize();
- string[] option;
-
- if (!deinterlace.Equals("disable"))
+ ArrayList options = new ArrayList();
+ options.Add(":http-caching=" + bufferSize);
+ options.Add(":mms-caching=" + bufferSize);
+ options.Add(":realrtsp-caching=" + bufferSize);
+ options.Add(":smb-caching=" + bufferSize);
+ options.Add(":snapshot-path=" + vlciptvdir);
+ options.Add(":record-path=" + vlciptvdir);
+ options.Add(":timeshift-dir=" + vlciptvdir);
+ options.Add(":access-filter=record");
+ if (!deinterlace.Equals("disable"))
{
- option= new string[]{
- ":http-caching=" + getBufferSize(),
- ":mms-caching=" + getBufferSize(),
- ":realrtsp-caching=" + getBufferSize(),
- ":smb-caching=" + getBufferSize(),
- ":snapshot-path=" + vlciptvdir,
- ":record-path=" + vlciptvdir,
- ":timeshift-dir=" + vlciptvdir,
- ":access-filter=record",
- ":vout-filter=deinterlace", ":deinterlace-mode=" + deinterlace
- };
- } else {
- option = new string[]{
- ":http-caching=" + getBufferSize(),
- ":mms-caching=" + getBufferSize(),
- ":realrtsp-caching=" + getBufferSize(),
- ":smb-caching=" + getBufferSize(),
- ":snapshot-path=" + vlciptvdir,
- ":record-path=" + vlciptvdir,
- ":timeshift-dir=" + vlciptvdir,
- ":access-filter=record",
- };
+ options.Add(":vout-filter=deinterlace");
+ options.Add(":deinterlace-mode=" + deinterlace);
}
vlcControl.Stop();
@@ -181,7 +171,7 @@
System.Threading.Thread.Sleep(1000);
//wait for vlc strange playlist problem
- vlcControl.AddToPlayList(strFile, null, option);
+ vlcControl.AddToPlayList(strFile, null, (string[]) options.ToArray());
vlcControl.Play();
GUIGraphicsContext.form.Focus();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|