Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
cb4e1a83
Commit
cb4e1a83
authored
9 years ago
by
Gian-Carlo Pascutto
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1228788 - Force QT device release to happen on the main thread. r=jesup
parent
2e171e6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dom/media/systemservices/CamerasParent.cpp
+4
-0
4 additions, 0 deletions
dom/media/systemservices/CamerasParent.cpp
media/webrtc/trunk/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit.mm
+6
-2
6 additions, 2 deletions
...tc/modules/video_capture/mac/qtkit/video_capture_qtkit.mm
with
10 additions
and
2 deletions
dom/media/systemservices/CamerasParent.cpp
+
4
−
0
View file @
cb4e1a83
...
@@ -186,6 +186,7 @@ CamerasParent::DispatchToVideoCaptureThread(nsRunnable *event)
...
@@ -186,6 +186,7 @@ CamerasParent::DispatchToVideoCaptureThread(nsRunnable *event)
void
void
CamerasParent
::
StopVideoCapture
()
CamerasParent
::
StopVideoCapture
()
{
{
LOG
((
__PRETTY_FUNCTION__
));
// We are called from the main thread (xpcom-shutdown) or
// We are called from the main thread (xpcom-shutdown) or
// from PBackground (when the Actor shuts down).
// from PBackground (when the Actor shuts down).
// Shut down the WebRTC stack (on the capture thread)
// Shut down the WebRTC stack (on the capture thread)
...
@@ -407,6 +408,7 @@ CamerasParent::SetupEngine(CaptureEngine aCapEngine)
...
@@ -407,6 +408,7 @@ CamerasParent::SetupEngine(CaptureEngine aCapEngine)
void
void
CamerasParent
::
CloseEngines
()
CamerasParent
::
CloseEngines
()
{
{
LOG
((
__PRETTY_FUNCTION__
));
if
(
!
mWebRTCAlive
)
{
if
(
!
mWebRTCAlive
)
{
return
;
return
;
}
}
...
@@ -700,10 +702,12 @@ CamerasParent::RecvReleaseCaptureDevice(const int& aCapEngine,
...
@@ -700,10 +702,12 @@ CamerasParent::RecvReleaseCaptureDevice(const int& aCapEngine,
RefPtr
<
nsIRunnable
>
ipc_runnable
=
RefPtr
<
nsIRunnable
>
ipc_runnable
=
media
::
NewRunnableFrom
([
self
,
error
,
numdev
]()
->
nsresult
{
media
::
NewRunnableFrom
([
self
,
error
,
numdev
]()
->
nsresult
{
if
(
self
->
IsShuttingDown
())
{
if
(
self
->
IsShuttingDown
())
{
LOG
((
"In Shutdown, not Releasing"
));
return
NS_ERROR_FAILURE
;
return
NS_ERROR_FAILURE
;
}
}
if
(
error
)
{
if
(
error
)
{
Unused
<<
self
->
SendReplyFailure
();
Unused
<<
self
->
SendReplyFailure
();
LOG
((
"Failed to free device nr %d"
,
numdev
));
return
NS_ERROR_FAILURE
;
return
NS_ERROR_FAILURE
;
}
else
{
}
else
{
Unused
<<
self
->
SendReplySuccess
();
Unused
<<
self
->
SendReplySuccess
();
...
...
This diff is collapsed.
Click to expand it.
media/webrtc/trunk/webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit.mm
+
6
−
2
View file @
cb4e1a83
...
@@ -61,8 +61,12 @@ VideoCaptureMacQTKit::~VideoCaptureMacQTKit()
...
@@ -61,8 +61,12 @@ VideoCaptureMacQTKit::~VideoCaptureMacQTKit()
if
(
_captureDevice
)
if
(
_captureDevice
)
{
{
[
_captureDevice
registerOwner
:
nil
];
[
_captureDevice
registerOwner
:
nil
];
[
_captureDevice
stopCapture
];
[
_captureDevice
performSelectorOnMainThread
:
@selector
(
stopCapture
)
[
_captureDevice
release
];
withObject:
nil
waitUntilDone:
NO
];
[
_captureDevice
performSelectorOnMainThread
:
@selector
(
release
)
withObject:
nil
waitUntilDone:
NO
];
}
}
if
(
_captureInfo
)
if
(
_captureInfo
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment