Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f2ddc1ec
Commit
f2ddc1ec
authored
Aug 25, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: minor additions in optical media scanning code
parent
15339133
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
modules/gui/macosx/open.h
modules/gui/macosx/open.h
+1
-1
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+11
-4
No files found.
modules/gui/macosx/open.h
View file @
f2ddc1ec
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
id
o_currentOpticalMediaView
;
id
o_currentOpticalMediaView
;
id
o_currentOpticalMediaIconView
;
id
o_currentOpticalMediaIconView
;
NSMutableArray
*
o_allMediaDevices
;
NSMutableArray
*
o_allMediaDevices
;
NS
Mutable
Array
*
o_opticalDevices
;
NSArray
*
o_opticalDevices
;
NSMutableArray
*
o_specialMediaFolders
;
NSMutableArray
*
o_specialMediaFolders
;
NSString
*
o_file_path
;
NSString
*
o_file_path
;
id
o_currentCaptureView
;
id
o_currentCaptureView
;
...
...
modules/gui/macosx/open.m
View file @
f2ddc1ec
...
@@ -96,7 +96,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -96,7 +96,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
{
[
o_allMediaDevices
release
];
[
o_allMediaDevices
release
];
[
o_specialMediaFolders
release
];
[
o_specialMediaFolders
release
];
[
o_opticalDevices
release
];
if
(
o_opticalDevices
)
[
o_opticalDevices
release
];
if
(
o_file_slave_path
)
if
(
o_file_slave_path
)
[
o_file_slave_path
release
];
[
o_file_slave_path
release
];
[
o_mrl
release
];
[
o_mrl
release
];
...
@@ -321,7 +322,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -321,7 +322,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* we want to be notified about removed or added media */
/* we want to be notified about removed or added media */
o_allMediaDevices
=
[[
NSMutableArray
alloc
]
init
];
o_allMediaDevices
=
[[
NSMutableArray
alloc
]
init
];
o_specialMediaFolders
=
[[
NSMutableArray
alloc
]
init
];
o_specialMediaFolders
=
[[
NSMutableArray
alloc
]
init
];
o_opticalDevices
=
[[
NSMutableArray
alloc
]
init
];
o_displayInfos
=
[[
NSMutableArray
alloc
]
init
];
o_displayInfos
=
[[
NSMutableArray
alloc
]
init
];
NSWorkspace
*
sharedWorkspace
=
[
NSWorkspace
sharedWorkspace
];
NSWorkspace
*
sharedWorkspace
=
[
NSWorkspace
sharedWorkspace
];
...
@@ -1078,21 +1078,27 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1078,21 +1078,27 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
void
)
scanDevicesWithPaths
:(
NSArray
*
)
o_paths
-
(
void
)
scanDevicesWithPaths
:(
NSArray
*
)
o_paths
{
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSUInteger
count
=
[
o_paths
count
];
NSUInteger
count
=
[
o_paths
count
];
NSMutableArray
*
o_result
=
[
NSMutableArray
arrayWithCapacity
:
count
];
NSMutableArray
*
o_result
=
[
NSMutableArray
arrayWithCapacity
:
count
];
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
[
o_result
addObject
:
[
self
scanPath
:[
o_paths
objectAtIndex
:
i
]]];
[
o_result
addObject
:
[
self
scanPath
:[
o_paths
objectAtIndex
:
i
]]];
@synchronized
(
self
)
{
@synchronized
(
self
)
{
[
o_opticalDevices
removeAllObjects
];
if
(
o_opticalDevices
)
[
o_opticalDevices
addObjectsFromArray
:
o_result
];
[
o_opticalDevices
release
];
o_opticalDevices
=
[[
NSArray
alloc
]
initWithArray
:
o_result
];
}
}
[
self
performSelectorOnMainThread
:
@selector
(
updateMediaSelector
:)
withObject
:
nil
waitUntilDone
:
NO
];
[
self
performSelectorOnMainThread
:
@selector
(
updateMediaSelector
:)
withObject
:
nil
waitUntilDone
:
NO
];
[
o_pool
release
];
}
}
-
(
void
)
scanSpecialPath
:(
NSString
*
)
o_path
-
(
void
)
scanSpecialPath
:(
NSString
*
)
o_path
{
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSDictionary
*
o_dict
=
[
self
scanPath
:
o_path
];
NSDictionary
*
o_dict
=
[
self
scanPath
:
o_path
];
@synchronized
(
self
)
{
@synchronized
(
self
)
{
...
@@ -1100,6 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1100,6 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
}
}
[
self
performSelectorOnMainThread
:
@selector
(
updateMediaSelector
:)
withObject
:
[
NSNumber
numberWithBool
:
YES
]
waitUntilDone
:
NO
];
[
self
performSelectorOnMainThread
:
@selector
(
updateMediaSelector
:)
withObject
:
[
NSNumber
numberWithBool
:
YES
]
waitUntilDone
:
NO
];
[
o_pool
release
];
}
}
-
(
void
)
scanOpticalMedia
:(
NSNotification
*
)
o_notification
-
(
void
)
scanOpticalMedia
:(
NSNotification
*
)
o_notification
...
...
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