]> git.sesse.net Git - vlc/commitdiff
added RTP method to streamout dialog
authorMarian Durkovic <md@videolan.org>
Thu, 20 Oct 2005 11:09:02 +0000 (11:09 +0000)
committerMarian Durkovic <md@videolan.org>
Thu, 20 Oct 2005 11:09:02 +0000 (11:09 +0000)
modules/gui/wxwidgets/streamout.cpp
modules/gui/wxwidgets/wxwidgets.h

index 6f186b940651e592c1cb247869b2dda75f8826a0..13d9e4773992214967d41cce0799d1385dd620e6 100644 (file)
@@ -361,6 +361,45 @@ void SoutDialog::UpdateMRL()
                                       net_ports[MMSH_ACCESS_OUT]->GetValue() );
         dup_opts += wxT("}");
     }
+    if( access_checkboxes[RTP_ACCESS_OUT]->IsChecked() )
+    {
+        if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
+        dup_opts += wxT("dst=std{access=rtp,mux=");
+        dup_opts += encapsulation + wxT(",url=");
+
+        wxString rtp_addr = net_addrs[RTP_ACCESS_OUT]->GetLineText(0);
+        if ((rtp_addr[0u] != '[') && (rtp_addr.Find(':') != -1))
+        {
+            dup_opts += wxT ("[") + rtp_addr + wxT ("]");
+        }
+        else
+        {
+            dup_opts += rtp_addr;
+        }
+        dup_opts += wxString::Format( wxT(":%d"),
+                                      net_ports[RTP_ACCESS_OUT]->GetValue() );
+
+        /* SAP if RTP */
+        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=\"");
+                dup_opts += announce_addr->GetLineText(0);
+                dup_opts += wxT("\"");
+            }
+        }
+
+        dup_opts += wxT("}");
+    }
+
     if( access_checkboxes[UDP_ACCESS_OUT]->IsChecked() )
     {
         if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
@@ -379,7 +418,7 @@ void SoutDialog::UpdateMRL()
         dup_opts += wxString::Format( wxT(":%d"),
                                       net_ports[UDP_ACCESS_OUT]->GetValue() );
 
-        /* SAP only if UDP */
+        /* SAP if UDP */
         if( sap_checkbox->IsChecked() )
         {
             dup_opts += wxT(",sap");
@@ -439,6 +478,7 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent )
         wxU(_("File")),
         wxU(_("HTTP")),
         wxU(_("MMSH")),
+        wxU(_("RTP")),
         wxU(_("UDP")),
     };
 
@@ -922,6 +962,7 @@ void SoutDialog::OnAccessTypeChange( wxCommandEvent& event )
     switch( i_access_type )
     {
     case UDP_ACCESS_OUT:
+    case RTP_ACCESS_OUT:
         misc_subpanels[ANN_MISC_SOUT]->Enable( event.GetInt() );
 
         for( i = 1; i < ENCAPS_NUM; i++ )
index 7c0726cd86818491616d6b3ba84c9990800d2088..5177d2576315778127affe79921f13ada6fd118e 100644 (file)
@@ -597,6 +597,7 @@ enum
     FILE_ACCESS_OUT,
     HTTP_ACCESS_OUT,
     MMSH_ACCESS_OUT,
+    RTP_ACCESS_OUT,
     UDP_ACCESS_OUT,
     ACCESS_OUT_NUM
 };