media.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) 2012 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. // Contains code that should be used for initializing, or querying the state
  5. // of the media library as a whole.
  6. #ifndef MEDIA_BASE_MEDIA_H_
  7. #define MEDIA_BASE_MEDIA_H_
  8. #include <stdint.h>
  9. #include "build/build_config.h"
  10. #include "media/base/media_export.h"
  11. namespace media {
  12. // Initializes media libraries (e.g. ffmpeg) as well as CPU specific media
  13. // features.
  14. MEDIA_EXPORT void InitializeMediaLibrary();
  15. // Same as InitializeMediaLibrary() but specifies the CPU flags used by libyuv
  16. // and ffmpeg (libavutil). Retrieving these flags may access the file system
  17. // (/proc/cpuinfo) which won't work in sandboxed processes. For such processes,
  18. // a non sandboxed process should retrieve these flags in advance (via
  19. // libyuv::InitCpuFlags() and av_get_cpu_flags()) and pass them to the sandboxed
  20. // process that should then call this method.
  21. MEDIA_EXPORT void InitializeMediaLibraryInSandbox(int64_t libyuv_cpu_flags,
  22. int64_t libavutil_cpu_flags);
  23. } // namespace media
  24. #endif // MEDIA_BASE_MEDIA_H_