Lines Matching refs:buffer

19  * @brief Provides audio and video buffer.
57 * @param capacity the buffer's capacity, bytes
60 * 4. created buffer memory is nullptr. 5. created buffer memory's addr is nullptr. 6. failed to new OH_AVBuffer.
66 * @brief Clear the internal resources of the buffer and destroy the buffer instance.
68 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
71 * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr or buffer's magic error.
72 * {@link AV_ERR_OPERATE_NOT_PERMIT} if input buffer is not user created.
75 OH_AVErrCode OH_AVBuffer_Destroy(OH_AVBuffer *buffer);
78 * @brief Get the buffer's attribute.
80 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
85 * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
86 * input buffer's buffer is nulllptr or attr is nullptr.
89 OH_AVErrCode OH_AVBuffer_GetBufferAttr(OH_AVBuffer *buffer, OH_AVCodecBufferAttr *attr);
92 * @brief Set the buffer's attribute.
94 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
99 * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
100 * input buffer's buffer is nulllptr, attr is nullptr, the size or offset of input buffer's memory is invalid.
103 OH_AVErrCode OH_AVBuffer_SetBufferAttr(OH_AVBuffer *buffer, const OH_AVCodecBufferAttr *attr);
106 * @brief Get the buffer's parameter. It should be noted that the life cycle of the OH_AVFormat instance pointed to
109 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
111 * otherwise returns nullptr. Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
112 * 3. input buffer's buffer is nulllptr. 4. buffer's meta is nullptr.
115 OH_AVFormat *OH_AVBuffer_GetParameter(OH_AVBuffer *buffer);
118 * @brief Set the buffer's parameter.
120 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
124 * {@link AV_ERR_INVALID_VAL} if input buffer is nullptr, buffer's magic error,
125 * input buffer's buffer is nulllptr, input format is nullptr, buffer's magic error, or input meta is nullptr.
128 OH_AVErrCode OH_AVBuffer_SetParameter(OH_AVBuffer *buffer, const OH_AVFormat *format);
131 * @brief Get the buffer's virtual address.
133 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
134 * @return the buffer's virtual address if the buffer is valid, otherwise nullptr
135 * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
136 * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr.
139 uint8_t *OH_AVBuffer_GetAddr(OH_AVBuffer *buffer);
142 * @brief Get the buffer's capacity
144 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
145 * @return the buffer's capacity if the buffer is valid, otherwise -1
146 * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
147 * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr.
150 int32_t OH_AVBuffer_GetCapacity(OH_AVBuffer *buffer);
156 * @param buffer Encapsulate OH_AVBuffer structure instance pointer
158 * Possible failure causes: 1. input buffer is nullptr. 2. buffer's magic error.
159 * 3. input buffer's buffer is nulllptr. 4. buffer's memory is nullptr. 5. surfaceBuffer is nullptr.
162 OH_NativeBuffer *OH_AVBuffer_GetNativeBuffer(OH_AVBuffer *buffer);