ohos-media-sys 0.1.0

Raw Bindings to the media framework on OpenHarmony
Documentation
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(deprecated)]
#[allow(unused_imports)]
use crate::averrors::OH_AVErrCode;

impl ::core::ops::BitOr<OH_AVCodecBufferFlags> for OH_AVCodecBufferFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        OH_AVCodecBufferFlags(self.0 | other.0)
    }
}
impl ::core::ops::BitOrAssign for OH_AVCodecBufferFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: OH_AVCodecBufferFlags) {
        self.0 |= rhs.0;
    }
}
impl ::core::ops::BitAnd<OH_AVCodecBufferFlags> for OH_AVCodecBufferFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        OH_AVCodecBufferFlags(self.0 & other.0)
    }
}
impl ::core::ops::BitAndAssign for OH_AVCodecBufferFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: OH_AVCodecBufferFlags) {
        self.0 &= rhs.0;
    }
}
impl OH_AVCodecBufferFlags {
    pub const NONE: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(0);
    /// Indicates that the Buffer is an End-of-Stream frame.
    pub const EOS: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(1);
    /// Indicates that the Buffer contains keyframes.
    pub const SYNC_FRAME: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(2);
    /// Indicates that the data contained in the Buffer is only part of a frame.
    pub const INCOMPLETE_FRAME: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(4);
    /// Indicates that the Buffer contains Codec-Specific-Data.
    pub const CODEC_DATA: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(8);
    /// Flag is used to discard packets which are required to maintain valid decoder state but are not required
    /// for output and should be dropped after decoding.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const DISCARD: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(16);
    /// Flag is used to indicate packets that contain frames that can be discarded by the decoder,
    /// I.e. Non-reference frames.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const DISPOSABLE: OH_AVCodecBufferFlags = OH_AVCodecBufferFlags(32);
}
#[repr(transparent)]
/// Enumerate the categories of OH_AVCodec's Buffer tags.
///
/// Required System Capabilities: SystemCapability.Multimedia.Media.Core
///
/// Available since API-level: 9
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AVCodecBufferFlags(pub ::core::ffi::c_uint);
/// Define the Buffer description information of OH_AVCodec
///
/// Required System Capabilities: SystemCapability.Multimedia.Media.Core
///
/// Available since API-level: 9
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AVCodecBufferAttr {
    pub pts: i64,
    pub size: i32,
    pub offset: i32,
    pub flags: u32,
}