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
dcebfbb0
Commit
dcebfbb0
authored
Dec 29, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCMediaPlayer.m: -isSeekable.
parent
700e6aac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
+3
-0
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
+14
-4
No files found.
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
View file @
dcebfbb0
...
...
@@ -192,4 +192,7 @@ extern NSString *VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*/
-
(
float
)
position
;
-
(
void
)
setPosition
:(
float
)
newPosition
;
-
(
BOOL
)
isSeekable
;
@end
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
View file @
dcebfbb0
...
...
@@ -58,7 +58,6 @@ static void HandleMediaInstanceVolumeChanged(const libvlc_event_t *event, void *
static
void
HandleMediaTimeChanged
(
const
libvlc_event_t
*
event
,
void
*
self
)
{
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSLog
(
@"time!"
);
[[
VLCEventManager
sharedManager
]
callOnMainThreadObject
:
self
withMethod:
@selector
(
mediaPlayerTimeChanged
:)
withArgumentAsObject:
[
NSNumber
numberWithLongLong
:
event
->
u
.
media_instance_time_changed
.
new_time
]];
...
...
@@ -120,9 +119,6 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t *event, void *s
@end
@implementation
VLCMediaPlayer
+
(
void
)
initialize
{
[
self
setKeys
:[
NSArray
arrayWithObject
:
@"state"
]
triggerChangeNotificationsForDependentKey
:
@"playing"
];
}
-
(
id
)
init
{
...
...
@@ -133,6 +129,8 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t *event, void *s
{
if
(
self
=
[
super
init
])
{
[
VLCMediaPlayer
setKeys
:[
NSArray
arrayWithObject
:
@"state"
]
triggerChangeNotificationsForDependentKey
:
@"playing"
];
[
VLCMediaPlayer
setKeys
:[
NSArray
arrayWithObjects
:
@"state"
,
@"media"
,
nil
]
triggerChangeNotificationsForDependentKey
:
@"seekable"
];
delegate
=
nil
;
media
=
nil
;
cachedTime
=
[[
VLCTime
nullTime
]
retain
];
...
...
@@ -542,10 +540,12 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
{
return
cachedState
;
}
-
(
float
)
position
{
return
position
;
}
-
(
void
)
setPosition
:(
float
)
newPosition
{
libvlc_exception_t
ex
;
...
...
@@ -553,6 +553,16 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
libvlc_media_instance_set_position
(
instance
,
newPosition
,
&
ex
);
quit_on_exception
(
&
ex
);
}
-
(
BOOL
)
isSeekable
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
BOOL
ret
=
libvlc_media_instance_is_seekable
(
instance
,
&
ex
);
quit_on_exception
(
&
ex
);
return
ret
;
}
@end
@implementation
VLCMediaPlayer
(
Private
)
...
...
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