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
b573c181
Commit
b573c181
authored
Aug 24, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/framework: Re-enable event posting in VLCEventManager.
parent
fb1e7461
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
projects/macosx/framework/Sources/VLCEventManager.m
projects/macosx/framework/Sources/VLCEventManager.m
+13
-13
No files found.
projects/macosx/framework/Sources/VLCEventManager.m
View file @
b573c181
...
...
@@ -209,7 +209,7 @@ static void * EventDispatcherMainLoop(void * user_data)
-
(
void
)
callOnMainThreadDelegateOfObject
:(
id
)
aTarget
withDelegateMethod
:(
SEL
)
aSelector
withNotificationName
:
(
NSString
*
)
aNotificationName
{
/* Don't send on main thread before this gets sorted out */
//
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
message_t
message
=
{
...
...
@@ -219,19 +219,19 @@ static void * EventDispatcherMainLoop(void * user_data)
VLCNotification
};
//
if( [NSThread isMainThread] )
//
{
if
(
[
NSThread
isMainThread
]
)
{
[
self
callDelegateOfObjectAndSendNotificationWithArgs
:[[
NSData
dataWithBytes
:
&
message
length
:
sizeof
(
message_t
)]
retain
]
/* released in the call */
];
//
}
//
else
//
{
//
pthread_mutex_lock( [self queueLock] );
//
[[self messageQueue] insertObject:[NSData dataWithBytes:&message length:sizeof(message_t)] atIndex:0];
//
pthread_cond_signal( [self signalData] );
//
pthread_mutex_unlock( [self queueLock] );
//
}
}
else
{
pthread_mutex_lock
(
[
self
queueLock
]
);
[[
self
messageQueue
]
insertObject
:[
NSData
dataWithBytes
:
&
message
length
:
sizeof
(
message_t
)]
atIndex
:
0
];
pthread_cond_signal
(
[
self
signalData
]
);
pthread_mutex_unlock
(
[
self
queueLock
]
);
}
//
[pool release];
[
pool
release
];
}
-
(
void
)
callOnMainThreadObject
:(
id
)
aTarget
withMethod
:(
SEL
)
aSelector
withArgumentAsObject
:
(
id
)
arg
...
...
@@ -278,7 +278,7 @@ static void * EventDispatcherMainLoop(void * user_data)
-
(
void
)
callDelegateOfObject
:(
id
)
aTarget
withDelegateMethod
:
(
SEL
)
aSelector
withNotificationName
:
(
NSString
*
)
aNotificationName
{
//
[[NSNotificationCenter defaultCenter] postNotification: [NSNotification notificationWithName:aNotificationName object:aTarget]];
[[
NSNotificationCenter
defaultCenter
]
postNotification
:
[
NSNotification
notificationWithName
:
aNotificationName
object
:
aTarget
]];
if
(
!
[
aTarget
delegate
]
||
!
[[
aTarget
delegate
]
respondsToSelector
:
aSelector
])
return
;
...
...
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