Bug 1321051 - Override Supports(TrackInfo) in RemoteDecoderModule - r=jya
authorGerald Squelart <gsquelart@mozilla.com>
Wed, 01 Feb 2017 12:18:59 +1100
changeset 331968 9635a6d92b1c9dcd4c8695dae6370982c870e935
parent 331967 e9f38cda7664c752e999a1c4455f556aa3b724cf
child 331969 feb30777c832e60eb05a15d8c01ce01ba35da426
push id31293
push userkwierso@gmail.com
push dateThu, 02 Feb 2017 00:07:12 +0000
treeherdermozilla-central@8196774c6b8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1321051
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1321051 - Override Supports(TrackInfo) in RemoteDecoderModule - r=jya With e10s enabled, RemoteDecoderModule is used as a proxy, but it was not overriding Supports(TrackInfo), meaning that some of the extra information carried in TrackInfo (e.g.: resolution) was lost when falling back to SupportsMimeType(nsACString). So further along, WMFDecoderModule was not able to reject too-high resolutions. Overriding Supports(TrackInfo) to just forward the TrackInfo data is enough to re-enable resolution checks on Windows. MozReview-Commit-ID: 3OsPmILItH7
dom/media/ipc/RemoteVideoDecoder.cpp
dom/media/ipc/RemoteVideoDecoder.h
--- a/dom/media/ipc/RemoteVideoDecoder.cpp
+++ b/dom/media/ipc/RemoteVideoDecoder.cpp
@@ -147,16 +147,23 @@ RemoteDecoderModule::Startup()
 
 bool
 RemoteDecoderModule::SupportsMimeType(const nsACString& aMimeType,
                                       DecoderDoctorDiagnostics* aDiagnostics) const
 {
   return mWrapped->SupportsMimeType(aMimeType, aDiagnostics);
 }
 
+bool
+RemoteDecoderModule::Supports(const TrackInfo& aTrackInfo,
+                              DecoderDoctorDiagnostics* aDiagnostics) const
+{
+  return mWrapped->Supports(aTrackInfo, aDiagnostics);
+}
+
 PlatformDecoderModule::ConversionRequired
 RemoteDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
 {
   return mWrapped->DecoderNeedsConversion(aConfig);
 }
 
 already_AddRefed<MediaDataDecoder>
 RemoteDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
--- a/dom/media/ipc/RemoteVideoDecoder.h
+++ b/dom/media/ipc/RemoteVideoDecoder.h
@@ -62,16 +62,18 @@ public:
   explicit RemoteDecoderModule(PlatformDecoderModule* aWrapped)
     : mWrapped(aWrapped)
   {}
 
   nsresult Startup() override;
 
   bool SupportsMimeType(const nsACString& aMimeType,
                         DecoderDoctorDiagnostics* aDiagnostics) const override;
+  bool Supports(const TrackInfo& aTrackInfo,
+                DecoderDoctorDiagnostics* aDiagnostics) const override;
 
   ConversionRequired DecoderNeedsConversion(
     const TrackInfo& aConfig) const override;
 
   already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
     const CreateDecoderParams& aParams) override;
 
   already_AddRefed<MediaDataDecoder> CreateAudioDecoder(