Commit ef198559 authored by Benjamin Pracht's avatar Benjamin Pracht

Added a RTP (New) stream outpu method for the rtp sout module. Still lot of...

Added a RTP (New) stream outpu method for the rtp sout module. Still lot of work in this dialog box.


parent eb83d508
......@@ -316,6 +316,7 @@
"o_display" = id;
"o_dump_chkbox" = id;
"o_file_field" = id;
"o_http_chkbox" = id;
"o_method" = id;
"o_misc_lbl" = id;
"o_mux_lbl" = id;
......@@ -325,7 +326,10 @@
"o_output_ckbox" = id;
"o_output_settings" = id;
"o_output_sheet" = id;
"o_rtsp_chkbox" = id;
"o_sap_chkbox" = id;
"o_sdp_url" = id;
"o_sdp_url_lbl" = id;
"o_slp_chkbox" = id;
"o_stream_address" = id;
"o_stream_address_lbl" = id;
......
......@@ -3,28 +3,28 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>391 199 505 517 0 0 1280 1002 </string>
<string>539 187 505 517 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>693 686 104 149 0 0 1280 1002 </string>
<string>542 480 104 149 0 0 1024 746 </string>
<key>29</key>
<string>-9 958 419 44 0 0 1280 1002 </string>
<string>366 655 419 44 0 0 1024 746 </string>
<key>915</key>
<string>54 452 185 199 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>364.0</string>
<string>362.0</string>
<key>IBLockedObjects</key>
<array>
<integer>1789</integer>
</array>
<key>IBOpenObjects</key>
<array>
<integer>1411</integer>
<integer>29</integer>
<integer>21</integer>
<integer>1617</integer>
<integer>1647</integer>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>7H63</string>
......
......@@ -105,6 +105,10 @@
selector: @selector(transcodeInfoChanged:)
name: NSControlTextDidChangeNotification
object: o_channel_name];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(transcodeInfoChanged:)
name: NSControlTextDidChangeNotification
object: o_sdp_url];
[o_mux_selector setAutoenablesItems: NO];
[self transcodeChanged:nil];
......@@ -140,6 +144,7 @@
[[o_stream_type itemAtIndex: 1] setTitle: @"MMSH"];
[[o_stream_type itemAtIndex: 2] setTitle: @"UDP"];
[[o_stream_type itemAtIndex: 3] setTitle: @"RTP"];
[[o_stream_type itemAtIndex: 4] setTitle: @"RTP (New)"];
[o_stream_type_lbl setStringValue: _NS("Type")];
[o_mux_lbl setStringValue: _NS("Encapsulation Method")];
......@@ -166,7 +171,11 @@
[o_misc_lbl setTitle: _NS("Stream Announcing")];
[o_sap_chkbox setTitle: _NS("SAP announce")];
[o_slp_chkbox setTitle: _NS("SLP announce")];
[o_rtsp_chkbox setTitle: _NS("RTSP announce")];
[o_http_chkbox setTitle:_NS("HTTP announce")];
[o_channel_name_lbl setStringValue: _NS("Channel Name")];
[o_sdp_url_lbl setStringValue: _NS("SDP file address")];
}
- (IBAction)outputChanged:(id)sender;
......@@ -203,7 +212,10 @@
[o_sap_chkbox setEnabled: NO];
[o_slp_chkbox setEnabled: NO];
[o_http_chkbox setEnabled: NO];
[o_rtsp_chkbox setEnabled: NO];
[o_channel_name setEnabled: NO];
[o_sdp_url setEnabled: NO];
[[o_mux_selector itemAtIndex: 0] setEnabled: YES];
if( [o_mode isEqualToString: _NS("File")] )
......@@ -267,6 +279,7 @@
[[o_mux_selector itemAtIndex: 6] setEnabled: NO];
[[o_mux_selector itemAtIndex: 7] setEnabled: NO];
[[o_mux_selector itemAtIndex: 8] setEnabled: NO];
[o_mux_selector selectItemAtIndex: 5];
}
else if( [o_mode isEqualToString: @"UDP"] )
{
......@@ -299,11 +312,37 @@
[[o_mux_selector itemAtIndex: 7] setEnabled: NO];
[[o_mux_selector itemAtIndex: 8] setEnabled: YES];
}
else if( [o_mode isEqualToString: @"RTP (New)"] )
{
[o_stream_address setEnabled: YES];
[o_stream_ttl setEnabled: YES];
[o_stream_ttl_stp setEnabled: YES];
[[o_mux_selector itemAtIndex: 0] setEnabled: NO];
[[o_mux_selector itemAtIndex: 1] setEnabled: NO];
[[o_mux_selector itemAtIndex: 2] setEnabled: NO];
[[o_mux_selector itemAtIndex: 3] setEnabled: NO];
[[o_mux_selector itemAtIndex: 4] setEnabled: NO];
[[o_mux_selector itemAtIndex: 5] setEnabled: NO];
[[o_mux_selector itemAtIndex: 6] setEnabled: NO];
[[o_mux_selector itemAtIndex: 7] setEnabled: NO];
[[o_mux_selector itemAtIndex: 8] setEnabled: YES];
[o_mux_selector selectItemAtIndex: 8];
[o_sap_chkbox setEnabled: YES];
[o_slp_chkbox setEnabled: NO];
[o_rtsp_chkbox setEnabled: YES];
[o_http_chkbox setEnabled: YES];
[o_channel_name setEnabled: YES];
}
if( ![[o_mux_selector selectedItem] isEnabled] )
}
if( ![[o_mux_selector selectedItem] isEnabled] && ![o_mode isEqualToString: @"RTP (New)"] )
{
[o_mux_selector selectItemAtIndex: 0];
}
else if (![[o_mux_selector selectedItem] isEnabled] && [o_mode isEqualToString: @"RTP (New)"] )
{
[o_mux_selector selectItemAtIndex: 8];
}
[self outputInfoChanged: nil];
}
......@@ -383,11 +422,46 @@
else if ( [o_mode isEqualToString: @"RTP"] )
o_mode = @"rtp";
if ( ![o_mode isEqualToString: @"RTP (New)"] )
{
[o_mrl_string appendFormat:
@"std{access=%@,mux=%@,url=\"%@:%@\"%@}",
o_mode, o_mux_string, [o_stream_address stringValue],
[o_stream_port stringValue], o_announce];
}
else
{
NSString * o_stream_name;
if (![[o_channel_name stringValue] isEqualToString: @""] )
{
o_stream_name = [NSString stringWithFormat:@",name=%@",
[o_channel_name stringValue]];
}
else
{
o_stream_name = @"";
}
if ( [o_sap_chkbox state] == NSOnState )
{
o_announce = @",sdp=sap";
}
else if ([o_rtsp_chkbox state] == NSOnState )
{
o_announce = [NSString stringWithFormat:@",sdp=\"rtsp://%@\"",[o_sdp_url stringValue]];
}
else if ([o_http_chkbox state] == NSOnState )
{
o_announce = [NSString stringWithFormat:@",sdp=\"http://%@\"",[o_sdp_url stringValue]];
}
[o_mrl_string appendFormat:
@"rtp{dst=\"%@\",port=%@%@%@}",[o_stream_address stringValue],
[o_stream_port stringValue], o_stream_name, o_announce];
}
}
if( [o_display state] == NSOnState )
{
[o_mrl_string appendString: @"}"];
......@@ -499,6 +573,7 @@
}
if ( [o_transcode_audio_chkbox state] == NSOnState )
{
fprintf(stderr,"%s\n",[[o_transcode_audio_bitrate stringValue] cString]);
[o_transcode_string appendFormat: @"acodec=\"%@\",ab=\"%@\"",
[o_transcode_audio_selector titleOfSelectedItem],
[o_transcode_audio_bitrate stringValue]];
......@@ -515,7 +590,39 @@
- (IBAction)announceChanged:(id)sender
{
[o_channel_name setEnabled: [o_sap_chkbox state] || [o_slp_chkbox state]];
NSString *o_mode;
o_mode = [[o_stream_type selectedCell] title];
[o_channel_name setEnabled: [o_sap_chkbox state] || [o_slp_chkbox state]
|| [o_mode isEqualToString: @"RTP (New)"]];
if ([o_mode isEqualToString: @"RTP (New)"])
{
if ([[sender title] isEqualToString: _NS("SAP announce")])
{
[o_rtsp_chkbox setState:NSOffState];
[o_http_chkbox setState:NSOffState];
}
else if ([[sender title] isEqualToString:_NS("RTSP announce")])
{
[o_sap_chkbox setState:NSOffState];
[o_http_chkbox setState:NSOffState];
}
else if ([[sender title] isEqualToString:_NS("HTTP announce")])
{
[o_sap_chkbox setState:NSOffState];
[o_rtsp_chkbox setState:NSOffState];
}
if ( [o_rtsp_chkbox state] == NSOnState ||
[o_http_chkbox state] == NSOnState)
{
[o_sdp_url setEnabled: YES];
}
else
{
[o_sdp_url setEnabled: NO];
}
}
[self outputInfoChanged: nil];
}
......
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