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
be3f7560
Commit
be3f7560
authored
Jan 07, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/Framework/VLCMedia.m: Make sure the KVO notification will be sent for the @"state" key.
parent
2cd7ae24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
extras/MacOSX/Framework/Sources/VLCMedia.m
extras/MacOSX/Framework/Sources/VLCMedia.m
+12
-4
No files found.
extras/MacOSX/Framework/Sources/VLCMedia.m
View file @
be3f7560
...
...
@@ -71,6 +71,7 @@ NSString * VLCMediaMetaChanged = @"VLCMediaMetaChanged";
/* Callback Methods */
-
(
void
)
metaChanged
:(
NSString
*
)
metaType
;
-
(
void
)
subItemAdded
;
-
(
void
)
setStateAsNumber
:(
NSNumber
*
)
newStateAsNumber
;
@end
static
VLCMediaState
libvlc_state_to_media_state
[]
=
...
...
@@ -124,7 +125,7 @@ static void HandleMediaStateChanged(const libvlc_event_t * event, void * self)
{
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCEventManager
sharedManager
]
callOnMainThreadObject
:
self
withMethod:
@selector
(
setState
:)
withMethod:
@selector
(
setState
AsNumber
:)
withArgumentAsObject:
[
NSNumber
numberWithInt
:
LibVLCStateToMediaState
(
event
->
u
.
media_descriptor_state_changed
.
new_state
)]];
[
pool
release
];
...
...
@@ -309,6 +310,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
@synthesize
subitems
;
@synthesize
metaDictionary
;
@synthesize
state
;
@end
/******************************************************************************
...
...
@@ -519,8 +521,14 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
length
=
value
?
[
value
retain
]
:
nil
;
}
-
(
void
)
setState
:(
NSNumber
*
)
newStateAsNumber
{
state
=
[
newStateAsNumber
intValue
];
-
(
void
)
setState
AsNumber
:(
NSNumber
*
)
newStateAsNumber
{
[
self
setState
:
[
newStateAsNumber
intValue
]
];
}
-
(
void
)
setState
:(
VLCMediaState
)
newState
{
state
=
newState
;
}
@end
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