Bug 1248507 - p1. Pass DecoderDoctorDiagnostics to PDMs&more - r=jya

Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.

Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.

MozReview-Commit-ID: 7u37bvY4CpW
This commit is contained in:
Gerald Squelart
2016-04-19 17:36:19 +10:00
parent 359755ea3a
commit ba02e820af
37 changed files with 251 additions and 127 deletions

View File

@@ -2898,7 +2898,8 @@ HTMLMediaElement::GetCanPlay(const nsAString& aType)
NS_ConvertUTF16toUTF8 mimeTypeUTF8(mimeType);
return DecoderTraits::CanHandleMediaType(mimeTypeUTF8.get(),
NS_SUCCEEDED(rv),
codecs);
codecs,
/* DecoderDoctorDiagnostics* */ nullptr);
}
NS_IMETHODIMP
@@ -2964,7 +2965,9 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
aChannel->GetContentType(mimeType);
NS_ASSERTION(!mimeType.IsEmpty(), "We should have the Content-Type.");
RefPtr<MediaDecoder> decoder = DecoderTraits::CreateDecoder(mimeType, this);
RefPtr<MediaDecoder> decoder =
DecoderTraits::CreateDecoder(mimeType, this,
/* DecoderDoctorDiagnostics* */ nullptr);
if (!decoder) {
nsAutoString src;
GetCurrentSrc(src);