Commit c5197167 authored by Olivier Teulière's avatar Olivier Teulière

* modules/gui/win32/network.cpp: added support for ftp and mms

 * modules/gui/win32/disc.cpp: cosmetic
parent ebc092f4
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -79,13 +79,13 @@ void __fastcall TDiscDlg::ButtonOkClick( TObject *Sender ) ...@@ -79,13 +79,13 @@ void __fastcall TDiscDlg::ButtonOkClick( TObject *Sender )
Chapter.sprintf( "%d", SpinEditChapter->Value ); Chapter.sprintf( "%d", SpinEditChapter->Value );
/* Build source name and add it to playlist */ /* Build source name and add it to playlist */
if ( CheckBoxMenus->Checked ) if ( CheckBoxMenus->Checked && RadioGroupType->ItemIndex == 0 )
{ {
Source = Method + ":" + Device; Source = "dvdplay://" + Device;
} }
else else
{ {
Source = Method + ":" + Device + "@" + Title + "," + Chapter; Source = Method + "://" + Device + "@" + Title + "," + Chapter;
} }
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND
...@@ -102,13 +102,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) ...@@ -102,13 +102,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
{ {
psz_device = config_GetPsz( p_intf, "dvd" ); psz_device = config_GetPsz( p_intf, "dvd" );
CheckBoxMenus->Enabled = true; CheckBoxMenus->Enabled = true;
CheckBoxMenus->Checked = true; DisableTitles( CheckBoxMenus->Checked );
} }
else else
{ {
psz_device = config_GetPsz( p_intf, "vcd" ); psz_device = config_GetPsz( p_intf, "vcd" );
CheckBoxMenus->Checked = false;
CheckBoxMenus->Enabled = false; CheckBoxMenus->Enabled = false;
/* We don't support menus for vcds, so we use titles and chapters */
DisableTitles( false );
} }
if( psz_device ) if( psz_device )
...@@ -118,10 +119,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender ) ...@@ -118,10 +119,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TDiscDlg::CheckBoxMenusClick( TObject *Sender )
void __fastcall TDiscDlg::CheckBoxMenusClick(TObject *Sender) {
DisableTitles( CheckBoxMenus->Checked );
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::DisableTitles( Boolean disable )
{ {
if ( CheckBoxMenus->Checked ) if( disable )
{ {
LabelTitle->Enabled = false; LabelTitle->Enabled = false;
LabelChapter->Enabled = false; LabelChapter->Enabled = false;
......
object DiscDlg: TDiscDlg object DiscDlg: TDiscDlg
Left = 502 Left = 390
Top = 336 Top = 320
BorderIcons = [biSystemMenu, biMinimize] BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Open disc' Caption = 'Open disc'
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -52,9 +52,10 @@ __published: // IDE-managed Components ...@@ -52,9 +52,10 @@ __published: // IDE-managed Components
void __fastcall ButtonCancelClick( TObject *Sender ); void __fastcall ButtonCancelClick( TObject *Sender );
void __fastcall ButtonOkClick( TObject *Sender); void __fastcall ButtonOkClick( TObject *Sender);
void __fastcall RadioGroupTypeClick( TObject *Sender ); void __fastcall RadioGroupTypeClick( TObject *Sender );
void __fastcall CheckBoxMenusClick(TObject *Sender); void __fastcall CheckBoxMenusClick( TObject *Sender );
private: // User declarations private: // User declarations
intf_thread_t *p_intf; intf_thread_t *p_intf;
void __fastcall DisableTitles( Boolean disable );
public: // User declarations public: // User declarations
__fastcall TDiscDlg( TComponent* Owner, intf_thread_t *_p_intf ); __fastcall TDiscDlg( TComponent* Owner, intf_thread_t *_p_intf );
}; };
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -143,8 +143,11 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender ) ...@@ -143,8 +143,11 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
config_PutInt( p_intf, "network-channel", FALSE ); config_PutInt( p_intf, "network-channel", FALSE );
Address = EditHTTPURL->Text; Address = EditHTTPURL->Text;
/* Build source name with a basic test */ /* Build source name with a basic test;
if( Address.SubString( 1, 4 ) == "http" ) * http is the default protocol */
if( Address.SubString( 1, 7 ) == "http://" ||
Address.SubString( 1, 6 ) == "ftp://" ||
Address.SubString( 1, 6 ) == "mms://" )
{ {
Source = Address; Source = Address;
} }
......
object NetworkDlg: TNetworkDlg object NetworkDlg: TNetworkDlg
Left = 369 Left = 329
Top = 301 Top = 253
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Open network' Caption = 'Open network'
ClientHeight = 206 ClientHeight = 206
ClientWidth = 482 ClientWidth = 497
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
...@@ -249,7 +249,7 @@ object NetworkDlg: TNetworkDlg ...@@ -249,7 +249,7 @@ object NetworkDlg: TNetworkDlg
TextHeight = 13 TextHeight = 13
object BitBtnOk: TBitBtn object BitBtnOk: TBitBtn
Tag = 3 Tag = 3
Left = 40 Left = 52
Top = 168 Top = 168
Width = 177 Width = 177
Height = 25 Height = 25
...@@ -259,7 +259,7 @@ object NetworkDlg: TNetworkDlg ...@@ -259,7 +259,7 @@ object NetworkDlg: TNetworkDlg
end end
object BitBtnCancel: TBitBtn object BitBtnCancel: TBitBtn
Tag = 3 Tag = 3
Left = 256 Left = 268
Top = 168 Top = 168
Width = 177 Width = 177
Height = 25 Height = 25
...@@ -271,13 +271,13 @@ object NetworkDlg: TNetworkDlg ...@@ -271,13 +271,13 @@ object NetworkDlg: TNetworkDlg
Tag = 3 Tag = 3
Left = 8 Left = 8
Top = 8 Top = 8
Width = 465 Width = 481
Height = 145 Height = 145
Caption = 'Network mode' Caption = 'Network mode'
TabOrder = 2 TabOrder = 2
object LabelUDPPort: TLabel object LabelUDPPort: TLabel
Tag = 3 Tag = 3
Left = 148 Left = 172
Top = 26 Top = 26
Width = 22 Width = 22
Height = 13 Height = 13
...@@ -285,7 +285,7 @@ object NetworkDlg: TNetworkDlg ...@@ -285,7 +285,7 @@ object NetworkDlg: TNetworkDlg
end end
object LabelMulticastPort: TLabel object LabelMulticastPort: TLabel
Tag = 3 Tag = 3
Left = 364 Left = 388
Top = 54 Top = 54
Width = 22 Width = 22
Height = 13 Height = 13
...@@ -294,7 +294,7 @@ object NetworkDlg: TNetworkDlg ...@@ -294,7 +294,7 @@ object NetworkDlg: TNetworkDlg
end end
object LabelCSPort: TLabel object LabelCSPort: TLabel
Tag = 3 Tag = 3
Left = 364 Left = 388
Top = 82 Top = 82
Width = 22 Width = 22
Height = 13 Height = 13
...@@ -303,7 +303,7 @@ object NetworkDlg: TNetworkDlg ...@@ -303,7 +303,7 @@ object NetworkDlg: TNetworkDlg
end end
object LabelMulticastAddress: TLabel object LabelMulticastAddress: TLabel
Tag = 3 Tag = 3
Left = 139 Left = 163
Top = 54 Top = 54
Width = 41 Width = 41
Height = 13 Height = 13
...@@ -312,7 +312,7 @@ object NetworkDlg: TNetworkDlg ...@@ -312,7 +312,7 @@ object NetworkDlg: TNetworkDlg
end end
object LabelCSAddress: TLabel object LabelCSAddress: TLabel
Tag = 3 Tag = 3
Left = 139 Left = 163
Top = 82 Top = 82
Width = 41 Width = 41
Height = 13 Height = 13
...@@ -321,7 +321,7 @@ object NetworkDlg: TNetworkDlg ...@@ -321,7 +321,7 @@ object NetworkDlg: TNetworkDlg
end end
object LabelHTTPURL: TLabel object LabelHTTPURL: TLabel
Tag = 3 Tag = 3
Left = 147 Left = 171
Top = 110 Top = 110
Width = 25 Width = 25
Height = 13 Height = 13
...@@ -332,9 +332,9 @@ object NetworkDlg: TNetworkDlg ...@@ -332,9 +332,9 @@ object NetworkDlg: TNetworkDlg
Tag = 3 Tag = 3
Left = 16 Left = 16
Top = 24 Top = 24
Width = 97 Width = 113
Height = 17 Height = 17
Caption = 'UDP' Caption = 'UDP/RTP'
Checked = True Checked = True
TabOrder = 0 TabOrder = 0
TabStop = True TabStop = True
...@@ -344,9 +344,9 @@ object NetworkDlg: TNetworkDlg ...@@ -344,9 +344,9 @@ object NetworkDlg: TNetworkDlg
Tag = 3 Tag = 3
Left = 16 Left = 16
Top = 52 Top = 52
Width = 97 Width = 113
Height = 17 Height = 17
Caption = 'UDP Multicast' Caption = 'UDP/RTP Multicast'
TabOrder = 1 TabOrder = 1
OnEnter = RadioButtonMulticastEnter OnEnter = RadioButtonMulticastEnter
end end
...@@ -354,7 +354,7 @@ object NetworkDlg: TNetworkDlg ...@@ -354,7 +354,7 @@ object NetworkDlg: TNetworkDlg
Tag = 3 Tag = 3
Left = 16 Left = 16
Top = 80 Top = 80
Width = 97 Width = 113
Height = 17 Height = 17
Caption = 'Channel Server' Caption = 'Channel Server'
TabOrder = 2 TabOrder = 2
...@@ -364,15 +364,15 @@ object NetworkDlg: TNetworkDlg ...@@ -364,15 +364,15 @@ object NetworkDlg: TNetworkDlg
Tag = 3 Tag = 3
Left = 16 Left = 16
Top = 108 Top = 108
Width = 97 Width = 113
Height = 17 Height = 17
Caption = 'HTTP' Caption = 'HTTP/FTP/MMS'
TabOrder = 3 TabOrder = 3
OnEnter = RadioButtonHTTPEnter OnEnter = RadioButtonHTTPEnter
end end
object ComboBoxMulticastAddress: TComboBox object ComboBoxMulticastAddress: TComboBox
Tag = 5 Tag = 5
Left = 184 Left = 208
Top = 50 Top = 50
Width = 161 Width = 161
Height = 21 Height = 21
...@@ -382,7 +382,7 @@ object NetworkDlg: TNetworkDlg ...@@ -382,7 +382,7 @@ object NetworkDlg: TNetworkDlg
end end
object ComboBoxCSAddress: TComboBox object ComboBoxCSAddress: TComboBox
Tag = 5 Tag = 5
Left = 184 Left = 208
Top = 78 Top = 78
Width = 161 Width = 161
Height = 21 Height = 21
...@@ -395,7 +395,7 @@ object NetworkDlg: TNetworkDlg ...@@ -395,7 +395,7 @@ object NetworkDlg: TNetworkDlg
end end
object EditHTTPURL: TEdit object EditHTTPURL: TEdit
Tag = 5 Tag = 5
Left = 184 Left = 208
Top = 106 Top = 106
Width = 265 Width = 265
Height = 21 Height = 21
...@@ -403,7 +403,7 @@ object NetworkDlg: TNetworkDlg ...@@ -403,7 +403,7 @@ object NetworkDlg: TNetworkDlg
TabOrder = 9 TabOrder = 9
end end
object SpinEditUDPPort: TCSpinEdit object SpinEditUDPPort: TCSpinEdit
Left = 184 Left = 208
Top = 21 Top = 21
Width = 57 Width = 57
Height = 22 Height = 22
...@@ -414,7 +414,7 @@ object NetworkDlg: TNetworkDlg ...@@ -414,7 +414,7 @@ object NetworkDlg: TNetworkDlg
Value = 1234 Value = 1234
end end
object SpinEditMulticastPort: TCSpinEdit object SpinEditMulticastPort: TCSpinEdit
Left = 392 Left = 416
Top = 49 Top = 49
Width = 57 Width = 57
Height = 22 Height = 22
...@@ -426,7 +426,7 @@ object NetworkDlg: TNetworkDlg ...@@ -426,7 +426,7 @@ object NetworkDlg: TNetworkDlg
Value = 1234 Value = 1234
end end
object SpinEditCSPort: TCSpinEdit object SpinEditCSPort: TCSpinEdit
Left = 392 Left = 416
Top = 77 Top = 77
Width = 57 Width = 57
Height = 22 Height = 22
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment