Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
632ef79d
Commit
632ef79d
authored
Feb 14, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
frontrow_plugin: Cleanups, and improvement such as audio volume settings.
parent
e651381f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
15 deletions
+36
-15
projects/macosx/frontrow_plugin/VLCAppliance.m
projects/macosx/frontrow_plugin/VLCAppliance.m
+1
-1
projects/macosx/frontrow_plugin/VLCMediaLayer.m
projects/macosx/frontrow_plugin/VLCMediaLayer.m
+1
-3
projects/macosx/frontrow_plugin/VLCMediaListController.h
projects/macosx/frontrow_plugin/VLCMediaListController.h
+1
-1
projects/macosx/frontrow_plugin/VLCMediaListController.m
projects/macosx/frontrow_plugin/VLCMediaListController.m
+21
-10
projects/macosx/frontrow_plugin/VLCPlayerController.m
projects/macosx/frontrow_plugin/VLCPlayerController.m
+12
-0
No files found.
projects/macosx/frontrow_plugin/VLCAppliance.m
View file @
632ef79d
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
-
(
id
)
applianceController
-
(
id
)
applianceController
{
{
// Disabled until we properly display a menu for that. You can test it by uncommenting those lines, and comment the following line.
// Disabled until we properly display a menu for that. You can test it by uncommenting those lines, and comment the following line.
// VLCMediaListAspect * mediaListAspect = [[[[
VLCMediaDiscoverer alloc] initWithName:@"freebox"] discoveredMedia
] hierarchicalAspect];
// VLCMediaListAspect * mediaListAspect = [[[[
[VLCMediaDiscoverer alloc] initWithName:@"freebox"] discoveredMedia] retain
] hierarchicalAspect];
// VLCApplianceController * controller = [[VLCMediaListController alloc] initWithMediaListAspect:mediaListAspect];
// VLCApplianceController * controller = [[VLCMediaListController alloc] initWithMediaListAspect:mediaListAspect];
VLCApplianceController
*
controller
=
[[
VLCApplianceController
alloc
]
initWithPath
:[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Movies"
]];
VLCApplianceController
*
controller
=
[[
VLCApplianceController
alloc
]
initWithPath
:[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Movies"
]];
...
...
projects/macosx/frontrow_plugin/VLCMediaLayer.m
View file @
632ef79d
...
@@ -45,15 +45,13 @@
...
@@ -45,15 +45,13 @@
_videoLayer
=
[
VLCVideoLayer
layer
];
_videoLayer
=
[
VLCVideoLayer
layer
];
_videoLayer
.
frame
=
self
.
bounds
;
_videoLayer
.
frame
=
self
.
bounds
;
_videoLayer
.
autoresizingMask
=
kCALayerWidthSizable
|
kCALayerHeightSizable
;
_videoLayer
.
autoresizingMask
=
kCALayerWidthSizable
|
kCALayerHeightSizable
;
_videoLayer
.
fillScreen
=
YES
;
[
self
addSublayer
:
_videoLayer
];
[
self
addSublayer
:
_videoLayer
];
}
}
if
(
_player
==
nil
)
{
if
(
_player
==
nil
)
{
_player
=
[[
VLCMediaPlayer
alloc
]
initWithVideoLayer
:
_videoLayer
];
_player
=
[[
VLCMediaPlayer
alloc
]
initWithVideoLayer
:
_videoLayer
];
}
}
else
{
[
_player
pause
];
}
#endif
#endif
NSLog
(
@"playing media: %@"
,
media
);
NSLog
(
@"playing media: %@"
,
media
);
...
...
projects/macosx/frontrow_plugin/VLCMediaListController.h
View file @
632ef79d
...
@@ -17,5 +17,5 @@
...
@@ -17,5 +17,5 @@
}
}
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
mediaListAspect
;
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
mediaListAspect
;
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
aMediaListAspect
andTitle
:(
NSString
*
)
title
;
@end
@end
projects/macosx/frontrow_plugin/VLCMediaListController.m
View file @
632ef79d
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#import <BackRow/BRListControl.h>
#import <BackRow/BRListControl.h>
#import <BackRow/BRTextMenuItemLayer.h>
#import <BackRow/BRTextMenuItemLayer.h>
#import <BackRow/BRControllerStack.h>
#import <BackRow/BRControllerStack.h>
#import <BackRow/BRHeaderControl.h>
@interface
VLCMediaListController
()
@interface
VLCMediaListController
()
...
@@ -25,13 +26,22 @@
...
@@ -25,13 +26,22 @@
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
aMediaListAspect
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
aMediaListAspect
{
{
self
=
[
super
init
];
return
[
self
initWithMediaListAspect
:
aMediaListAspect
andTitle
:
nil
];
}
self
.
mediaListAspect
=
aMediaListAspect
;
[
self
.
mediaListAspect
addObserver
:
self
forKeyPath
:
@"media"
options
:
NSKeyValueChangeRemoval
|
NSKeyValueChangeInsertion
|
NSKeyValueChangeSetting
context
:
nil
];
[[
self
list
]
setDatasource
:
self
];
isReloading
=
NO
;
-
initWithMediaListAspect
:(
VLCMediaListAspect
*
)
aMediaListAspect
andTitle
:(
NSString
*
)
title
{
if
(
self
=
[
super
init
]
)
{
self
.
mediaListAspect
=
aMediaListAspect
;
[
self
.
mediaListAspect
addObserver
:
self
forKeyPath
:
@"media"
options
:
NSKeyValueChangeRemoval
|
NSKeyValueChangeInsertion
|
NSKeyValueChangeSetting
context
:
nil
];
[[
self
list
]
setDatasource
:
self
];
isReloading
=
NO
;
if
(
title
)
{
[[
self
header
]
setTitle
:
title
];
}
}
return
self
;
return
self
;
}
}
...
@@ -48,7 +58,7 @@
...
@@ -48,7 +58,7 @@
if
(
!
isReloading
)
if
(
!
isReloading
)
{
{
isReloading
=
YES
;
isReloading
=
YES
;
[
self
performSelector
:
@selector
(
reload
)
withObject
:
nil
afterDelay
:
2
.
];
[
self
performSelector
:
@selector
(
reload
)
withObject
:
nil
afterDelay
:
[[
self
list
]
itemCount
]
>
10
?
2
.
:
[[
self
list
]
itemCount
]
?
0
.
3
:
0
.
0
];
}
}
}
}
else
{
else
{
...
@@ -103,7 +113,7 @@
...
@@ -103,7 +113,7 @@
BOOL
isDirectory
=
!
[[
mediaListAspect
nodeAtIndex
:
row
]
isLeaf
];
BOOL
isDirectory
=
!
[[
mediaListAspect
nodeAtIndex
:
row
]
isLeaf
];
BRTextMenuItemLayer
*
item
=
nil
;
BRTextMenuItemLayer
*
item
=
nil
;
if
(
isDirectory
)
{
if
(
isDirectory
)
{
item
=
[
BRTextMenuItemLayer
folderMenuItem
];
item
=
[
BRTextMenuItemLayer
folderMenuItem
];
}
}
...
@@ -118,12 +128,13 @@
...
@@ -118,12 +128,13 @@
-
(
void
)
itemSelected
:(
NSInteger
)
row
-
(
void
)
itemSelected
:(
NSInteger
)
row
{
{
BOOL
isDirectory
=
!
[[
mediaListAspect
nodeAtIndex
:
row
]
isLeaf
];
VLCMediaListAspectNode
*
node
=
[
mediaListAspect
nodeAtIndex
:
row
];
BOOL
isDirectory
=
!
[
node
isLeaf
];
BRController
*
controller
=
nil
;
BRController
*
controller
=
nil
;
if
(
isDirectory
)
{
if
(
isDirectory
)
{
controller
=
[[[
VLCMediaListController
alloc
]
initWithMediaListAspect
:[
[
mediaListAspect
nodeAtIndex
:
row
]
children
]]
autorelease
];
controller
=
[[[
VLCMediaListController
alloc
]
initWithMediaListAspect
:[
node
children
]
andTitle
:[[
node
media
]
valueForKeyPath
:
@"metaDictionary.title"
]]
autorelease
];
}
}
else
{
else
{
static
VLCPlayerController
*
playerController
=
nil
;
static
VLCPlayerController
*
playerController
=
nil
;
...
...
projects/macosx/frontrow_plugin/VLCPlayerController.m
View file @
632ef79d
...
@@ -68,6 +68,18 @@
...
@@ -68,6 +68,18 @@
[
player
setPosition
:
position
];
[
player
setPosition
:
position
];
break
;
break
;
}
}
case
BREventUpUsage
:
{
NSLog
(
@"UP"
);
[[[
VLCLibrary
sharedLibrary
]
audio
]
setVolume
:[[[
VLCLibrary
sharedLibrary
]
audio
]
volume
]
+
20
];
break
;
}
case
BREventDownUsage
:
{
NSLog
(
@"DOWN"
);
[[[
VLCLibrary
sharedLibrary
]
audio
]
setVolume
:[[[
VLCLibrary
sharedLibrary
]
audio
]
volume
]
-
20
];
break
;
}
case
BREventMenuUsage
:
case
BREventMenuUsage
:
[[
self
stack
]
popController
];
[[
self
stack
]
popController
];
default:
default:
...
...
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