mirroring_features.cc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2021 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. #include "components/mirroring/service/mirroring_features.h"
  5. #include "third_party/libaom/libaom_buildflags.h"
  6. namespace mirroring {
  7. namespace features {
  8. // Controls whether offers using the AV1 codec for video encoding are included
  9. // in mirroring negotiations in addition to the VP8 codec, or offers only
  10. // include VP8.
  11. const base::Feature kCastStreamingAv1{"CastStreamingAv1",
  12. base::FEATURE_DISABLED_BY_DEFAULT};
  13. // Controls whether offers using the VP9 codec for video encoding are included
  14. // in mirroring negotiations in addition to the VP8 codec, or offers only
  15. // include VP8.
  16. const base::Feature kCastStreamingVp9{"CastStreamingVp9",
  17. base::FEATURE_DISABLED_BY_DEFAULT};
  18. // Controls whether the allow list (legacy behavior) or blocklist is used to
  19. // determine whether remoting capabilities should be queried for as part of
  20. // configuring a mirroring session.
  21. const base::Feature kCastUseBlocklistForRemotingQuery{
  22. "CastUseBlocklistForRemotingQuery", base::FEATURE_DISABLED_BY_DEFAULT};
  23. // Enables querying for remoting capabilities against ALL devices, as opposed to
  24. // just those controlled by the allow or blocklist. When set, this flag takes
  25. // precedence over the above flag.
  26. const base::Feature kCastForceEnableRemotingQuery{
  27. "CastForceEnableRemotingQuery", base::FEATURE_DISABLED_BY_DEFAULT};
  28. bool IsCastStreamingAV1Enabled() {
  29. #if BUILDFLAG(ENABLE_LIBAOM)
  30. return base::FeatureList::IsEnabled(features::kCastStreamingAv1);
  31. #else
  32. return false;
  33. #endif
  34. }
  35. } // namespace features
  36. } // namespace mirroring