/*****************************************************************************
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
- * Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.22 2003/07/07 15:50:44 gbazin Exp $
+ * Copyright (C) 2000-2004 VideoLAN
+ * $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <stdio.h>
#include <vlc/vlc.h>
+#include <vlc/intf.h>
-#ifdef WIN32 /* mingw32 hack */
-#undef Yield
-#undef CreateDialog
-#endif
-
-/* Let vlc take care of the i18n stuff */
-#define WXINTL_NO_GETTEXT_MACRO
-
-#include <wx/wxprec.h>
-#include <wx/wx.h>
-#include <wx/notebook.h>
-#include <wx/textctrl.h>
+#include "wxwindows.h"
#include <wx/combobox.h>
-#include <wx/spinctrl.h>
#include <wx/statline.h>
-#include <vlc/intf.h>
-
-#if defined MODULE_NAME_IS_skins
-# include "../skins/src/skin_common.h"
-#endif
-
-#include "wxwindows.h"
+#include "streamdata.h"
#ifndef wxRB_SINGLE
# define wxRB_SINGLE 0
#endif
-enum
-{
- PLAY_ACCESS_OUT = 0,
- FILE_ACCESS_OUT,
- HTTP_ACCESS_OUT,
- UDP_ACCESS_OUT,
- RTP_ACCESS_OUT,
- ACCESS_OUT_NUM
-};
-
-enum
-{
- TS_ENCAPSULATION = 0,
- PS_ENCAPSULATION,
- AVI_ENCAPSULATION,
- OGG_ENCAPSULATION,
- ENCAPS_NUM,
- MP4_ENCAPSULATION
-};
-
-enum
-{
- SAP_MISC = 0
-};
-
-
/*****************************************************************************
* Event Table.
*****************************************************************************/
FileBrowse_Event,
FileName_Event,
+ FileDump_Event,
AccessType1_Event, AccessType2_Event, AccessType3_Event,
- AccessType4_Event, AccessType5_Event,
- NetPort1_Event, NetPort2_Event, NetPort3_Event,
- NetAddr1_Event, NetAddr2_Event, NetAddr3_Event,
+ AccessType4_Event, AccessType5_Event, AccessType6_Event,
+ NetPort1_Event, NetPort2_Event, NetPort3_Event, NetPort4_Event,
+ NetAddr1_Event, NetAddr2_Event, NetAddr3_Event, NetAddr4_Event,
EncapsulationRadio1_Event, EncapsulationRadio2_Event,
EncapsulationRadio3_Event, EncapsulationRadio4_Event,
- EncapsulationRadio5_Event,
+ EncapsulationRadio5_Event, EncapsulationRadio6_Event,
+ EncapsulationRadio7_Event, EncapsulationRadio8_Event,
+ EncapsulationRadio9_Event,
VideoTranscEnable_Event, VideoTranscCodec_Event, VideoTranscBitrate_Event,
+ VideoTranscScale_Event,
AudioTranscEnable_Event, AudioTranscCodec_Event, AudioTranscBitrate_Event,
+ AudioTranscChans_Event,
- SAPMisc_Event, SAPAddr_Event
+ SAPMisc_Event, SLPMisc_Event, AnnounceAddr_Event
};
BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
EVT_CHECKBOX(AccessType3_Event, SoutDialog::OnAccessTypeChange)
EVT_CHECKBOX(AccessType4_Event, SoutDialog::OnAccessTypeChange)
EVT_CHECKBOX(AccessType5_Event, SoutDialog::OnAccessTypeChange)
+ EVT_CHECKBOX(AccessType6_Event, SoutDialog::OnAccessTypeChange)
EVT_TEXT(FileName_Event, SoutDialog::OnFileChange)
EVT_BUTTON(FileBrowse_Event, SoutDialog::OnFileBrowse)
+ EVT_CHECKBOX(FileDump_Event, SoutDialog::OnFileDump)
EVT_TEXT(NetPort1_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr1_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr2_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetPort3_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr3_Event, SoutDialog::OnNetChange)
-
+ EVT_TEXT(NetPort4_Event, SoutDialog::OnNetChange)
+ EVT_TEXT(NetAddr4_Event, SoutDialog::OnNetChange)
+
/* Events generated by the encapsulation panel */
EVT_RADIOBUTTON(EncapsulationRadio1_Event,
SoutDialog::OnEncapsulationChange)
SoutDialog::OnEncapsulationChange)
EVT_RADIOBUTTON(EncapsulationRadio5_Event,
SoutDialog::OnEncapsulationChange)
+ EVT_RADIOBUTTON(EncapsulationRadio6_Event,
+ SoutDialog::OnEncapsulationChange)
+ EVT_RADIOBUTTON(EncapsulationRadio7_Event,
+ SoutDialog::OnEncapsulationChange)
+ EVT_RADIOBUTTON(EncapsulationRadio8_Event,
+ SoutDialog::OnEncapsulationChange)
+ EVT_RADIOBUTTON(EncapsulationRadio9_Event,
+ SoutDialog::OnEncapsulationChange)
/* Events generated by the transcoding panel */
EVT_CHECKBOX(VideoTranscEnable_Event, SoutDialog::OnTranscodingEnable)
EVT_TEXT(VideoTranscBitrate_Event, SoutDialog::OnTranscodingChange)
EVT_COMBOBOX(AudioTranscBitrate_Event, SoutDialog::OnTranscodingChange)
EVT_TEXT(AudioTranscBitrate_Event, SoutDialog::OnTranscodingChange)
+ EVT_COMBOBOX(VideoTranscScale_Event, SoutDialog::OnTranscodingChange)
+ EVT_TEXT(VideoTranscScale_Event, SoutDialog::OnTranscodingChange)
+ EVT_COMBOBOX(AudioTranscChans_Event, SoutDialog::OnTranscodingChange)
+ EVT_TEXT(AudioTranscChans_Event, SoutDialog::OnTranscodingChange)
/* Events generated by the misc panel */
EVT_CHECKBOX(SAPMisc_Event, SoutDialog::OnSAPMiscChange)
- EVT_TEXT(SAPAddr_Event, SoutDialog::OnSAPAddrChange)
+ EVT_CHECKBOX(SLPMisc_Event, SoutDialog::OnSLPMiscChange)
+ EVT_TEXT(AnnounceAddr_Event, SoutDialog::OnAnnounceAddrChange)
END_EVENT_TABLE()
mrl_sizer_sizer->Add( mrl_sizer, 1, wxEXPAND | wxALL, 5 );
/* Create the output encapsulation panel */
- wxPanel *encapsulation_panel = EncapsulationPanel( panel );
+ encapsulation_panel = EncapsulationPanel( panel );
/* Create the access output panel */
- wxPanel *access_panel = AccessPanel( panel );
+ access_panel = AccessPanel( panel );
/* Create the transcoding panel */
- wxPanel *transcoding_panel = TranscodingPanel( panel );
+ transcoding_panel = TranscodingPanel( panel );
/* Create the Misc panel */
- wxPanel *misc_panel = MiscPanel( panel );
-
+ misc_panel = MiscPanel( panel );
+
/* Separation */
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
{
}
+wxArrayString SoutDialog::GetOptions()
+{
+ return SeparateEntries( mrl_combo->GetValue() );
+}
+
/*****************************************************************************
* Private methods.
*****************************************************************************/
void SoutDialog::UpdateMRL()
{
+ /* Check the demux dump option */
+ if( dump_checkbox->IsChecked() )
+ {
+ wxString dumpfile;
+
+ if( file_combo->GetValue().size() )
+ dumpfile = wxT(" :demuxdump-file=\"") +
+ file_combo->GetValue() + wxT("\"");
+ mrl_combo->SetValue( wxT(":demux=demuxdump") + dumpfile );
+
+ return;
+ }
+
/* Let's start with the transcode options */
wxString transcode;
if( video_transc_checkbox->IsChecked() ||
{
transcode += wxT("vcodec=") + video_codec_combo->GetValue();
transcode += wxT(",vb=") + video_bitrate_combo->GetValue();
+ transcode += wxT(",scale=") + video_scale_combo->GetValue();
if( audio_transc_checkbox->IsChecked() ) transcode += wxT(",");
}
if( audio_transc_checkbox->IsChecked() )
{
transcode += wxT("acodec=") + audio_codec_combo->GetValue();
transcode += wxT(",ab=") + audio_bitrate_combo->GetValue();
+ transcode += wxT(",channels=") + audio_channels_combo->GetValue();
}
transcode += wxT("}");
}
case PS_ENCAPSULATION:
encapsulation = wxT("ps");
break;
+ case MPEG1_ENCAPSULATION:
+ encapsulation = wxT("mpeg1");
+ break;
case AVI_ENCAPSULATION:
encapsulation = wxT("avi");
break;
case OGG_ENCAPSULATION:
encapsulation = wxT("ogg");
break;
+ case RAW_ENCAPSULATION:
+ encapsulation = wxT("raw");
+ break;
case MP4_ENCAPSULATION:
encapsulation = wxT("mp4");
break;
+ case MOV_ENCAPSULATION:
+ encapsulation = wxT("mov");
+ break;
+ case ASF_ENCAPSULATION:
+ encapsulation = wxT("asf");
+ break;
case TS_ENCAPSULATION:
default:
encapsulation = wxT("ts");
net_ports[HTTP_ACCESS_OUT]->GetValue() );
dup_opts += wxT("}");
}
+ if( access_checkboxes[MMSH_ACCESS_OUT]->IsChecked() )
+ {
+ if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
+ dup_opts += wxT("dst=std{access=mmsh,mux=");
+ dup_opts += encapsulation;
+ if( i_encapsulation_type == ASF_ENCAPSULATION ) dup_opts += wxT("h");
+ dup_opts += wxT(",url=");
+ dup_opts += net_addrs[HTTP_ACCESS_OUT]->GetLineText(0);
+ dup_opts += wxString::Format( wxT(":%d"),
+ net_ports[MMSH_ACCESS_OUT]->GetValue() );
+ dup_opts += wxT("}");
+ }
if( access_checkboxes[UDP_ACCESS_OUT]->IsChecked() )
{
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=udp,mux=");
dup_opts += encapsulation + wxT(",url=");
- dup_opts += net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
+
+ wxString udp_addr = net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
+ if ((udp_addr[0u] != '[') && (udp_addr.Find(':') != -1))
+ {
+ dup_opts += wxT ("[") + udp_addr + wxT ("]");
+ }
+ else
+ {
+ dup_opts += udp_addr;
+ }
dup_opts += wxString::Format( wxT(":%d"),
net_ports[UDP_ACCESS_OUT]->GetValue() );
/* SAP only if UDP */
if( sap_checkbox->IsChecked() )
{
- dup_opts += wxT(",sap=\"");
- dup_opts += sap_addr->GetLineText(0);
- dup_opts += wxT("\"");
+ dup_opts += wxT(",sap");
+ if( ! announce_addr->GetLineText(0).IsEmpty() )
+ {
+ dup_opts += wxT(",name=\"");
+ dup_opts += announce_addr->GetLineText(0);
+ dup_opts += wxT("\"");
+ }
+ }
+
+ /* SLP only if UDP */
+ if( slp_checkbox->IsChecked() )
+ {
+ dup_opts += wxT(",slp");
+ if( ! sap_checkbox->IsChecked() &&
+ ! announce_addr->GetLineText(0).IsEmpty() )
+ {
+ dup_opts += wxT(",name=\"");
+ dup_opts += announce_addr->GetLineText(0);
+ dup_opts += wxT("\"");
+ }
}
dup_opts += wxT("}");
}
if( !transcode.IsEmpty() || !duplicate.IsEmpty() )
- mrl_combo->SetValue( wxT("#") + transcode + duplicate );
+ mrl_combo->SetValue( wxT(":sout=#") + transcode + duplicate );
else
mrl_combo->SetValue( wxT("") );
}
wxPanel *panel = new wxPanel( parent, -1, wxDefaultPosition,
wxSize(200, 200) );
- wxFlexGridSizer *sizer = new wxFlexGridSizer( 2, 4, 20 );
wxStaticBox *panel_box = new wxStaticBox( panel, -1,
- wxU(_("Output Methods")) );
+ wxU(_("Output methods")) );
wxStaticBoxSizer *panel_sizer = new wxStaticBoxSizer( panel_box,
wxVERTICAL );
+ wxFlexGridSizer *sizer = new wxFlexGridSizer( 2, 4, 20 );
static const wxString access_output_array[] =
{
wxU(_("Play locally")),
wxU(_("File")),
wxU(_("HTTP")),
+ wxU(_("MMSH")),
wxU(_("UDP")),
wxU(_("RTP"))
};
subpanel_sizer = new wxFlexGridSizer( 1, 1, 20 );
subpanel_sizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
access_subpanels[0]->SetSizerAndFit( subpanel_sizer );
+ access_subpanels[0]->Hide();
/* File row */
- subpanel_sizer = new wxFlexGridSizer( 3, 1, 20 );
+ subpanel_sizer = new wxFlexGridSizer( 3, 2, 20 );
label = new wxStaticText( access_subpanels[1], -1, wxU(_("Filename")) );
file_combo = new wxComboBox( access_subpanels[1], FileName_Event, wxT(""),
wxPoint(20,25), wxSize(200, -1), 0, NULL );
wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( browse_button, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
+ subpanel_sizer->Add( new wxPanel(access_subpanels[1], -1), 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ dump_checkbox = new wxCheckBox( access_subpanels[1], FileDump_Event,
+ wxU(_("Dump raw input")) );
+ subpanel_sizer->Add( dump_checkbox, 0,
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, 5 );
access_subpanels[1]->SetSizerAndFit( subpanel_sizer );
wxPanel *panel = new wxPanel( parent, -1, wxDefaultPosition,
wxSize(200, 200) );
- // wxFlexGridSizer *sizer = new wxFlexGridSizer( 2, 4, 20 );
wxStaticBox *panel_box = new wxStaticBox( panel, -1,
- wxU(_("Miscellaneous Options")) );
+ wxU(_("Miscellaneous options")) );
wxStaticBoxSizer *panel_sizer = new wxStaticBoxSizer( panel_box,
wxVERTICAL );
- /* SAP Row */
- wxStaticText *label;
- wxFlexGridSizer *subpanel_sizer;
+ /* Announce Row */
+ misc_subpanels[ANN_MISC_SOUT] = new wxPanel( panel, -1 );
+ wxFlexGridSizer *subpanel_sizer = new wxFlexGridSizer( 4, 4, 20 );
- misc_subpanels[SAP_MISC] = new wxPanel( panel, -1 );
- subpanel_sizer = new wxFlexGridSizer( 4, 2, 20 );
+ sap_checkbox = new wxCheckBox( misc_subpanels[ANN_MISC_SOUT],SAPMisc_Event,
+ wxU(_("SAP announce")) );
+ slp_checkbox = new wxCheckBox( misc_subpanels[ANN_MISC_SOUT],SLPMisc_Event,
+ wxU(_("SLP announce")) );
- sap_checkbox = new wxCheckBox( misc_subpanels[SAP_MISC], SAPMisc_Event,
- wxU(_("SAP Announce")) );
- label = new wxStaticText( misc_subpanels[SAP_MISC], -1,
- wxU(_("Channel Name ")) );
- sap_addr = new wxTextCtrl( misc_subpanels[SAP_MISC], SAPAddr_Event,
- wxT(""), wxDefaultPosition,
- wxSize( 200, -1 ), wxTE_PROCESS_ENTER);
+ wxStaticText *label = new wxStaticText( misc_subpanels[ANN_MISC_SOUT], -1,
+ wxU(_("Channel name")) );
+ announce_addr = new wxTextCtrl( misc_subpanels[ANN_MISC_SOUT],
+ AnnounceAddr_Event,
+ wxT(""), wxDefaultPosition,
+ wxSize( 200, -1 ), wxTE_PROCESS_ENTER);
subpanel_sizer->Add( sap_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ subpanel_sizer->Add( slp_checkbox, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
- subpanel_sizer->Add( sap_addr, 1, wxEXPAND |
+ subpanel_sizer->Add( announce_addr, 1, wxEXPAND |
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
- misc_subpanels[SAP_MISC]->SetSizerAndFit( subpanel_sizer );
+ misc_subpanels[ANN_MISC_SOUT]->SetSizerAndFit( subpanel_sizer );
/* Stuff everything into the main panel */
- panel_sizer->Add( misc_subpanels[SAP_MISC], 1,
+ panel_sizer->Add( misc_subpanels[ANN_MISC_SOUT], 1,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
panel->SetSizerAndFit( panel_sizer );
/* Update misc panel */
- misc_subpanels[SAP_MISC]->Disable();
- sap_addr->Disable();
+ misc_subpanels[ANN_MISC_SOUT]->Disable();
+ announce_addr->Disable();
return panel;
-}
+}
wxPanel *SoutDialog::EncapsulationPanel( wxWindow* parent )
{
{
wxT("MPEG TS"),
wxT("MPEG PS"),
- wxT("AVI"),
+ wxT("MPEG 1"),
wxT("Ogg"),
- wxT("MP4/MOV")
+ wxT("Raw"),
+ wxT("ASF"),
+ wxT("AVI"),
+ wxT("MP4"),
+ wxT("MOV")
};
/* Stuff everything into the main panel */
new wxRadioButton( panel, EncapsulationRadio1_Event + i,
encapsulation_array[i] );
panel_sizer->Add( encapsulation_radios[i], 0,
- wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 8 );
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL |
+ wxALL, 4 );
}
panel->SetSizerAndFit( panel_sizer );
wxVERTICAL );
/* Create video transcoding checkox */
- static const wxString vcodecs_array[] =
+ static const wxString wxvcodecs_array[] =
{
- wxT("mpgv"),
+ wxT("mp1v"),
+ wxT("mp2v"),
wxT("mp4v"),
wxT("DIV1"),
wxT("DIV2"),
wxT("I263"),
wxT("WMV1"),
wxT("WMV2"),
- wxT("MJPG")
+ wxT("MJPG"),
+ wxT("theo")
};
+ /*
static const wxString vbitrates_array[] =
{
- wxT("3000"),
- wxT("2000"),
- wxT("1000"),
- wxT("750"),
- wxT("500"),
- wxT("400"),
- wxT("200"),
- wxT("150"),
- wxT("100")
+ wxT("3072"),
+ wxT("2048"),
+ wxT("1024"),
+ wxT("768"),
+ wxT("512"),
+ wxT("384"),
+ wxT("256"),
+ wxT("192"),
+ wxT("128"),
+ wxT("96"),
+ wxT("64"),
+ wxT("32"),
+ wxT("16")
+ };
+*/
+ static const wxString vscales_array[] =
+ {
+ wxT("0.25"),
+ wxT("0.5"),
+ wxT("0.75"),
+ wxT("1"),
+ wxT("1.25"),
+ wxT("1.5"),
+ wxT("1.75"),
+ wxT("2")
};
- wxFlexGridSizer *video_sizer = new wxFlexGridSizer( 4, 1, 20 );
+ wxFlexGridSizer *video_sizer = new wxFlexGridSizer( 6, 1, 20 );
video_transc_checkbox =
new wxCheckBox( panel, VideoTranscEnable_Event, wxU(_("Video codec")));
video_codec_combo =
new wxComboBox( panel, VideoTranscCodec_Event, wxT(""),
- wxPoint(20,25), wxDefaultSize, WXSIZEOF(vcodecs_array),
- vcodecs_array, wxCB_READONLY );
- video_codec_combo->SetSelection(1);
+ wxPoint(20,25), wxDefaultSize,
+ WXSIZEOF(wxvcodecs_array),
+ wxvcodecs_array, wxCB_READONLY );
+ video_codec_combo->SetSelection(2);
wxStaticText *bitrate_label =
new wxStaticText( panel, -1, wxU(_("Bitrate (kb/s)")));
video_bitrate_combo =
- new wxComboBox( panel, VideoTranscBitrate_Event, wxT("1000"),
+ new wxComboBox( panel, VideoTranscBitrate_Event, wxT("1024"),
wxPoint(20,25), wxDefaultSize,
WXSIZEOF(vbitrates_array), vbitrates_array );
+ wxStaticText *scale_label =
+ new wxStaticText( panel, -1, wxU(_("Scale")));
+ video_scale_combo =
+ new wxComboBox( panel, VideoTranscScale_Event, wxT("1"),
+ wxPoint(20,25), wxDefaultSize,
+ WXSIZEOF(vscales_array), vscales_array );
video_sizer->Add( video_transc_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
video_sizer->Add( video_codec_combo, 1,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
video_sizer->Add( video_bitrate_combo, 1,
wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ video_sizer->Add( scale_label, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ video_sizer->Add( video_scale_combo, 1,
+ wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
/* Create audio transcoding checkox */
- static const wxString acodecs_array[] =
+ static const wxString wxacodecs_array[] =
{
wxT("mpga"),
wxT("mp3"),
+ wxT("mp4a"),
wxT("a52"),
- wxT("vorb")
+ wxT("vorb"),
+ wxT("flac"),
+ wxT("spx")
+ };
+ static const wxString achannels_array[] =
+ {
+ wxT("1"),
+ wxT("2"),
+ wxT("4"),
+ wxT("6")
};
+/*
static const wxString abitrates_array[] =
{
- wxT("512"),
- wxT("256"),
- wxT("192"),
- wxT("128"),
- wxT("96")
+ wxT("512"),
+ wxT("256"),
+ wxT("192"),
+ wxT("128"),
+ wxT("96"),
+ wxT("64"),
+ wxT("32"),
+ wxT("16")
};
-
- wxFlexGridSizer *audio_sizer = new wxFlexGridSizer( 4, 1, 20 );
+*/
+ wxFlexGridSizer *audio_sizer = new wxFlexGridSizer( 3, 1, 20 );
audio_transc_checkbox =
new wxCheckBox( panel, AudioTranscEnable_Event, wxU(_("Audio codec")));
audio_codec_combo =
new wxComboBox( panel, AudioTranscCodec_Event, wxT(""),
- wxPoint(20,25), wxDefaultSize, WXSIZEOF(acodecs_array),
- acodecs_array, wxCB_READONLY );
+ wxPoint(10,25), wxDefaultSize,
+ WXSIZEOF(wxacodecs_array),
+ wxacodecs_array, wxCB_READONLY );
audio_codec_combo->SetSelection(0);
+#if defined( __WXMSW__ )
+ wxFlexGridSizer *audio_sub_sizer = new wxFlexGridSizer( 4, 5, 20 );
+#else
+ wxFlexGridSizer *audio_sub_sizer = new wxFlexGridSizer( 2, 5, 20 );
+#endif
bitrate_label =
new wxStaticText( panel, -1, wxU(_("Bitrate (kb/s)")));
audio_bitrate_combo =
new wxComboBox( panel, AudioTranscBitrate_Event, wxT("192"),
- wxPoint(20,25), wxDefaultSize,
+ wxPoint(10,25), wxDefaultSize,
WXSIZEOF(abitrates_array), abitrates_array );
+ wxStaticText *channels_label =
+ new wxStaticText( panel, -1, wxU(_("Channels")));
+ audio_channels_combo =
+ new wxComboBox( panel, AudioTranscChans_Event, wxT(""),
+ wxPoint(10,25), wxDefaultSize,
+ WXSIZEOF(achannels_array), achannels_array );
+ audio_channels_combo->SetSelection(1);
+ audio_sub_sizer->Add( bitrate_label, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ audio_sub_sizer->Add( audio_bitrate_combo, 1,
+ wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ audio_sub_sizer->Add( channels_label, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+ audio_sub_sizer->Add( audio_channels_combo, 1,
+ wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+
audio_sizer->Add( audio_transc_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
audio_sizer->Add( audio_codec_combo, 1,
wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
- audio_sizer->Add( bitrate_label, 0,
- wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
- audio_sizer->Add( audio_bitrate_combo, 1,
+ audio_sizer->Add( audio_sub_sizer, 1,
wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
/* Stuff everything into the main panel */
void SoutDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
{
mrl_combo->Append( mrl_combo->GetValue() );
- mrl = mrl_combo->GetValue();
EndModal( wxID_OK );
-
}
void SoutDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
switch( i_access_type )
{
case UDP_ACCESS_OUT:
- misc_subpanels[SAP_MISC]->Enable( event.GetInt() );
+ misc_subpanels[ANN_MISC_SOUT]->Enable( event.GetInt() );
case RTP_ACCESS_OUT:
for( i = 1; i < ENCAPS_NUM; i++ )
}
/*****************************************************************************
- * SAPMisc panel event methods.
+ * AnnounceMisc panel event methods.
*****************************************************************************/
void SoutDialog::OnSAPMiscChange( wxCommandEvent& event )
{
- sap_addr->Enable( event.GetInt() );
+ if( !slp_checkbox->IsChecked() )
+ {
+ announce_addr->Enable( event.GetInt() );
+ }
+ UpdateMRL();
+}
+
+void SoutDialog::OnSLPMiscChange( wxCommandEvent& event )
+{
+ if( !sap_checkbox->IsChecked() )
+ {
+ announce_addr->Enable( event.GetInt() );
+ }
UpdateMRL();
}
/*****************************************************************************
* SAPAddr panel event methods.
*****************************************************************************/
-void SoutDialog::OnSAPAddrChange( wxCommandEvent& WXUNUSED(event) )
+void SoutDialog::OnAnnounceAddrChange( wxCommandEvent& WXUNUSED(event) )
{
UpdateMRL();
}
void SoutDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
{
- wxFileDialog dialog( this, wxU(_("Save file")),
- wxT(""), wxT(""), wxT("*"), wxSAVE );
+ wxFileDialog dialog( this, wxU(_("Save file")), wxT(""), wxT(""), wxT("*"),
+ wxSAVE | wxOVERWRITE_PROMPT );
if( dialog.ShowModal() == wxID_OK )
{
}
}
+void SoutDialog::OnFileDump( wxCommandEvent& event )
+{
+ misc_panel->Enable( !event.GetInt() );
+ encapsulation_panel->Enable( !event.GetInt() );
+ transcoding_panel->Enable( !event.GetInt() );
+
+ for( int i = 0; i < ACCESS_OUT_NUM; i++ )
+ {
+ if( i != FILE_ACCESS_OUT )
+ {
+ access_checkboxes[i]->Enable( !event.GetInt() );
+ access_subpanels[i]->Enable( !event.GetInt() &&
+ access_checkboxes[i]->IsChecked() );
+ }
+ }
+
+ UpdateMRL();
+}
+
/*****************************************************************************
* Net access output event methods.
*****************************************************************************/
case VideoTranscEnable_Event:
video_codec_combo->Enable( event.GetInt() );
video_bitrate_combo->Enable( event.GetInt() );
+ video_scale_combo->Enable( event.GetInt() );
break;
case AudioTranscEnable_Event:
audio_codec_combo->Enable( event.GetInt() );
audio_bitrate_combo->Enable( event.GetInt() );
+ audio_channels_combo->Enable( event.GetInt() );
break;
}