supported_types.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef MEDIA_BASE_SUPPORTED_TYPES_H_
  5. #define MEDIA_BASE_SUPPORTED_TYPES_H_
  6. #include "base/containers/flat_set.h"
  7. #include "media/base/media_types.h"
  8. namespace media {
  9. // These functions will attempt to delegate to MediaClient (when present) to
  10. // describe what types of media are supported. When no MediaClient is provided,
  11. // they will fall back to calling the Default functions below.
  12. MEDIA_EXPORT bool IsSupportedAudioType(const AudioType& type);
  13. MEDIA_EXPORT bool IsSupportedVideoType(const VideoType& type);
  14. // These functions describe what media/ alone supports. They do not call out to
  15. // MediaClient and do not describe media/ embedder customization. Callers should
  16. // generally prefer the non-Default APIs above.
  17. MEDIA_EXPORT bool IsDefaultSupportedAudioType(const AudioType& type);
  18. MEDIA_EXPORT bool IsDefaultSupportedVideoType(const VideoType& type);
  19. // This function lets the caller add additional codec profiles to those
  20. // supported by default. Used primarily to add hardware codec profiles once
  21. // support is known.
  22. MEDIA_EXPORT void UpdateDefaultSupportedVideoProfiles(
  23. const base::flat_set<VideoCodecProfile>& profiles);
  24. } // namespace media
  25. #endif // MEDIA_BASE_SUPPORTED_TYPES_H_