* Copyright (C) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @addtogroup Core
* @{
*
* @brief The Core module provides basic backbone capabilities for media frameworks,
* including functions such as memory, error codes, and media data structures.
*
* @syscap SystemCapability.Multimedia.Media.Core
* @since 9
*/
* @file native_avbuffer_info.h
*
* @brief Declared the definition of the AVBuffer property for media data structures.
*
* @library libnative_media_core.so
* @syscap SystemCapability.Multimedia.Media.Core
* @since 9
*/
#ifndef NATIVE_AVBUFFER_INFO_H
#define NATIVE_AVBUFFER_INFO_H
#include <stdint.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
* @brief Enumerate the categories of OH_AVCodec's Buffer tags.
* @syscap SystemCapability.Multimedia.Media.Core
* @since 9
*/
typedef enum OH_AVCodecBufferFlags {
AVCODEC_BUFFER_FLAGS_NONE = 0,
AVCODEC_BUFFER_FLAGS_EOS = 1 << 0,
AVCODEC_BUFFER_FLAGS_SYNC_FRAME = 1 << 1,
AVCODEC_BUFFER_FLAGS_INCOMPLETE_FRAME = 1 << 2,
AVCODEC_BUFFER_FLAGS_CODEC_DATA = 1 << 3,
* for output and should be dropped after decoding.
* @since 12
*/
AVCODEC_BUFFER_FLAGS_DISCARD = 1 << 4,
* I.e. Non-reference frames.
* @since 12
*/
AVCODEC_BUFFER_FLAGS_DISPOSABLE = 1 << 5,
} OH_AVCodecBufferFlags;
* @brief Define the Buffer description information of OH_AVCodec
* @syscap SystemCapability.Multimedia.Media.Core
* @since 9
*/
typedef struct OH_AVCodecBufferAttr {
int64_t pts;
int32_t size;
int32_t offset;
uint32_t flags;
} OH_AVCodecBufferAttr;
#ifdef __cplusplus
}
#endif
#endif