Closed Bug 779351 Opened 7 years ago Closed 7 years ago

Camera - need to get/configure the SourceMediaStream on the main thread

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

Attachments

(1 file, 1 obsolete file)

The following assertions are observed in the log:

I/Gecko   (  105): ###!!! ASSERTION: Main thread only: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/content/media/MediaStreamGraph.cpp, line 2039
I/Gecko   (  105): ###!!! ASSERTION: Using observer service off the main thread!: 'Error', file /home/mikeh/dev/mozilla/btg012/gecko/xpcom/ds/nsObserverService.cpp, line 95
I/Gecko   (  105): ###!!! ASSERTION: main thread only: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/content/media/MediaStreamGraph.cpp, line 1638
I/Gecko   (  105): ###!!! ASSERTION: main thread only: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/content/media/MediaStreamGraph.cpp, line 1609
I/Gecko   (  105): ###!!! ASSERTION: Should be on main thread.: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/widget/xpwidgets/nsBaseAppShell.cpp, line 367
I/Gecko   (  105): ###!!! ASSERTION: Wrong thread!: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/widget/xpwidgets/nsBaseAppShell.cpp, line 320
I/Gecko   (  105): ###!!! ASSERTION: main thread only: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/content/media/MediaStreamGraph.cpp, line 1638
I/Gecko   (  105): ###!!! ASSERTION: main thread only: 'NS_IsMainThread()', file /home/mikeh/dev/mozilla/btg012/gecko/content/media/MediaStreamGraph.cpp, line 1609
Attached patch MediaStreams on the main thread (obsolete) — Splinter Review
MediaStream configuration is handled on the main thread; consumption change events are handled separately on the camera thread.
Attachment #647759 - Flags: review?(roc)
Comment on attachment 647759 [details] [diff] [review]
MediaStreams on the main thread

Review of attachment 647759 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry, I should have caught this during review.

::: dom/camera/CameraPreview.cpp
@@ +62,5 @@
>    nsCOMPtr<CameraPreview> mPreview;
>  };
>  
> +// Control the preview stream source.
> +class CameraPreviewControlTask : public nsRunnable

Can you use NS_NewRunnableMethod instead of this class?
:roc: no worries--that was a lot of code to go over all at once.
Attachment #647759 - Attachment is obsolete: true
Attachment #647759 - Flags: review?(roc)
Attachment #647791 - Flags: review?(roc)
Depends on: 740997
Hardware: ARM → All
https://hg.mozilla.org/mozilla-central/rev/89aab2c5344b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.