xref: /aosp_15_r20/external/crosvm/media/ffmpeg/src/lib.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1 // Copyright 2022 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #![cfg(all(
6     any(target_os = "android", target_os = "linux"),
7     not(target_arch = "arm")
8 ))]
9 
10 pub mod avcodec;
11 mod avutil;
12 pub use avutil::*;
13 mod error;
14 pub use error::*;
15 mod ffi {
16     #![allow(clippy::missing_safety_doc)]
17     #![allow(clippy::undocumented_unsafe_blocks)]
18     #![allow(clippy::upper_case_acronyms)]
19     #![allow(non_upper_case_globals)]
20     #![allow(non_camel_case_types)]
21     #![allow(non_snake_case)]
22     #![allow(dead_code)]
23     include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
24 
25     /// SAFETY: `AVCodec` instances are all static and thus safe to share.
26     unsafe impl Sync for AVCodec {}
27 }
28 pub mod swscale;
29 
30 pub use ffi::AVPictureType_AV_PICTURE_TYPE_I;
31 pub use ffi::AVPixelFormat_AV_PIX_FMT_NV12;
32 pub use ffi::AVPixelFormat_AV_PIX_FMT_YUV420P;
33 pub use ffi::AVRational;
34 pub use ffi::AV_CODEC_CAP_DR1;
35 pub use ffi::AV_PKT_FLAG_KEY;
36 pub use ffi::FF_PROFILE_H264_BASELINE;
37 pub use ffi::FF_PROFILE_H264_EXTENDED;
38 pub use ffi::FF_PROFILE_H264_HIGH;
39 pub use ffi::FF_PROFILE_H264_HIGH_10;
40 pub use ffi::FF_PROFILE_H264_HIGH_422;
41 pub use ffi::FF_PROFILE_H264_HIGH_444_PREDICTIVE;
42 pub use ffi::FF_PROFILE_H264_MAIN;
43 pub use ffi::FF_PROFILE_H264_MULTIVIEW_HIGH;
44 pub use ffi::FF_PROFILE_H264_STEREO_HIGH;
45 pub use ffi::FF_PROFILE_HEVC_MAIN;
46 pub use ffi::FF_PROFILE_HEVC_MAIN_10;
47 pub use ffi::FF_PROFILE_HEVC_MAIN_STILL_PICTURE;
48 pub use ffi::FF_PROFILE_VP9_0;
49 pub use ffi::FF_PROFILE_VP9_1;
50 pub use ffi::FF_PROFILE_VP9_2;
51 pub use ffi::FF_PROFILE_VP9_3;
52