Commit aa61b3ff authored by Benjamin Pracht's avatar Benjamin Pracht

* All :

	- added a sdp=file option
	- it is now possible to have a sap and a rtsp/http/file announce at the same time
parent b5c2d452
...@@ -315,6 +315,7 @@ ...@@ -315,6 +315,7 @@
"o_channel_name_lbl" = id; "o_channel_name_lbl" = id;
"o_display" = id; "o_display" = id;
"o_dump_chkbox" = id; "o_dump_chkbox" = id;
"o_file_chkbox" = id;
"o_file_field" = id; "o_file_field" = id;
"o_http_chkbox" = id; "o_http_chkbox" = id;
"o_method" = id; "o_method" = id;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>514 222 505 517 0 0 1024 746 </string> <string>571 224 505 517 0 0 1024 746 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>1617</key> <key>1617</key>
...@@ -21,9 +21,10 @@ ...@@ -21,9 +21,10 @@
</array> </array>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>29</integer>
<integer>1617</integer>
<integer>21</integer> <integer>21</integer>
<integer>1617</integer>
<integer>29</integer>
<integer>1411</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>7H63</string> <string>7H63</string>
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
IBOutlet id o_sdp_url_lbl; IBOutlet id o_sdp_url_lbl;
IBOutlet id o_rtsp_chkbox; IBOutlet id o_rtsp_chkbox;
IBOutlet id o_http_chkbox; IBOutlet id o_http_chkbox;
IBOutlet id o_file_chkbox;
NSString *o_mrl; NSString *o_mrl;
NSString *o_transcode; NSString *o_transcode;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <thedj@users.sourceforge.net> * Derk-Jan Hartman <thedj@users.sourceforge.net>
* Benjamin Pracht <bigben AT videolan DOT org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -172,9 +173,10 @@ ...@@ -172,9 +173,10 @@
[o_slp_chkbox setTitle: _NS("SLP announce")]; [o_slp_chkbox setTitle: _NS("SLP announce")];
[o_rtsp_chkbox setTitle: _NS("RTSP announce")]; [o_rtsp_chkbox setTitle: _NS("RTSP announce")];
[o_http_chkbox setTitle:_NS("HTTP announce")]; [o_http_chkbox setTitle:_NS("HTTP announce")];
[o_file_chkbox setTitle:_NS("Export SDP as file")];
[o_channel_name_lbl setStringValue: _NS("Channel Name")]; [o_channel_name_lbl setStringValue: _NS("Channel Name")];
[o_sdp_url_lbl setStringValue: _NS("SDP file address")]; [o_sdp_url_lbl setStringValue: _NS("SDP URL")];
} }
- (IBAction)outputChanged:(id)sender; - (IBAction)outputChanged:(id)sender;
...@@ -213,6 +215,7 @@ ...@@ -213,6 +215,7 @@
[o_slp_chkbox setEnabled: NO]; [o_slp_chkbox setEnabled: NO];
[o_http_chkbox setEnabled: NO]; [o_http_chkbox setEnabled: NO];
[o_rtsp_chkbox setEnabled: NO]; [o_rtsp_chkbox setEnabled: NO];
[o_file_chkbox setEnabled: NO];
[o_channel_name setEnabled: NO]; [o_channel_name setEnabled: NO];
[o_sdp_url setEnabled: NO]; [o_sdp_url setEnabled: NO];
[[o_mux_selector itemAtIndex: 0] setEnabled: YES]; [[o_mux_selector itemAtIndex: 0] setEnabled: YES];
...@@ -316,6 +319,7 @@ ...@@ -316,6 +319,7 @@
[o_slp_chkbox setEnabled: NO]; [o_slp_chkbox setEnabled: NO];
[o_rtsp_chkbox setEnabled: YES]; [o_rtsp_chkbox setEnabled: YES];
[o_http_chkbox setEnabled: YES]; [o_http_chkbox setEnabled: YES];
[o_file_chkbox setEnabled: YES];
[o_channel_name setEnabled: YES]; [o_channel_name setEnabled: YES];
} }
} }
...@@ -333,7 +337,8 @@ ...@@ -333,7 +337,8 @@
- (void)outputInfoChanged:(NSNotification *)o_notification - (void)outputInfoChanged:(NSNotification *)o_notification
{ {
NSString *o_mode, *o_mux, *o_mux_string, *o_announce; NSString *o_mode, *o_mux, *o_mux_string;
NSMutableString *o_announce = [NSMutableString stringWithString:@""];
NSMutableString *o_mrl_string = [NSMutableString stringWithString:@":sout=#"]; NSMutableString *o_mrl_string = [NSMutableString stringWithString:@":sout=#"];
[o_mrl_string appendString: o_transcode]; [o_mrl_string appendString: o_transcode];
...@@ -375,7 +380,6 @@ ...@@ -375,7 +380,6 @@
else if( [o_mode isEqualToString: _NS("Stream")] ) else if( [o_mode isEqualToString: _NS("Stream")] )
{ {
o_mode = [o_stream_type titleOfSelectedItem]; o_mode = [o_stream_type titleOfSelectedItem];
o_announce = @"";
if ( [o_mode isEqualToString: @"HTTP"] ) if ( [o_mode isEqualToString: @"HTTP"] )
o_mode = @"http"; o_mode = @"http";
...@@ -390,18 +394,18 @@ ...@@ -390,18 +394,18 @@
if( [o_sap_chkbox state] == NSOnState ) if( [o_sap_chkbox state] == NSOnState )
{ {
if ( ![[o_channel_name stringValue] isEqualToString: @""] ) if ( ![[o_channel_name stringValue] isEqualToString: @""] )
o_announce = [NSString stringWithFormat:@",sap,name=%@", [o_announce appendFormat:
[o_channel_name stringValue]]; @",sap,name=%@", [o_channel_name stringValue]];
else else
o_announce = @",sap"; [o_announce appendFormat:@",sap"];
} }
if( [o_slp_chkbox state] == NSOnState ) if( [o_slp_chkbox state] == NSOnState )
{ {
if ( ![[o_channel_name stringValue] isEqualToString: @""] ) if ( ![[o_channel_name stringValue] isEqualToString: @""] )
o_announce = [o_announce stringByAppendingFormat:@ [o_announce appendFormat:@
"slp,name=%@",[o_channel_name stringValue]]; "slp,name=%@",[o_channel_name stringValue]];
else else
o_announce = [o_announce stringByAppendingString: @",slp"]; [o_announce appendString: @",slp"];
} }
} }
if ( ![o_mode isEqualToString: @"RTP"] ) if ( ![o_mode isEqualToString: @"RTP"] )
...@@ -415,6 +419,7 @@ ...@@ -415,6 +419,7 @@
else else
{ {
NSString * o_stream_name; NSString * o_stream_name;
if (![[o_channel_name stringValue] isEqualToString: @""] ) if (![[o_channel_name stringValue] isEqualToString: @""] )
{ {
o_stream_name = [NSString stringWithFormat:@",name=%@", o_stream_name = [NSString stringWithFormat:@",name=%@",
...@@ -427,16 +432,20 @@ ...@@ -427,16 +432,20 @@
if ( [o_sap_chkbox state] == NSOnState ) if ( [o_sap_chkbox state] == NSOnState )
{ {
o_announce = @",sdp=sap"; [o_announce appendString: @",sdp=sap"];
} }
else if ([o_rtsp_chkbox state] == NSOnState ) if ([o_rtsp_chkbox state] == NSOnState )
{ {
o_announce = [NSString stringWithFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]]; [o_announce appendFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]];
} }
else if ([o_http_chkbox state] == NSOnState ) if ([o_http_chkbox state] == NSOnState )
{ {
o_announce = [NSString stringWithFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]]; [o_announce appendFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]];
}
if ([o_file_chkbox state] == NSOnState )
{
[o_announce appendFormat:@",sdp=\"file://%@\"",[o_sdp_url stringValue]];
} }
[o_mrl_string appendFormat: [o_mrl_string appendFormat:
@"rtp{dst=\"%@\",port=%@%@%@}",[o_stream_address stringValue], @"rtp{dst=\"%@\",port=%@%@%@}",[o_stream_address stringValue],
...@@ -584,24 +593,32 @@ ...@@ -584,24 +593,32 @@
if ([o_mode isEqualToString: @"RTP"]) if ([o_mode isEqualToString: @"RTP"])
{ {
if ([[sender title] isEqualToString: _NS("SAP announce")]) /* if ([[sender title] isEqualToString: _NS("SAP announce")])
{ {
[o_rtsp_chkbox setState:NSOffState]; [o_rtsp_chkbox setState:NSOffState];
[o_http_chkbox setState:NSOffState]; [o_http_chkbox setState:NSOffState];
} }*/
else if ([[sender title] isEqualToString:_NS("RTSP announce")]) if ([[sender title] isEqualToString:_NS("RTSP announce")])
{ {
[o_sap_chkbox setState:NSOffState]; // [o_sap_chkbox setState:NSOffState];
[o_http_chkbox setState:NSOffState]; [o_http_chkbox setState:NSOffState];
[o_file_chkbox setState:NSOffState];
} }
else if ([[sender title] isEqualToString:_NS("HTTP announce")]) else if ([[sender title] isEqualToString:_NS("HTTP announce")])
{ {
[o_sap_chkbox setState:NSOffState]; // [o_sap_chkbox setState:NSOffState];
[o_rtsp_chkbox setState:NSOffState]; [o_rtsp_chkbox setState:NSOffState];
[o_file_chkbox setState:NSOffState];
}
else if ([[sender title] isEqualToString:_NS("Export SDP as file")])
{
[o_rtsp_chkbox setState:NSOffState];
[o_http_chkbox setState:NSOffState];
} }
if ( [o_rtsp_chkbox state] == NSOnState || if ( [o_rtsp_chkbox state] == NSOnState ||
[o_http_chkbox state] == NSOnState) [o_http_chkbox state] == NSOnState ||
[o_file_chkbox state] == NSOnState )
{ {
[o_sdp_url setEnabled: YES]; [o_sdp_url setEnabled: YES];
} }
......
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