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
ce66ed5d
Commit
ce66ed5d
authored
Mar 15, 2012
by
Michael Feurstein
Committed by
Felix Paul Kühne
Mar 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtsound: fixes bug if no device is connected
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
54205a27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+19
-12
No files found.
modules/gui/macosx/open.m
View file @
ce66ed5d
...
...
@@ -227,7 +227,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[
self
qtkvideoDevices
];
[
o_qtk_device_pop
removeAllItems
];
msg_Dbg
(
VLCIntf
,
"Found %lu video capture devices"
,
[
qtkvideoDevices
count
]
);
if
([
qtkvideoDevices
count
]
>=
1
)
{
if
(
!
qtk_currdevice_uid
)
{
...
...
@@ -322,6 +322,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[[
sharedWorkspace
notificationCenter
]
addObserver
:
self
selector
:
@selector
(
scanOpticalMedia
:
)
name
:
NSWorkspaceDidUnmountNotification
object
:
nil
];
[
self
performSelector
:
@selector
(
scanOpticalMedia
:)
withObject
:
nil
afterDelay
:
2
.
0
];
[
self
performSelector
:
@selector
(
qtkChanged
:)
withObject
:
nil
afterDelay
:
2
.
5
];
[
self
performSelector
:
@selector
(
qtkAudioChanged
:)
withObject
:
nil
afterDelay
:
3
.
0
];
[
self
setMRL
:
@""
];
}
...
...
@@ -517,21 +518,27 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
IBAction
)
qtkChanged
:(
id
)
sender
{
NSInteger
i_selectedDevice
=
[
o_qtk_device_pop
indexOfSelectedItem
];
NSValue
*
sizes
=
[[[[
qtkvideoDevices
objectAtIndex
:
i_selectedDevice
]
formatDescriptions
]
objectAtIndex
:
0
]
attributeForKey
:
QTFormatDescriptionVideoEncodedPixelsSizeAttribute
];
[
o_capture_width_fld
setIntValue
:
[
sizes
sizeValue
].
width
];
[
o_capture_height_fld
setIntValue
:
[
sizes
sizeValue
].
height
];
[
o_capture_width_stp
setIntValue
:
[
o_capture_width_fld
intValue
]];
[
o_capture_height_stp
setIntValue
:
[
o_capture_height_fld
intValue
]];
qtk_currdevice_uid
=
[[(
QTCaptureDevice
*
)[
qtkvideoDevices
objectAtIndex
:
i_selectedDevice
]
uniqueID
]
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
[
self
setMRL
:[
NSString
stringWithFormat
:
@"qtcapture://%@"
,
qtk_currdevice_uid
]];
if
(
[
qtkvideoDevices
count
]
>=
1
)
{
NSValue
*
sizes
=
[[[[
qtkvideoDevices
objectAtIndex
:
i_selectedDevice
]
formatDescriptions
]
objectAtIndex
:
0
]
attributeForKey
:
QTFormatDescriptionVideoEncodedPixelsSizeAttribute
];
[
o_capture_width_fld
setIntValue
:
[
sizes
sizeValue
].
width
];
[
o_capture_height_fld
setIntValue
:
[
sizes
sizeValue
].
height
];
[
o_capture_width_stp
setIntValue
:
[
o_capture_width_fld
intValue
]];
[
o_capture_height_stp
setIntValue
:
[
o_capture_height_fld
intValue
]];
qtk_currdevice_uid
=
[[(
QTCaptureDevice
*
)[
qtkvideoDevices
objectAtIndex
:
i_selectedDevice
]
uniqueID
]
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
[
self
setMRL
:[
NSString
stringWithFormat
:
@"qtcapture://%@"
,
qtk_currdevice_uid
]];
}
}
-
(
IBAction
)
qtkAudioChanged
:(
id
)
sender
{
NSInteger
i_selectedDevice
=
[
o_qtkaudio_device_pop
indexOfSelectedItem
];
qtkaudio_currdevice_uid
=
[[(
QTCaptureDevice
*
)[
qtkaudioDevices
objectAtIndex
:
i_selectedDevice
]
uniqueID
]
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
[
self
setMRL
:[
NSString
stringWithFormat
:
@"qtsound://%@"
,
qtkaudio_currdevice_uid
]];
if
(
[
qtkaudioDevices
count
]
>=
1
)
{
qtkaudio_currdevice_uid
=
[[(
QTCaptureDevice
*
)[
qtkaudioDevices
objectAtIndex
:
i_selectedDevice
]
uniqueID
]
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
[
self
setMRL
:[
NSString
stringWithFormat
:
@"qtsound://%@"
,
qtkaudio_currdevice_uid
]];
}
}
-
(
void
)
tabView
:(
NSTabView
*
)
o_tv
didSelectTabViewItem
:(
NSTabViewItem
*
)
o_tvi
...
...
@@ -1485,7 +1492,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
IBAction
)
subFileBrowse
:(
id
)
sender
{
NSOpenPanel
*
o_open_panel
=
[
NSOpenPanel
openPanel
];
[
o_open_panel
setAllowsMultipleSelection
:
NO
];
[
o_open_panel
setTitle
:
_NS
(
"Open File"
)];
[
o_open_panel
setPrompt
:
_NS
(
"Open"
)];
...
...
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