tor-browser

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

AgnosticDecoderModule.h (1354B)


      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 
      7 #if !defined(AgnosticDecoderModule_h_)
      8 #  define AgnosticDecoderModule_h_
      9 
     10 #  include "PlatformDecoderModule.h"
     11 
     12 namespace mozilla {
     13 
     14 class AgnosticDecoderModule : public PlatformDecoderModule {
     15 public:
     16  const char* Name() const override { return "Agnostic"; }
     17  static already_AddRefed<PlatformDecoderModule> Create();
     18 
     19  media::DecodeSupportSet SupportsMimeType(
     20      const nsACString& aMimeType,
     21      DecoderDoctorDiagnostics* aDiagnostics) const override;
     22  media::DecodeSupportSet Supports(
     23      const SupportDecoderParams& aParams,
     24      DecoderDoctorDiagnostics* aDiagnostics) const override;
     25 
     26 protected:
     27  AgnosticDecoderModule() = default;
     28  virtual ~AgnosticDecoderModule() = default;
     29  // Decode thread.
     30  already_AddRefed<MediaDataDecoder> CreateVideoDecoder(
     31      const CreateDecoderParams& aParams) override;
     32 
     33  // Decode thread.
     34  already_AddRefed<MediaDataDecoder> CreateAudioDecoder(
     35      const CreateDecoderParams& aParams) override;
     36 };
     37 
     38 }  // namespace mozilla
     39 
     40 #endif /* AgnosticDecoderModule_h_ */