Commit 7759c84b authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: CAS: implemented UI logic for the stream-out sheet

parent 412b2d72
......@@ -12,9 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="388"/>
<integer value="387"/>
<integer value="2"/>
<integer value="309"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -52,7 +50,7 @@
<string key="NSWindowContentMaxSize">{663, 490}</string>
<string key="NSWindowContentMinSize">{663, 490}</string>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -515,7 +513,6 @@
</object>
</object>
<string key="NSFrameSize">{663, 490}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMinSize">{663, 512}</string>
......@@ -2066,7 +2063,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<object class="NSView" key="NSWindowView" id="575278109">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2220,9 +2217,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="220952697"/>
</object>
<object class="NSMenuItem" id="571683179">
<object class="NSMenuItem" id="1054061955">
<reference key="NSMenu" ref="818994718"/>
<string key="NSTitle">UDP</string>
<string key="NSTitle">RTP</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
......@@ -2231,9 +2228,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="220952697"/>
</object>
<object class="NSMenuItem" id="1054061955">
<object class="NSMenuItem" id="571683179">
<reference key="NSMenu" ref="818994718"/>
<string key="NSTitle">RTP</string>
<string key="NSTitle">UDP</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
......@@ -2579,7 +2576,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSButtonCell" key="NSCell" id="873992339">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">OK</string>
<string key="NSContents">Close</string>
<reference key="NSSupport" ref="1024428774"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="524920181"/>
......@@ -2591,30 +2588,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="410211230">
<reference key="NSNextResponder" ref="575278109"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{326, 12}, {96, 32}}</string>
<reference key="NSSuperview" ref="575278109"/>
<string key="NSReuseIdentifierKey">_NS:610</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="198722555">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="1024428774"/>
<string key="NSCellIdentifier">_NS:610</string>
<reference key="NSControlView" ref="410211230"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{532, 355}</string>
<reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:122</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
......@@ -2622,7 +2598,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bool key="NSWindowIsRestorable">NO</bool>
</object>
<object class="NSCustomView" id="19725126">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2728,12 +2704,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<string key="NSFrameSize">{531, 72}</string>
<reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:1109</string>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="501681605">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2784,7 +2759,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<string key="NSFrameSize">{531, 72}</string>
<reference key="NSSuperview"/>
<string key="NSReuseIdentifierKey">_NS:1109</string>
<string key="NSClassName">NSView</string>
</object>
......@@ -3296,14 +3270,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">364</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_stream_cancel_btn</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="410211230"/>
</object>
<int key="connectionID">365</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">_stream_ok_btn</string>
......@@ -3448,14 +3414,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">383</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">closeStreamPanel:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="410211230"/>
</object>
<int key="connectionID">384</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showStreamPanel:</string>
......@@ -3560,6 +3518,46 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">407</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">streamTypeToggle:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="224873446"/>
</object>
<int key="connectionID">408</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">streamAnnouncementToggle:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="706187556"/>
</object>
<int key="connectionID">409</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">streamAnnouncementToggle:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="185939211"/>
</object>
<int key="connectionID">410</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">streamAnnouncementToggle:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="882741680"/>
</object>
<int key="connectionID">411</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">streamAnnouncementToggle:</string>
<reference key="source" ref="203744709"/>
<reference key="destination" ref="147954501"/>
</object>
<int key="connectionID">412</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
......@@ -4758,7 +4756,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference ref="200204793"/>
<reference ref="696647107"/>
<reference ref="524920181"/>
<reference ref="410211230"/>
</object>
<reference key="parent" ref="939593274"/>
</object>
......@@ -4875,9 +4872,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="53385571"/>
<reference ref="1054061955"/>
<reference ref="571683179"/>
<reference ref="859553375"/>
<reference ref="1054061955"/>
</object>
<reference key="parent" ref="220952697"/>
</object>
......@@ -5128,20 +5125,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="object" ref="873992339"/>
<reference key="parent" ref="524920181"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">362</int>
<reference key="object" ref="410211230"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="198722555"/>
</object>
<reference key="parent" ref="575278109"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">363</int>
<reference key="object" ref="198722555"/>
<reference key="parent" ref="410211230"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">387</int>
<reference key="object" ref="19725126"/>
......@@ -5575,9 +5558,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>360.IBPluginDependency</string>
<string>360.IBViewBoundsToFrameTransform</string>
<string>361.IBPluginDependency</string>
<string>362.IBPluginDependency</string>
<string>362.IBViewBoundsToFrameTransform</string>
<string>363.IBPluginDependency</string>
<string>387.IBEditorWindowLastContentRect</string>
<string>387.IBPluginDependency</string>
<string>388.IBEditorWindowLastContentRect</string>
......@@ -5913,9 +5893,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABDvQAAwkQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{350, 347}, {532, 355}}</string>
<string>{{366, 101}, {532, 355}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{350, 347}, {532, 355}}</string>
<string>{{366, 101}, {532, 355}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -5967,7 +5947,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{443, 545}, {108, 83}}</string>
<string>{{493, 302}, {108, 83}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
......@@ -6045,11 +6025,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABD0wAAwzMAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABD1YAAwy4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{359, 563}, {531, 72}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{372, 280}, {531, 72}}</string>
......@@ -6127,7 +6102,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">407</int>
<int key="maxID">412</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
......@@ -6164,6 +6139,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>openMedia:</string>
<string>saveFile:</string>
<string>showStreamPanel:</string>
<string>streamAnnouncementToggle:</string>
<string>streamTypeToggle:</string>
<string>switchProfile:</string>
</object>
<object class="NSMutableArray" key="dict.values">
......@@ -6179,6 +6156,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
......@@ -6195,6 +6174,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>openMedia:</string>
<string>saveFile:</string>
<string>showStreamPanel:</string>
<string>streamAnnouncementToggle:</string>
<string>streamTypeToggle:</string>
<string>switchProfile:</string>
</object>
<object class="NSMutableArray" key="dict.values">
......@@ -6239,6 +6220,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="name">showStreamPanel:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">streamAnnouncementToggle:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">streamTypeToggle:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">switchProfile:</string>
<string key="candidateClassName">id</string>
......
......@@ -93,7 +93,6 @@
IBOutlet id _stream_panel;
IBOutlet id _stream_ok_btn;
IBOutlet id _stream_cancel_btn;
IBOutlet id _stream_destination_lbl;
IBOutlet id _stream_announcement_lbl;
IBOutlet id _stream_type_lbl;
......@@ -119,6 +118,8 @@
NSArray * _audioCodecs;
NSArray * _subsCodecs;
NSMutableArray * _currentProfile;
BOOL b_streaming;
}
@property (readwrite, nonatomic, retain) NSString * MRL;
@property (readwrite, nonatomic, retain) NSString * outputDestination;
......@@ -141,6 +142,8 @@
- (IBAction)browseFileDestination:(id)sender;
- (IBAction)showStreamPanel:(id)sender;
- (IBAction)closeStreamPanel:(id)sender;
- (IBAction)streamTypeToggle:(id)sender;
- (IBAction)streamAnnouncementToggle:(id)sender;
- (void)updateDropView;
......
......@@ -174,8 +174,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[_customize_aud_samplerate_lbl setStringValue: _NS("Sample Rate")];
[_customize_subs_ckb setTitle: _NS("Subtitles")];
[_customize_subs_overlay_ckb setTitle: _NS("Overlay subtitles on the video")];
[_stream_ok_btn setTitle:_NS("Set")];
[_stream_cancel_btn setTitle:_NS("Cancel")];
[_stream_ok_btn setTitle:_NS("Close")];
[_stream_destination_lbl setStringValue:_NS("Stream Destination")];
[_stream_announcement_lbl setStringValue:_NS("Stream Announcement")];
[_stream_type_lbl setStringValue:_NS("Type")];
......@@ -186,6 +185,10 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[_stream_http_ckb setStringValue:_NS("HTTP Announcement")];
[_stream_rtsp_ckb setStringValue:_NS("RTSP Announcement")];
[_stream_sdp_ckb setStringValue:_NS("Export SDP as file")];
[_stream_sap_ckb setState:NSOffState];
[_stream_http_ckb setState:NSOffState];
[_stream_rtsp_ckb setState:NSOffState];
[_stream_sdp_ckb setState:NSOffState];
/* there is no way to hide single cells, so replace the existing ones with empty cells.. */
id blankCell = [[[NSCell alloc] init] autorelease];
......@@ -375,6 +378,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[[_destination_itwantastream_btn animator] setHidden: YES];
[_destination_box performSelector:@selector(addSubview:) withObject:_destination_itwantafile_view afterDelay:0.2];
[[_destination_cancel_btn animator] setHidden:NO];
b_streaming = NO;
}
- (IBAction)iWantAStream:(id)sender
......@@ -388,6 +392,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[[_destination_itwantastream_btn animator] setHidden: YES];
[_destination_box performSelector:@selector(addSubview:) withObject:_destination_itwantastream_view afterDelay:0.2];
[[_destination_cancel_btn animator] setHidden:NO];
b_streaming = NO;
}
- (IBAction)cancelDestination:(id)sender
......@@ -400,6 +405,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[_destination_cancel_btn setHidden:YES];
[[_destination_itwantafile_btn animator] setHidden: NO];
[[_destination_itwantastream_btn animator] setHidden: NO];
b_streaming = NO;
}
- (IBAction)browseFileDestination:(id)sender
......@@ -438,6 +444,38 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[NSApp endSheet: _stream_panel];
}
- (IBAction)streamTypeToggle:(id)sender
{
NSUInteger index = [_stream_type_pop indexOfSelectedItem];
if (index <= 1) { // HTTP, MMSH
[_stream_ttl_fld setEnabled:NO];
[_stream_sap_ckb setEnabled:NO];
[_stream_rtsp_ckb setEnabled:NO];
[_stream_http_ckb setEnabled:NO];
[_stream_sdp_ckb setEnabled:NO];
} else if (index == 2) { // RTP
[_stream_ttl_fld setEnabled:YES];
[_stream_sap_ckb setEnabled:YES];
[_stream_rtsp_ckb setEnabled:YES];
[_stream_http_ckb setEnabled:YES];
[_stream_sdp_ckb setEnabled:YES];
[_stream_channel_fld setEnabled:YES];
[_stream_sdp_fld setEnabled:[_stream_sdp_ckb state]];
} else { // UDP
[_stream_ttl_fld setEnabled:YES];
[_stream_sap_ckb setEnabled:YES];
[_stream_rtsp_ckb setEnabled:NO];
[_stream_http_ckb setEnabled:NO];
[_stream_sdp_ckb setEnabled:NO];
[_stream_channel_fld setEnabled:YES];
}
}
- (IBAction)streamAnnouncementToggle:(id)sender
{
[_stream_sdp_fld setEnabled:[_stream_sdp_ckb state]];
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *paste = [sender draggingPasteboard];
......
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