Commit bcec187b authored by Antoine Cellerier's avatar Antoine Cellerier

* added SAP group announcing support in the sout dialog

parent b851c88a
......@@ -72,7 +72,7 @@ enum
AudioTranscEnable_Event, AudioTranscCodec_Event, AudioTranscBitrate_Event,
AudioTranscChans_Event,
SAPMisc_Event, SLPMisc_Event, AnnounceAddr_Event
SAPMisc_Event, SLPMisc_Event, AnnounceGroup_Event, AnnounceAddr_Event
};
BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
......@@ -139,6 +139,7 @@ BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
/* Events generated by the misc panel */
EVT_CHECKBOX(SAPMisc_Event, SoutDialog::OnSAPMiscChange)
EVT_CHECKBOX(SLPMisc_Event, SoutDialog::OnSLPMiscChange)
EVT_TEXT(AnnounceGroup_Event, SoutDialog::OnAnnounceGroupChange)
EVT_TEXT(AnnounceAddr_Event, SoutDialog::OnAnnounceAddrChange)
END_EVENT_TABLE()
......@@ -363,6 +364,12 @@ void SoutDialog::UpdateMRL()
if( sap_checkbox->IsChecked() )
{
dup_opts += wxT(",sap");
if( ! announce_group->GetLineText(0).IsEmpty() )
{
dup_opts += wxT(",group=\"");
dup_opts += announce_group->GetLineText(0);
dup_opts += wxT("\"");
}
if( ! announce_addr->GetLineText(0).IsEmpty() )
{
dup_opts += wxT(",name=\"");
......@@ -537,13 +544,21 @@ wxPanel *SoutDialog::MiscPanel( wxWindow* parent )
/* Announce Row */
misc_subpanels[ANN_MISC_SOUT] = new wxPanel( panel, -1 );
wxFlexGridSizer *subpanel_sizer = new wxFlexGridSizer( 4, 4, 20 );
wxFlexGridSizer *subpanel_sizer = new wxFlexGridSizer( 3, 4, 20 );
wxFlexGridSizer *subpanel_sub_sizer = new wxFlexGridSizer( 2, 4, 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")) );
wxStaticText *label_g = new wxStaticText( misc_subpanels[ANN_MISC_SOUT], -1,
wxU(_("Group name")) );
announce_group = new wxTextCtrl( misc_subpanels[ANN_MISC_SOUT],
AnnounceGroup_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],
......@@ -555,8 +570,15 @@ wxPanel *SoutDialog::MiscPanel( wxWindow* parent )
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( announce_addr, 1, wxEXPAND |
subpanel_sub_sizer->Add( label_g, 0, wxALIGN_RIGHT |
wxALIGN_CENTER_VERTICAL );
subpanel_sub_sizer->Add( announce_group, 1, wxEXPAND |
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
subpanel_sub_sizer->Add( label, 0, wxALIGN_RIGHT |
wxALIGN_CENTER_VERTICAL );
subpanel_sub_sizer->Add( announce_addr, 1, wxEXPAND |
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( subpanel_sub_sizer, 1, wxEXPAND |
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
misc_subpanels[ANN_MISC_SOUT]->SetSizerAndFit( subpanel_sizer );
......@@ -569,6 +591,7 @@ wxPanel *SoutDialog::MiscPanel( wxWindow* parent )
/* Update misc panel */
misc_subpanels[ANN_MISC_SOUT]->Disable();
announce_group->Disable();
announce_addr->Disable();
return panel;
......@@ -869,6 +892,7 @@ void SoutDialog::OnSAPMiscChange( wxCommandEvent& event )
{
announce_addr->Enable( event.GetInt() );
}
announce_group->Enable( event.GetInt() );
UpdateMRL();
}
......@@ -889,6 +913,11 @@ void SoutDialog::OnAnnounceAddrChange( wxCommandEvent& WXUNUSED(event) )
UpdateMRL();
}
void SoutDialog::OnAnnounceGroupChange( wxCommandEvent& WXUNUSED(event) )
{
UpdateMRL();
}
/*****************************************************************************
* File access output event methods.
*****************************************************************************/
......
......@@ -566,6 +566,7 @@ private:
void OnNetChange( wxCommandEvent& event );
/* Event specific to the announce address */
void OnAnnounceGroupChange( wxCommandEvent& event );
void OnAnnounceAddrChange( wxCommandEvent& event );
/* Event handlers for the encapsulation panel */
......@@ -603,6 +604,7 @@ private:
wxPanel *misc_subpanels[MISC_SOUT_NUM];
wxCheckBox *sap_checkbox;
wxCheckBox *slp_checkbox;
wxTextCtrl *announce_group;
wxTextCtrl *announce_addr;
/* Controls for the encapsulation */
......
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