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)]

impl OH_AVErrCode {
    /// the operation completed successfully.
    pub const AV_ERR_OK: OH_AVErrCode = OH_AVErrCode(0);
    /// no memory.
    pub const AV_ERR_NO_MEMORY: OH_AVErrCode = OH_AVErrCode(1);
    /// opertation not be permitted.
    pub const AV_ERR_OPERATE_NOT_PERMIT: OH_AVErrCode = OH_AVErrCode(2);
    /// invalid argument.
    pub const AV_ERR_INVALID_VAL: OH_AVErrCode = OH_AVErrCode(3);
    /// IO error.
    pub const AV_ERR_IO: OH_AVErrCode = OH_AVErrCode(4);
    /// network timeout.
    pub const AV_ERR_TIMEOUT: OH_AVErrCode = OH_AVErrCode(5);
    /// unknown error.
    pub const AV_ERR_UNKNOWN: OH_AVErrCode = OH_AVErrCode(6);
    /// media service died.
    pub const AV_ERR_SERVICE_DIED: OH_AVErrCode = OH_AVErrCode(7);
    /// the state is not support this operation.
    pub const AV_ERR_INVALID_STATE: OH_AVErrCode = OH_AVErrCode(8);
    /// unsupport interface.
    pub const AV_ERR_UNSUPPORT: OH_AVErrCode = OH_AVErrCode(9);
    /// input data error.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AV_ERR_INPUT_DATA_ERROR: OH_AVErrCode = OH_AVErrCode(10);
    /// unsupported format.
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub const AV_ERR_UNSUPPORTED_FORMAT: OH_AVErrCode = OH_AVErrCode(11);
    /// extend err start.
    pub const AV_ERR_EXTEND_START: OH_AVErrCode = OH_AVErrCode(100);
    /// drm error base.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AV_ERR_DRM_BASE: OH_AVErrCode = OH_AVErrCode(200);
    /// drm decypt failed.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AV_ERR_DRM_DECRYPT_FAILED: OH_AVErrCode = OH_AVErrCode(201);
    /// video error base.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AV_ERR_VIDEO_BASE: OH_AVErrCode = OH_AVErrCode(300);
    /// video unsupported color space conversion.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub const AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION: OH_AVErrCode = OH_AVErrCode(301);
    /// can not find host, maybe the address of server is incorrect.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_CANNOT_FIND_HOST: OH_AVErrCode = OH_AVErrCode(5411001);
    /// network connection timeout.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_CONNECTION_TIMEOUT: OH_AVErrCode = OH_AVErrCode(5411002);
    /// failed link due to abnormal network.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_NETWORK_ABNORMAL: OH_AVErrCode = OH_AVErrCode(5411003);
    /// failed link due to unavailable network.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_NETWORK_UNAVAILABLE: OH_AVErrCode = OH_AVErrCode(5411004);
    /// network permission dennied.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_NO_PERMISSION: OH_AVErrCode = OH_AVErrCode(5411005);
    /// the client request parameters are incorrect or exceed the processing capacity.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_NETWORK_ACCESS_DENIED: OH_AVErrCode = OH_AVErrCode(5411006);
    /// cannot find available network resources.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_RESOURCE_NOT_FOUND: OH_AVErrCode = OH_AVErrCode(5411007);
    /// the server failed to verify the client certificate because the certificate is not carried,
    /// the certificate is invalid, or the certificate is expired.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_SSL_CLIENT_CERT_NEEDED: OH_AVErrCode = OH_AVErrCode(5411008);
    /// the client failed to verify the server certificate because the certificate is not carried,
    /// the certificate is invalid, or the certificate is expired.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_SSL_CONNECT_FAIL: OH_AVErrCode = OH_AVErrCode(5411009);
    /// SSL server cert untrusted.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED: OH_AVErrCode = OH_AVErrCode(5411010);
    /// unsupported request due to network protocols.
    ///
    /// Available since API-level: 14
    #[cfg(feature = "api-14")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
    pub const AV_ERR_IO_UNSUPPORTED_REQUEST: OH_AVErrCode = OH_AVErrCode(5411011);
    /// Signals a stream format change in synchronous mode.
    /// Required follow-up actions:
    /// - For video encoders: Call [`OH_VideoEncoder_GetOutputDescription`]
    /// - For video decoders: Call [`OH_VideoDecoder_GetOutputDescription`]
    /// - For audio decoders : Call [`OH_AudioCodec_GetOutputDescription`]
    /// to retrieve updated stream configuration.
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const AV_ERR_STREAM_CHANGED: OH_AVErrCode = OH_AVErrCode(5410005);
    /// Indicates temporary buffer query failure in synchronous mode,
    /// it's recommended to wait and retry the operation after a short interval.
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const AV_ERR_TRY_AGAIN_LATER: OH_AVErrCode = OH_AVErrCode(5410006);
}
#[repr(transparent)]
/// AV error code
///
/// Required System Capabilities: SystemCapability.Multimedia.Media.Core
///
/// Available since API-level: 9
///
/// Version: 1.0
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AVErrCode(pub ::core::ffi::c_uint);