Closed Bug 1214520 Opened 5 years ago Closed 5 years ago

[Simulator] Couldn't see mock video on TV deck.

Categories

(Firefox OS Graveyard :: Simulator, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1206621

People

(Reporter: jj.evelyn, Unassigned)

References

Details

Per bug 1180589 comment 58, the mock video couldn't show up. Need to investigate more.
Blocks: 1201451
Mantaroh, please update here on your finding. Thank you.
Flags: needinfo?(mantaroh)
Thanks Evelyn,
Depends on: 1214506
Flags: needinfo?(mantaroh)
Hi all,

I find that it exists |fake_tv_service| in TV Deck app.

http://mxr.mozilla.org/gaia/source/shared/js/smart-screen/fake_tv_service.js

It will overwrite the TVSource API, so call set |setCurrentChannel| will enter the mock version.

So it has no chance to touch the |nsRefPtr<DOMMediaStream> stream = mediaElement->MozCaptureStream(error);|
https://dxr.mozilla.org/mozilla-central/source/dom/tv/TVTuner.cpp#299

And also need to apply Bug 1215429 patch.




Then I will encounter the assertion about playing the tv1.ogv file.

I attach the error log below for reference.

[Parent 1210] ###!!! ASSERTION: Wrong type: 'aSource->GetType() == C::StaticType()', file dom/media/MediaSegment.h, line 158
[Parent 1210] ###!!! ASSERTION: Bad track ID: 'aID > TRACK_NONE', file dom/media/StreamBuffer.h, line 77
[Parent 1210] ###!!! ASSERTION: Track with this ID already exists: '!FindTrack(aID)', file dom/media/StreamBuffer.h, line 213
[Parent 1210] ###!!! ASSERTION: Bad track ID: 'aID > TRACK_NONE', file dom/media/StreamBuffer.h, line 77
[Parent 1210] WARNING: A new track was detected on the input stream; creating a corresponding MediaStreamTrack. Initial tracks should be added manually to immediately and synchronously be available to JS.: '!mStream->mTracks.IsEmpty()', file dom/media/DOMMediaStream.cpp, line 171
Hi Mantaroh,

Refer to Bug 1177793 comment 21, 

This issue can be reproduced not only on b2g desktop but on normal nightly browser.

I find that it is related to the specified file.

I randomly choose a ogv file from |embedding/test/320x240.ogv| or |dom/media/test/VID_0001.ogg| or any mp4 files, those can normally be displayed.

Only failed by playing tv1.ogv which is produced by settings.json.


The test code is as below, Does the symptom the same as you met before?
<!DOCTYPE html>
<body>
<video controls autoplay src="tv1.ogv"></video> //Failed
<script>
var v = document.querySelector('video');
var stream = v.mozCaptureStream();
var streamURL = URL.createObjectURL(stream);
var div = document.createElement('div');
document.body.appendChild(div);
div.outerHTML = `
<div style="position:absolute;top:0;right:0;border:1px solid red">
<video controls autoplay>
<source src="${streamURL}"></source>
</video>
</div>
`;
</script>
Flags: needinfo?(mantaroh)
Hi James,

Sorry late rely.

(In reply to James Cheng[:JamesCheng] from comment #3)
> Then I will encounter the assertion about playing the tv1.ogv file.
> 
Is your Gaia up-to-date? It seems using previous Gaia's dummy video file. So I changed the movie file at bug 121453.
Crashing reason is investigating at bug 1214506.

(In reply to James Cheng[:JamesCheng] from comment #4)
> This issue can be reproduced not only on b2g desktop but on normal nightly
> browser.
Yes. I filed crash bug as bug 1214506.

Best regards,
Hi Mantaroh,

In Bug 1214513, you replace the original ogv file. Do you know the mainly different between these two ogvs?

I cannot reproduce the crash but I will bump into the assertion in 
https://dxr.mozilla.org/mozilla-central/rev/e8c7dfe727cd970e2c3294934e2927b14143c205/dom/media/MediaSegment.h#158

I dump the info, this is weird that the type is |Video| but the C is |AudioSegment|

>>> p aSource->mType
$5 = mozilla::MediaSegment::VIDEO
>>> p this
$6 = (mozilla::MediaSegmentBase<mozilla::AudioSegment, mozilla::AudioChunk> * const) 0x7fffc658ccc0

Maybe the crash is related to this assertion...

Thank you.
Flags: needinfo?(mantaroh)
Hi James,

Thank you for your information.

> In Bug 1214513, you replace the original ogv file. Do you know the mainly
> different between these two ogvs?
Perhaps previous file was broken.
When I confirmed this video  using ffmpeg2theora, it says "Broken file".

> I cannot reproduce the crash but I will bump into the assertion in 
> https://dxr.mozilla.org/mozilla-central/rev/
> e8c7dfe727cd970e2c3294934e2927b14143c205/dom/media/MediaSegment.h#158
> 
> I dump the info, this is weird that the type is |Video| but the C is
> |AudioSegment|
> 
> >>> p aSource->mType
> $5 = mozilla::MediaSegment::VIDEO
> >>> p this
> $6 = (mozilla::MediaSegmentBase<mozilla::AudioSegment, mozilla::AudioChunk>
> * const) 0x7fffc658ccc0
> 
Umm, I can reproduce using other video files which converted ffmpeg2theora. However current Gaia's dummy video file can't reproduce this assertion.
I investigate it continuously.
Flags: needinfo?(mantaroh)
Flags: needinfo?(mantaroh)
Hi all,

On my simulator build it magically works with latest gecko/gaia and patch on bug 1206621. I don't know either gecko fixed or bug 1206621 fixed this issue. Anyway, I think we can close this one after bug 1206621 landed. Thanks!
Hi Evelyn,

I think bug 1206621 affected this issue. After applying patch on bug 1206621, I can play dummy video file. And I can use MediaStream to video tag.

Thank you so much.
No longer depends on: 1177793
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1206621
You need to log in before you can comment on or make changes to this bug.