/*****************************************************************************
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
- * Copyright (C) 2000-2004 VideoLAN
+ * Copyright (C) 2000-2005 VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
#include <vlc/intf.h>
+#include <vector>
+
#include "wxwindows.h"
#include "preferences_widgets.h"
if( b_advanced )
{
- wxPanel *dummy_panel = new wxPanel( this, -1 );
- sizer->Add( dummy_panel, 1 );
-
wxButton *button =
new wxButton( this, AdvancedOptions_Event,
wxU(_("Advanced options...")) );
while( p_item->i_type != CONFIG_HINT_END && p_item++ );
/* Separation */
- dummy_panel = new wxPanel( p_advanced_dialog, -1 );
+ wxPanel *dummy_panel = new wxPanel( p_advanced_dialog, -1 );
sizer->Add( dummy_panel, 1 );
wxStaticLine *static_line =
new wxStaticLine( p_advanced_dialog, wxID_OK );
SetIcon( *p_intf->p_sys->p_icon );
file_dialog = NULL;
i_disc_type_selection = 0;
+ i_disc_title = 0;
i_open_arg = i_arg;
sout_dialog = NULL;
wxStaticText *mrl_label = new wxStaticText( panel, -1,
wxU(_("Open:")) );
mrl_combo = new wxComboBox( panel, MRL_Event, wxT(""),
- wxPoint(20,25), wxSize(120, -1),
- 0, NULL );
+ wxPoint(20,25), wxSize(120, -1) );
mrl_combo->SetToolTip( wxU(_("You can use this field directly by typing "
"the full MRL you want to open.\n""Alternatively, the field will be "
"filled automatically when you use the controls below.")) );
caching_checkbox = new wxCheckBox( panel, CachingEnable_Event,
wxU(_("Caching")) );
caching_checkbox->SetToolTip( wxU(_("Change the default caching value "
- "(in miliseconds)")) );
+ "(in milliseconds)")) );
common_opt_sizer->Add( caching_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
caching_value = new wxSpinCtrl( panel, CachingChange_Event );
+#ifdef WIN32 /* WIN32 uses 16 bit integer */
+ caching_value->SetRange( 0, 32767 );
+#else
caching_value->SetRange( 0, 1000000 );
+#endif
caching_value->Disable();
common_opt_sizer->Add( caching_value, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+ p_module->psz_shortname : p_module->psz_object_name ),
i_access_method == CAPTURE_ACCESS );
}
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+ p_module->psz_shortname : p_module->psz_object_name ),
i_access_method == CAPTURE_ACCESS );
}
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+ p_module->psz_shortname : p_module->psz_object_name ),
i_access_method == CAPTURE_ACCESS );
}
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+ p_module->psz_shortname : p_module->psz_object_name ),
i_access_method == CAPTURE_ACCESS );
}
wxBoxSizer *file_sizer = new wxBoxSizer( wxHORIZONTAL );
file_combo = new wxComboBox( panel, FileName_Event, wxT(""),
- wxPoint(20,25), wxSize(200, -1), 0, NULL );
+ wxPoint(20,25), wxSize(200, -1) );
wxButton *browse_button = new wxButton( panel, FileBrowse_Event,
wxU(_("Browse...")) );
file_sizer->Add( file_combo, 1, wxALL, 5 );
sizer->Add( disc_sub_label, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
sizer->Add( disc_sub, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
disc_sub->SetRange( -1, 255 );
- i_disc_sub = config_GetInt( p_intf, "spu-channel" );
+ i_disc_sub = config_GetInt( p_intf, "sub-track" );
disc_sub->SetValue( i_disc_sub );
sizer_row->Add( sizer, 0, wxEXPAND | wxALL, 5 );
{
wxU(_("UDP/RTP")),
wxU(_("UDP/RTP Multicast")),
- wxU(_("HTTP/FTP/MMS")),
+ wxU(_("HTTP/HTTPS/FTP/MMS")),
wxU(_("RTSP"))
};
wxString::Format(wxT("%d"), i_net_ports[0]),
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS,
- 0, 16000, i_net_ports[0] );
+ 0, 65535, i_net_ports[0] );
subpanel_sizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( net_ports[0], 1,
wxString::Format(wxT("%d"), i_net_ports[1]),
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS,
- 0, 16000, i_net_ports[1] );
+ 0, 65535, i_net_ports[1] );
subpanel_sizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( net_ports[1], 1,
void OpenDialog::UpdateMRL( int i_access_method )
{
- wxString demux, mrltemp, caching_name;
+ wxString mrltemp, caching_name;
i_current_access_method = i_access_method;
{
case FILE_ACCESS:
mrltemp = file_combo->GetValue();
- caching_name = "file-caching";
+ caching_name = wxT("file-caching");
break;
case DISC_ACCESS:
if( i_disc_type_selection == 0 )
{
mrltemp = wxT("dvd://") + disc_device->GetValue();
- caching_name = "dvdnav-caching";
+ caching_name = wxT("dvdnav-caching");
}
else
{
mrltemp = wxT("dvdsimple://") + disc_device->GetValue();
- caching_name = "dvdread-caching";
+ caching_name = wxT("dvdread-caching");
}
if( i_disc_title > 0 )
}
if( i_disc_sub >= 0 )
- mrltemp += wxString::Format( wxT(" :spu-channel=%d"),
+ mrltemp += wxString::Format( wxT(" :sub-track=%d"),
i_disc_sub );
break;
#endif
if( i_disc_sub >= 0 )
- mrltemp += wxString::Format( wxT(" :spu-channel=%d"),
+ mrltemp += wxString::Format( wxT(" :sub-track=%d"),
i_disc_sub );
- caching_name = "vcd-caching";
+ caching_name = wxT("vcd-caching");
break;
case 3: /* CD-DA */
- mrltemp = wxT("cdda://") + disc_device->GetValue();
+ mrltemp =
+#ifdef HAVE_CDDAX
+ wxT("cddax://")
+#else
+ wxT("cdda://")
+#endif
+ + disc_device->GetValue();
if( i_disc_title > 0 )
mrltemp += wxString::Format( wxT("@%d"), i_disc_title );
- caching_name = "cdda-caching";
+ caching_name = wxT("cdda-caching");
break;
default:
switch( i_net_type )
{
case 0:
- mrltemp = wxT("udp") + demux + wxT("://");
+ mrltemp = wxT("udp://@");
if ( net_ipv6->GetValue() )
{
- mrltemp += wxT("@[::]");
+ mrltemp += wxT("[::]");
}
if( i_net_ports[0] !=
config_GetInt( p_intf, "server-port" ) )
{
- mrltemp += wxString::Format( wxT("@:%d"), i_net_ports[0] );
+ mrltemp += wxString::Format( wxT(":%d"), i_net_ports[0] );
}
- caching_name = "udp-caching";
+ caching_name = wxT("udp-caching");
break;
case 1:
- mrltemp = wxT("udp") + demux + wxT("://@");
+ mrltemp = wxT("udp://@");
if ((net_addrs[1]->GetLineText(0).Find (':') != -1)
&& (net_addrs[1]->GetLineText(0)[0u] != '['))
{
mrltemp += wxString::Format( wxT(":%d"), i_net_ports[1] );
}
- caching_name = "udp-caching";
+ caching_name = wxT("udp-caching");
break;
case 2:
/* http access */
- if( net_addrs[2]->GetLineText(0).Find(wxT("http://")) )
- {
- mrltemp = wxT("http") + demux + wxT("://");
- }
+ if( net_addrs[2]->GetLineText(0).Find(wxT("://")) == -1 )
+ mrltemp = wxT("http://");
+
mrltemp += net_addrs[2]->GetLineText(0);
- caching_name = "http-caching";
+ caching_name = wxT("http-caching");
break;
case 3:
/* RTSP access */
if( net_addrs[3]->GetLineText(0).Find(wxT("rtsp://")) != 0 )
{
- mrltemp = wxT("rtsp") + demux + wxT("://");
+ mrltemp = wxT("rtsp://");
}
mrltemp += net_addrs[3]->GetLineText(0);
- caching_name = "rtsp-caching";
+ caching_name = wxT("rtsp-caching");
break;
}
break;
{
if( caching_value->IsEnabled() )
{
- mrltemp += wxString::Format( wxT(" :%s=%d"), caching_name.mb_str(),
- i_caching );
+ mrltemp += wxT(" :") + caching_name +
+ wxString::Format( wxT("=%d"), i_caching );
}
else
{
if( b_start )
{
- int i_pos = playlist_GetPositionById( p_playlist , i_id );
- playlist_Command( p_playlist, PLAYLIST_GOTO, i_pos );
+ playlist_Control( p_playlist, PLAYLIST_ITEMPLAY , p_item );
}
}
if( subsfile_dialog->encoding_combo )
subsfile_mrl.Add( wxString(wxT("subsdec-encoding=")) +
subsfile_dialog->encoding_combo->GetValue() );
- subsfile_mrl.Add( wxString::Format( wxT("sub-delay=%i"),
- subsfile_dialog->delay_spinctrl->GetValue() ) );
+ subsfile_mrl.Add( wxString::Format(wxT("subsdec-align=%i"),
+ (int)subsfile_dialog->align_combo->GetClientData(
+ subsfile_dialog->align_combo->GetSelection()) ) );
+
+ subsfile_mrl.Add( wxString::Format( wxT("freetype-rel-fontsize=%i"),
+ (int)subsfile_dialog->size_combo->GetClientData(
+ subsfile_dialog->size_combo->GetSelection()) ) );
subsfile_mrl.Add( wxString::Format( wxT("sub-fps=%i"),
subsfile_dialog->fps_spinctrl->GetValue() ) );
+ subsfile_mrl.Add( wxString::Format( wxT("sub-delay=%i"),
+ subsfile_dialog->delay_spinctrl->GetValue() ) );
}
}