Closed Bug 1156668 Opened 9 years ago Closed 9 years ago

MSE - mochitest test for WebM on B2G failed due to MediaOmxReader::ReadMetadata run in wrong thread

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kuoe0.tw, Unassigned)

References

Details

Attachments

(1 file)

The error is following:

> I/PRLog   ( 1753): -1216884640[b214a080]: WebMContainerParser(afe2fcc0:video/webm)::virtual bool mozilla::WebMContainerParser::ParseStartAndEndTimestamps(mozilla::MediaLargeByteBuffer*, int64_t&, int64_t&): Stashed init of 236 bytes.
> I/PRLog   ( 1753): -1216884640[b214a080]: MediaSourceReader(b02f6000)::already_AddRefed<mozilla::SourceBufferDecoder> mozilla::MediaSourceReader::CreateSubDecoder(const nsACString_internal&, int64_t): subdecoder afe4e880 subreader b026a000
> I/PRLog   ( 1753): -1216884640[b214a080]: MediaSourceResource(afe41830:)::virtual int64_t mozilla::MediaSourceResource::GetLength(): UNIMPLEMENTED FUNCTION at ../../../../../gecko/dom/media/mediasource/MediaSourceResource.h:49
> I/PRLog   ( 1753): -1216884640[b214a080]: MediaSourceResource(afe41830:)::virtual void mozilla::MediaSourceResource::SetPlaybackRate(uint32_t): UNIMPLEMENTED FUNCTION at ../../../../../gecko/dom/media/mediasource/MediaSourceResource.h:41
> I/PRLog   ( 1753): -1216884640[b214a080]: MediaSourceReader(b02f6000)::void mozilla::MediaSourceReader::MaybeNotifyHaveData(): isSeeking=0 haveAudio=0, haveVideo=0 ended=0
> I/PRLog   ( 1753): -1184671360[afe24580]: TrackBuffer(b02f8800:video/webm)::void mozilla::TrackBuffer::InitializeDecoder(mozilla::SourceBufferDecoder*): Initializing subdecoder afe4e880 reader b026a000
> F/MOZ_Assert( 1753): Assertion failure: OnTaskQueue(), at ../../../../../gecko/dom/media/omx/MediaOmxReader.cpp:256

When TrackBuffer start to initialize decoders, the initialization task and the task of read meta data in initialization task need different threads. So when it want to read meta data, the thread checking assert would fail.
I use the same workaround in WebMReader::ReadMetadata. It use the decoder thread to read meta data to avoid the wrong thread error.

See also Bug 1148234, after this bug is fixed, we won't need this workaround.
Depends on: 1148260, 1148234
Depends on: 1156675
No longer depends on: 1156675
Did you modify any codes to test WebM MSE on B2G?
I only modify the assertion to check the thread in MediaOmxReader::ReadMetadata.
No need to enable some prefs in all.js or disable MOZ_FMP4 for webm?
Component: Mochitest → Video/Audio
Product: Testing → Core
(In reply to Blake Wu [:bwu][:blakewu] from comment #4)
> No need to enable some prefs in all.js or disable MOZ_FMP4 for webm?

I think the prefs are already enabled in 'prefs_general.js' for testing. So, we don't need to enable 'media.mediasource.webm.enabled' by ourself.
This bug has also resolved when the patches in Bug 1157075 were landed. Because the code in the patches change to use the TaskQueue of reader to dispatch the decoder initialization task! So, the readMetadata in wrong thread problem is resolved.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: