diff options
Diffstat (limited to '')
-rw-r--r-- | dom/media/EncoderTraits.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dom/media/EncoderTraits.h b/dom/media/EncoderTraits.h new file mode 100644 index 0000000000..d96bc37e4a --- /dev/null +++ b/dom/media/EncoderTraits.h @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef EncoderTraits_h_ +#define EncoderTraits_h_ + +#include "mozilla/dom/EncoderTypes.h" +#include "PEMFactory.h" + +namespace mozilla::EncoderSupport { + +bool Supports(const RefPtr<dom::VideoEncoderConfigInternal>& aEncoderConfigInternal) { + RefPtr<PEMFactory> factory = new PEMFactory(); + EncoderConfig config = aEncoderConfigInternal->ToEncoderConfig(); + return factory->Supports(config); +} + +} // namespace mozilla + +#endif |