Bug 1548113 - pass mEOS from MediaRawData to remote decoder. r=jya

Lack of mEOS for decoding Vorbis on RDD was causing a mochitest failure
with file spacestorm-1000Hz-100ms.ogg in dom/media/test/test_playback.html.
The symptom was an incorrect frame count here[1].

[1] https://searchfox.org/mozilla-central/rev/b59a99943de4dd314bae4e44ab43ce7687ccbbec/dom/media/platforms/agnostic/VorbisDecoder.cpp#178

Differential Revision: https://phabricator.services.mozilla.com/D29756

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Froman 2019-05-03 00:36:19 +00:00
Родитель 1ff5c5c733
Коммит 9b57c4ac82
5 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -8,6 +8,7 @@ using mozilla::media::TimeUnit from "TimeUnits.h";
namespace mozilla {
// used for both SendInput/RecvInput and ProcessDecodedData/RecvOutput
struct MediaDataIPDL
{
int64_t offset;
@ -17,9 +18,11 @@ struct MediaDataIPDL
bool keyframe;
};
// used for SendInput/RecvInput
struct MediaRawDataIPDL
{
MediaDataIPDL base;
bool eos;
Shmem buffer;
};

Просмотреть файл

@ -114,6 +114,7 @@ RefPtr<MediaDataDecoder::DecodePromise> RemoteDecoderChild::Decode(
MediaRawDataIPDL sample(
MediaDataIPDL(aSample->mOffset, aSample->mTime, aSample->mTimecode,
aSample->mDuration, aSample->mKeyframe),
aSample->mEOS,
std::move(buffer));
SendInput(sample);

Просмотреть файл

@ -77,6 +77,7 @@ mozilla::ipc::IPCResult RemoteDecoderParent::RecvInput(
data->mTimecode = aData.base().timecode();
data->mDuration = aData.base().duration();
data->mKeyframe = aData.base().keyframe();
data->mEOS = aData.eos();
DeallocShmem(aData.buffer());

Просмотреть файл

@ -243,6 +243,7 @@ RefPtr<MediaDataDecoder::DecodePromise> VideoDecoderChild::Decode(
MediaRawDataIPDL sample(
MediaDataIPDL(aSample->mOffset, aSample->mTime, aSample->mTimecode,
aSample->mDuration, aSample->mKeyframe),
aSample->mEOS,
std::move(buffer));
SendInput(sample);
return mDecodePromise.Ensure(__func__);

Просмотреть файл

@ -148,6 +148,7 @@ mozilla::ipc::IPCResult VideoDecoderParent::RecvInput(
data->mTimecode = aData.base().timecode();
data->mDuration = aData.base().duration();
data->mKeyframe = aData.base().keyframe();
data->mEOS = aData.eos();
DeallocShmem(aData.buffer());