vlc | branch: master | Felix Paul Kühne <[email protected]> | Fri Dec 28 
20:11:00 2012 +0100| [2ad63ccbe4db096771208f8e8c09b8df54ac35c2] | committer: 
Felix Paul Kühne

macosx/CAS: fix SDP announcements

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ad63ccbe4db096771208f8e8c09b8df54ac35c2
---

 modules/gui/macosx/ConvertAndSave.m |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/ConvertAndSave.m 
b/modules/gui/macosx/ConvertAndSave.m
index 937f6c5..6c9933a 100644
--- a/modules/gui/macosx/ConvertAndSave.m
+++ b/modules/gui/macosx/ConvertAndSave.m
@@ -861,7 +861,6 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
             [composedOptions appendFormat:@",soverlay"];
     }
 
-
     if (!b_streaming) {
         /* file transcoding */
         // add muxer
@@ -882,8 +881,21 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
         if ([_stream_sap_ckb state])
             [composedOptions appendFormat:@",sap,name=\"%@\"", 
[_stream_channel_fld stringValue]];
-        if ([_stream_sdp_matrix selectedCell] != [_stream_sdp_matrix 
cellWithTag:0]) //FIXME
-            [composedOptions appendFormat:@",sdp=%@", [_stream_sdp_fld 
stringValue]];
+        if ([_stream_sdp_matrix selectedCell] != [_stream_sdp_matrix 
cellWithTag:0]) {
+            NSInteger tag = [[_stream_sdp_matrix selectedCell] tag];
+            switch (tag) {
+                case 1:
+                    [composedOptions appendFormat:@",sdp=\"http://%@\"";, 
[_stream_sdp_fld stringValue]];
+                    break;
+                case 2:
+                    [composedOptions appendFormat:@",sdp=\"rtsp://%@\"", 
[_stream_sdp_fld stringValue]];
+                    break;
+                case 3:
+                    [composedOptions appendFormat:@",sdp=\"file://%s\"", 
vlc_path2uri([[_stream_sdp_fld stringValue] UTF8String], NULL)];
+                default:
+                    break;
+            }
+        }
 
         [composedOptions appendString:@"} :sout-keep"];
     }

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to