Bug 1749046 - Generalize EncoderTraits so that it works for audio. r=chunmin

Differential Revision: https://phabricator.services.mozilla.com/D199523
This commit is contained in:
Paul Adenot 2024-03-27 14:16:29 +00:00
parent fbd79d4bbc
commit 40c99f5805

View File

@ -12,12 +12,13 @@
namespace mozilla::EncoderSupport {
bool Supports(const RefPtr<dom::VideoEncoderConfigInternal>& aEncoderConfigInternal) {
template <typename T>
bool Supports(const RefPtr<T>& aEncoderConfigInternal) {
RefPtr<PEMFactory> factory = new PEMFactory();
EncoderConfig config = aEncoderConfigInternal->ToEncoderConfig();
return factory->Supports(config);
}
} // namespace mozilla
} // namespace mozilla::EncoderSupport
#endif