tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RemoteDecoderModule.h (1746B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 #ifndef include_dom_media_ipc_RemoteDecoderModule_h
      7 #define include_dom_media_ipc_RemoteDecoderModule_h
      8 #include "PlatformDecoderModule.h"
      9 
     10 namespace mozilla {
     11 
     12 enum class RemoteMediaIn;
     13 
     14 // A decoder module that proxies decoding to either GPU or RDD process.
     15 class RemoteDecoderModule : public PlatformDecoderModule {
     16  template <typename T, typename... Args>
     17  friend already_AddRefed<T> MakeAndAddRef(Args&&...);
     18 
     19 public:
     20  const char* Name() const override;
     21  static already_AddRefed<PlatformDecoderModule> Create(
     22      RemoteMediaIn aLocation);
     23 
     24  media::DecodeSupportSet SupportsMimeType(
     25      const nsACString& aMimeType,
     26      DecoderDoctorDiagnostics* aDiagnostics) const override;
     27 
     28  media::DecodeSupportSet Supports(
     29      const SupportDecoderParams& aParams,
     30      DecoderDoctorDiagnostics* aDiagnostics) const override;
     31 
     32  RefPtr<CreateDecoderPromise> AsyncCreateDecoder(
     33      const CreateDecoderParams& aParams) override;
     34 
     35  already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
     36      const CreateDecoderParams& aParams) override {
     37    MOZ_CRASH("Not available");
     38  }
     39 
     40  already_AddRefed<MediaDataDecoder> CreateAudioDecoder(
     41      const CreateDecoderParams& aParams) override {
     42    MOZ_CRASH("Not available");
     43  }
     44 
     45 private:
     46  explicit RemoteDecoderModule(RemoteMediaIn aLocation);
     47 
     48  const RemoteMediaIn mLocation;
     49 };
     50 
     51 }  // namespace mozilla
     52 
     53 #endif  // include_dom_media_ipc_RemoteDecoderModule_h