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
90f36ed3
Commit
90f36ed3
authored
Jan 13, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework: Publish @property id drawable. Make sure the KVO will be sent for isPlaying.
parent
916af6f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
12 deletions
+30
-12
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
+2
-0
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
+28
-12
No files found.
extras/MacOSX/Framework/Headers/Public/VLCMediaPlayer.h
View file @
90f36ed3
...
...
@@ -93,6 +93,8 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
-
(
void
)
setVideoView
:(
VLCVideoView
*
)
aVideoView
;
-
(
void
)
setVideoLayer
:(
VLCVideoLayer
*
)
aVideoLayer
;
@property
(
retain
)
id
drawable
;
/* The videoView or videoLayer */
-
(
void
)
setVideoAspectRatio
:(
char
*
)
value
;
-
(
char
*
)
videoAspectRatio
;
-
(
void
)
setVideoSubTitles
:(
int
)
value
;
...
...
extras/MacOSX/Framework/Sources/VLCMediaPlayer.m
View file @
90f36ed3
...
...
@@ -114,7 +114,6 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
// TODO: Documentation
@interface
VLCMediaPlayer
(
Private
)
-
(
id
)
initWithDrawable
:(
id
)
aDrawable
;
-
(
void
)
setDrawable
:(
id
)
aDrawable
;
-
(
void
)
registerObservers
;
-
(
void
)
unregisterObservers
;
...
...
@@ -214,6 +213,27 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
[
self
setDrawable
:
aVideoLayer
];
}
-
(
void
)
setDrawable
:(
id
)
aDrawable
{
// Make sure that this instance has been associated with the drawing canvas.
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_media_instance_set_drawable
((
libvlc_media_instance_t
*
)
instance
,
(
libvlc_drawable_t
)
aDrawable
,
&
ex
);
catch_exception
(
&
ex
);
}
-
(
id
)
drawable
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_drawable_t
ret
=
libvlc_media_instance_get_drawable
((
libvlc_media_instance_t
*
)
instance
,
&
ex
);
catch_exception
(
&
ex
);
return
(
id
)
ret
;
}
-
(
void
)
setVideoAspectRatio
:(
char
*
)
value
{
libvlc_video_set_aspect_ratio
(
instance
,
value
,
NULL
);
...
...
@@ -508,6 +528,11 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
[
self
setRate
:
-
rate
];
}
+
(
NSSet
*
)
keyPathsForValuesAffectingIsPlaying
{
return
[
NSSet
setWithObjects
:
@"state"
,
nil
];
}
-
(
BOOL
)
isPlaying
{
VLCMediaPlayerState
state
=
[
self
state
];
...
...
@@ -575,6 +600,8 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
catch_exception
(
&
ex
);
return
ret
;
}
@end
@implementation
VLCMediaPlayer
(
Private
)
...
...
@@ -603,17 +630,6 @@ static const VLCMediaPlayerState libvlc_to_local_state[] =
return
self
;
}
-
(
void
)
setDrawable
:(
id
)
aDrawable
{
// Make sure that this instance has been associated with the drawing canvas.
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_media_instance_set_drawable
((
libvlc_media_instance_t
*
)
instance
,
(
libvlc_drawable_t
)
aDrawable
,
&
ex
);
catch_exception
(
&
ex
);
}
-
(
void
)
registerObservers
{
libvlc_exception_t
ex
;
...
...
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