Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
7d008288
Commit
7d008288
authored
Dec 28, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/CAS: implement basic error checking for the stream-out settings
parent
60fd182b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
modules/gui/macosx/ConvertAndSave.m
modules/gui/macosx/ConvertAndSave.m
+28
-0
No files found.
modules/gui/macosx/ConvertAndSave.m
View file @
7d008288
...
...
@@ -439,6 +439,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
-
(
IBAction
)
closeStreamPanel
:(
id
)
sender
{
/* provide a summary of the user selections */
NSMutableString
*
labelContent
=
[[
NSMutableString
alloc
]
initWithFormat
:
_NS
(
"%@ stream to %@:%@"
),
[
_stream_type_pop
titleOfSelectedItem
],
[
_stream_address_fld
stringValue
],
[
_stream_port_fld
stringValue
]];
if
([
_stream_type_pop
indexOfSelectedItem
]
>
1
)
...
...
@@ -447,6 +448,33 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[
_destination_stream_lbl
setStringValue
:
labelContent
];
[
labelContent
release
];
/* catch obvious errors */
if
(([
_stream_http_ckb
state
]
||
[
_stream_rtsp_ckb
state
]
||
[
_stream_sap_ckb
state
])
&&
!
[[
_stream_channel_fld
stringValue
]
length
]
>
0
)
{
NSBeginInformationalAlertSheet
(
_NS
(
"No Channel Name given"
),
_NS
(
"OK"
),
@""
,
@""
,
_stream_panel
,
nil
,
nil
,
nil
,
nil
,
@"%@"
,
_NS
(
"A stream announcement option is enabled. However, no channel name is provided."
));
return
;
}
if
([
_stream_sdp_ckb
state
]
&&
!
[[
_stream_sdp_fld
stringValue
]
length
]
>
0
)
{
NSBeginInformationalAlertSheet
(
_NS
(
"No SDP URL given"
),
_NS
(
"OK"
),
@""
,
@""
,
_stream_panel
,
nil
,
nil
,
nil
,
nil
,
@"%@"
,
_NS
(
"A SDP export is requested, but no URL is provided."
));
return
;
}
NSString
*
tmpString
=
[
_stream_address_fld
stringValue
];
if
([[
tmpString
componentsSeparatedByString
:
@":"
]
count
]
!=
5
||
[[
tmpString
componentsSeparatedByString
:
@"."
]
count
]
!=
3
||
!
[
tmpString
isEqualToString
:
@"localhost"
])
{
NSBeginInformationalAlertSheet
(
_NS
(
"Invalid Output Destination"
),
_NS
(
"OK"
),
@""
,
@""
,
_stream_panel
,
nil
,
nil
,
nil
,
nil
,
@"%@"
,
_NS
(
"The entered output destination IP does not appear to be legit."
));
return
;
}
/* store destination for further reference and update UI */
[
self
setOutputDestination
:
[
_stream_address_fld
stringValue
]];
[
self
updateOKButton
];
[
_stream_panel
orderOut
:
sender
];
[
NSApp
endSheet
:
_stream_panel
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment