mirror of
https://gitee.com/openharmony/interface_sdk_c
synced 2024-11-23 14:50:20 +00:00
commit
cadf38a64f
@ -287,7 +287,10 @@ typedef struct {
|
||||
|
||||
/**
|
||||
* @brief Alloc a <b>OH_NativeBuffer</b> that matches the passed BufferRequestConfig. \n
|
||||
* A new <b>OH_NativeBuffer</b> instance is created each time this function is called.
|
||||
* A new <b>OH_NativeBuffer</b> instance is created each time this function is called.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unreference<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param config Indicates the pointer to a <b>BufferRequestConfig</b> instance.
|
||||
@ -299,7 +302,10 @@ typedef struct {
|
||||
OH_NativeBuffer* OH_NativeBuffer_Alloc(const OH_NativeBuffer_Config* config);
|
||||
|
||||
/**
|
||||
* @brief Adds the reference count of a OH_NativeBuffer.
|
||||
* @brief Adds the reference count of a OH_NativeBuffer.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unreference<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -310,8 +316,9 @@ OH_NativeBuffer* OH_NativeBuffer_Alloc(const OH_NativeBuffer_Config* config);
|
||||
int32_t OH_NativeBuffer_Reference(OH_NativeBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Decreases the reference count of a OH_NativeBuffer and, when the reference count reaches 0, \n
|
||||
* destroys this OH_NativeBuffer.
|
||||
* @brief Decreases the reference count of a OH_NativeBuffer and, when the reference count reaches 0,
|
||||
* destroys this OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -322,7 +329,8 @@ int32_t OH_NativeBuffer_Reference(OH_NativeBuffer *buffer);
|
||||
int32_t OH_NativeBuffer_Unreference(OH_NativeBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Return a config of the OH_NativeBuffer in the passed OHNativeBufferConfig struct.
|
||||
* @brief Return a config of the OH_NativeBuffer in the passed OHNativeBufferConfig struct.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -334,7 +342,9 @@ int32_t OH_NativeBuffer_Unreference(OH_NativeBuffer *buffer);
|
||||
void OH_NativeBuffer_GetConfig(OH_NativeBuffer *buffer, OH_NativeBuffer_Config* config);
|
||||
|
||||
/**
|
||||
* @brief Provide direct cpu access to the OH_NativeBuffer in the process's address space.
|
||||
* @brief Provide direct cpu access to the OH_NativeBuffer in the process's address space.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unmap<\b>.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -347,7 +357,8 @@ void OH_NativeBuffer_GetConfig(OH_NativeBuffer *buffer, OH_NativeBuffer_Config*
|
||||
int32_t OH_NativeBuffer_Map(OH_NativeBuffer *buffer, void **virAddr);
|
||||
|
||||
/**
|
||||
* @brief Remove direct cpu access ability of the OH_NativeBuffer in the process's address space.
|
||||
* @brief Remove direct cpu access ability of the OH_NativeBuffer in the process's address space.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -358,7 +369,8 @@ int32_t OH_NativeBuffer_Map(OH_NativeBuffer *buffer, void **virAddr);
|
||||
int32_t OH_NativeBuffer_Unmap(OH_NativeBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Get the systen wide unique sequence number of the OH_NativeBuffer.
|
||||
* @brief Get the systen wide unique sequence number of the OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -369,7 +381,8 @@ int32_t OH_NativeBuffer_Unmap(OH_NativeBuffer *buffer);
|
||||
uint32_t OH_NativeBuffer_GetSeqNum(OH_NativeBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Provide direct cpu access to the potentially multi-plannar OH_NativeBuffer in the process's address space.
|
||||
* @brief Provide direct cpu access to the potentially multi-plannar OH_NativeBuffer in the process's address space.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -382,7 +395,8 @@ uint32_t OH_NativeBuffer_GetSeqNum(OH_NativeBuffer *buffer);
|
||||
int32_t OH_NativeBuffer_MapPlanes(OH_NativeBuffer *buffer, void **virAddr, OH_NativeBuffer_Planes *outPlanes);
|
||||
|
||||
/**
|
||||
* @brief Converts an <b>OHNativeWindowBuffer</b> instance to an <b>OH_NativeBuffer</b>.
|
||||
* @brief Converts an <b>OHNativeWindowBuffer</b> instance to an <b>OH_NativeBuffer</b>.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param nativeWindowBuffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -394,7 +408,8 @@ int32_t OH_NativeBuffer_MapPlanes(OH_NativeBuffer *buffer, void **virAddr, OH_Na
|
||||
int32_t OH_NativeBuffer_FromNativeWindowBuffer(OHNativeWindowBuffer *nativeWindowBuffer, OH_NativeBuffer **buffer);
|
||||
|
||||
/**
|
||||
* @brief Set the color space of the OH_NativeBuffer.
|
||||
* @brief Set the color space of the OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -406,7 +421,8 @@ int32_t OH_NativeBuffer_FromNativeWindowBuffer(OHNativeWindowBuffer *nativeWindo
|
||||
int32_t OH_NativeBuffer_SetColorSpace(OH_NativeBuffer *buffer, OH_NativeBuffer_ColorSpace colorSpace);
|
||||
|
||||
/**
|
||||
* @brief Get the color space of the OH_NativeBuffer.
|
||||
* @brief Get the color space of the OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -420,7 +436,8 @@ int32_t OH_NativeBuffer_SetColorSpace(OH_NativeBuffer *buffer, OH_NativeBuffer_C
|
||||
int32_t OH_NativeBuffer_GetColorSpace(OH_NativeBuffer *buffer, OH_NativeBuffer_ColorSpace *colorSpace);
|
||||
|
||||
/**
|
||||
* @brief Set the metadata type of the OH_NativeBuffer.
|
||||
* @brief Set the metadata type of the OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
@ -438,7 +455,8 @@ int32_t OH_NativeBuffer_SetMetadataValue(OH_NativeBuffer *buffer, OH_NativeBuffe
|
||||
int32_t size, uint8_t *metadata);
|
||||
|
||||
/**
|
||||
* @brief Set the metadata type of the OH_NativeBuffer.
|
||||
* @brief Set the metadata type of the OH_NativeBuffer.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
|
||||
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
|
||||
|
@ -79,6 +79,9 @@ typedef struct OH_OnFrameAvailableListener {
|
||||
|
||||
/**
|
||||
* @brief Create a <b>OH_NativeImage</b> related to an Opengl ES texture and target. \n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeImage_Destroy<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param textureId Indicates the id of the Opengl ES texture which the native image attached to.
|
||||
@ -91,7 +94,8 @@ typedef struct OH_OnFrameAvailableListener {
|
||||
OH_NativeImage* OH_NativeImage_Create(uint32_t textureId, uint32_t textureTarget);
|
||||
|
||||
/**
|
||||
* @brief Acquire the OHNativeWindow for the OH_NativeImage.
|
||||
* @brief Acquire the OHNativeWindow for the OH_NativeImage.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -103,7 +107,8 @@ OHNativeWindow* OH_NativeImage_AcquireNativeWindow(OH_NativeImage* image);
|
||||
|
||||
/**
|
||||
* @brief Attach the OH_NativeImage to Opengl ES context, and the Opengl ES texture is bound to the \n
|
||||
* GL_TEXTURE_EXTERNAL_OES, which will update by the OH_NativeImage.
|
||||
* GL_TEXTURE_EXTERNAL_OES, which will update by the OH_NativeImage.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -115,7 +120,8 @@ OHNativeWindow* OH_NativeImage_AcquireNativeWindow(OH_NativeImage* image);
|
||||
int32_t OH_NativeImage_AttachContext(OH_NativeImage* image, uint32_t textureId);
|
||||
|
||||
/**
|
||||
* @brief Detach the OH_NativeImage from the Opengl ES context.
|
||||
* @brief Detach the OH_NativeImage from the Opengl ES context.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -127,7 +133,10 @@ int32_t OH_NativeImage_AttachContext(OH_NativeImage* image, uint32_t textureId);
|
||||
int32_t OH_NativeImage_DetachContext(OH_NativeImage* image);
|
||||
|
||||
/**
|
||||
* @brief Update the related Opengl ES texture with the OH_NativeImage acquired buffer.
|
||||
* @brief Update the related Opengl ES texture with the OH_NativeImage acquired buffer.\n
|
||||
* This interface needs to be called in the Opengl ES context thread.\n
|
||||
* This interface needs to be called after receiving the <b>OH_OnFrameAvailableListener<\b> callback.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -138,7 +147,8 @@ int32_t OH_NativeImage_DetachContext(OH_NativeImage* image);
|
||||
int32_t OH_NativeImage_UpdateSurfaceImage(OH_NativeImage* image);
|
||||
|
||||
/**
|
||||
* @brief Get the timestamp of the texture image set by the most recent call to OH_NativeImage_UpdateSurfaceImage.
|
||||
* @brief Get the timestamp of the texture image set by the most recent call to OH_NativeImage_UpdateSurfaceImage.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -164,7 +174,8 @@ int64_t OH_NativeImage_GetTimestamp(OH_NativeImage* image);
|
||||
int32_t OH_NativeImage_GetTransformMatrix(OH_NativeImage* image, float matrix[16]);
|
||||
|
||||
/**
|
||||
* @brief Return the native image's surface id.
|
||||
* @brief Return the native image's surface id.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -176,7 +187,9 @@ int32_t OH_NativeImage_GetTransformMatrix(OH_NativeImage* image, float matrix[16
|
||||
int32_t OH_NativeImage_GetSurfaceId(OH_NativeImage* image, uint64_t* surfaceId);
|
||||
|
||||
/**
|
||||
* @brief Set the frame available callback.
|
||||
* @brief Set the frame available callback.\n
|
||||
* Not allow calling other interfaces in the callback function.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -188,7 +201,8 @@ int32_t OH_NativeImage_GetSurfaceId(OH_NativeImage* image, uint64_t* surfaceId);
|
||||
int32_t OH_NativeImage_SetOnFrameAvailableListener(OH_NativeImage* image, OH_OnFrameAvailableListener listener);
|
||||
|
||||
/**
|
||||
* @brief Unset the frame available callback.
|
||||
* @brief Unset the frame available callback.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -199,8 +213,9 @@ int32_t OH_NativeImage_SetOnFrameAvailableListener(OH_NativeImage* image, OH_OnF
|
||||
int32_t OH_NativeImage_UnsetOnFrameAvailableListener(OH_NativeImage* image);
|
||||
|
||||
/**
|
||||
* @brief Destroy the <b>OH_NativeImage</b> created by OH_NativeImage_Create, and the pointer to \n
|
||||
* <b>OH_NativeImage</b> will be null after this operation.
|
||||
* @brief Destroy the <b>OH_NativeImage</b> created by OH_NativeImage_Create, and the pointer to
|
||||
* <b>OH_NativeImage</b> will be null after this operation.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> pointer.
|
||||
@ -211,6 +226,8 @@ void OH_NativeImage_Destroy(OH_NativeImage** image);
|
||||
|
||||
/**
|
||||
* @brief Obtains the transform matrix of the texture image by producer transform type.\n
|
||||
* The matrix will not be update until <b>OH_NativeImage_UpdateSurfaceImage<\b> is called.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -233,6 +250,7 @@ int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeImage_ReleaseNativeWindowBuffer<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* When the fenceFd is used up, you need to close it.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -251,6 +269,7 @@ int32_t OH_NativeImage_AcquireNativeWindowBuffer(OH_NativeImage* image,
|
||||
* @brief Release the <b>OHNativeWindowBuffer</b> to the buffer queue through an
|
||||
* <b>OH_NativeImage</b> instance for reuse.\n
|
||||
* The fenceFd will be close by system.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
|
||||
@ -271,6 +290,8 @@ int32_t OH_NativeImage_ReleaseNativeWindowBuffer(OH_NativeImage* image,
|
||||
* This method can not be used at the same time with <b>OH_NativeImage_UpdateSurfaceImage</b>.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeImage_Destroy<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
|
||||
* @return Returns the pointer to the <b>OH_NativeImage</b> instance created if the operation is successful, \n
|
||||
* returns <b>NULL</b> otherwise.
|
||||
|
@ -399,7 +399,9 @@ typedef enum {
|
||||
OHNativeWindow* OH_NativeWindow_CreateNativeWindow(void* pSurface);
|
||||
|
||||
/**
|
||||
* @brief Decreases the reference count of a <b>OHNativeWindow</b> instance by 1, and when the reference count reaches 0, destroys the instance.
|
||||
* @brief Decreases the reference count of a <b>OHNativeWindow</b> instance by 1,
|
||||
* and when the reference count reaches 0, destroys the instance.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -422,8 +424,11 @@ void OH_NativeWindow_DestroyNativeWindow(OHNativeWindow* window);
|
||||
OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer(void* pSurfaceBuffer);
|
||||
|
||||
/**
|
||||
* @brief Creates a <b>OHNativeWindowBuffer</b> instance.
|
||||
A new <b>OHNativeWindowBuffer</b> instance is created each time this function is called.
|
||||
* @brief Creates a <b>OHNativeWindowBuffer</b> instance.\n
|
||||
* A new <b>OHNativeWindowBuffer</b> instance is created each time this function is called.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_DestroyNativeWindowBuffer<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param nativeBuffer Indicates the pointer to a native buffer. The type is <b>OH_NativeBuffer*</b>.
|
||||
@ -434,7 +439,9 @@ OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer(
|
||||
OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromNativeBuffer(OH_NativeBuffer* nativeBuffer);
|
||||
|
||||
/**
|
||||
* @brief Decreases the reference count of a <b>OHNativeWindowBuffer</b> instance by 1 and, when the reference count reaches 0, destroys the instance.
|
||||
* @brief Decreases the reference count of a <b>OHNativeWindowBuffer</b> instance by 1 and,
|
||||
* when the reference count reaches 0, destroys the instance.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param buffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -444,7 +451,13 @@ OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromNativeBuffer(O
|
||||
void OH_NativeWindow_DestroyNativeWindowBuffer(OHNativeWindowBuffer* buffer);
|
||||
|
||||
/**
|
||||
* @brief Requests a <b>OHNativeWindowBuffer</b> through a <b>OHNativeWindow</b> instance for content production.
|
||||
* @brief Requests a <b>OHNativeWindowBuffer</b> through a <b>OHNativeWindow</b> instance for content production.\n
|
||||
* Before calling this interface, you need to set the width and height of
|
||||
* <b>OHNativeWindow</b> through <b>SET_BUFFER_GEOMETRY</b>.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeWindowFlushBuffer<\b>,
|
||||
* otherwise buffer will be exhausted.\n
|
||||
* When the fenceFd is used up, you need to close it.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -458,7 +471,10 @@ int32_t OH_NativeWindow_NativeWindowRequestBuffer(OHNativeWindow *window,
|
||||
OHNativeWindowBuffer **buffer, int *fenceFd);
|
||||
|
||||
/**
|
||||
* @brief Flushes the <b>OHNativeWindowBuffer</b> filled with the content to the buffer queue through a <b>OHNativeWindow</b> instance for content consumption.
|
||||
* @brief Flushes the <b>OHNativeWindowBuffer</b> filled with the content to the buffer queue
|
||||
* through a <b>OHNativeWindow</b> instance for content consumption.\n
|
||||
* The fenceFd will be close by system.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -490,7 +506,9 @@ int32_t OH_NativeWindow_GetLastFlushedBuffer(OHNativeWindow *window, OHNativeWin
|
||||
int *fenceFd, float matrix[16]);
|
||||
|
||||
/**
|
||||
* @brief Returns the <b>OHNativeWindowBuffer</b> to the buffer queue through a <b>OHNativeWindow</b> instance, without filling in any content. The <b>OHNativeWindowBuffer</b> can be used for another request.
|
||||
* @brief Returns the <b>OHNativeWindowBuffer</b> to the buffer queue through a <b>OHNativeWindow</b> instance,
|
||||
* without filling in any content. The <b>OHNativeWindowBuffer</b> can be used for another request.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -502,7 +520,8 @@ int32_t OH_NativeWindow_GetLastFlushedBuffer(OHNativeWindow *window, OHNativeWin
|
||||
int32_t OH_NativeWindow_NativeWindowAbortBuffer(OHNativeWindow *window, OHNativeWindowBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Sets or obtains the attributes of a native window, including the width, height, and content format.
|
||||
* @brief Sets or obtains the attributes of a native window, including the width, height, and content format.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -515,7 +534,8 @@ int32_t OH_NativeWindow_NativeWindowAbortBuffer(OHNativeWindow *window, OHNative
|
||||
int32_t OH_NativeWindow_NativeWindowHandleOpt(OHNativeWindow *window, int code, ...);
|
||||
|
||||
/**
|
||||
* @brief Obtains the pointer to a <b>BufferHandle</b> of a <b>OHNativeWindowBuffer</b> instance.
|
||||
* @brief Obtains the pointer to a <b>BufferHandle</b> of a <b>OHNativeWindowBuffer</b> instance.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param buffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -526,7 +546,10 @@ int32_t OH_NativeWindow_NativeWindowHandleOpt(OHNativeWindow *window, int code,
|
||||
BufferHandle *OH_NativeWindow_GetBufferHandleFromNative(OHNativeWindowBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Adds the reference count of a native object.
|
||||
* @brief Adds the reference count of a native object.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeObjectUnreference<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -537,7 +560,9 @@ BufferHandle *OH_NativeWindow_GetBufferHandleFromNative(OHNativeWindowBuffer *bu
|
||||
int32_t OH_NativeWindow_NativeObjectReference(void *obj);
|
||||
|
||||
/**
|
||||
* @brief Decreases the reference count of a native object and, when the reference count reaches 0, destroys this object.
|
||||
* @brief Decreases the reference count of a native object and,
|
||||
* when the reference count reaches 0, destroys this object.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -548,7 +573,8 @@ int32_t OH_NativeWindow_NativeObjectReference(void *obj);
|
||||
int32_t OH_NativeWindow_NativeObjectUnreference(void *obj);
|
||||
|
||||
/**
|
||||
* @brief Obtains the magic ID of a native object.
|
||||
* @brief Obtains the magic ID of a native object.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
|
||||
@ -620,7 +646,10 @@ int32_t OH_NativeWindow_NativeWindowSetMetaDataSet(OHNativeWindow *window, uint3
|
||||
int32_t OH_NativeWindow_NativeWindowSetTunnelHandle(OHNativeWindow *window, const OHExtDataHandle *handle);
|
||||
|
||||
/**
|
||||
* @brief Attach a buffer to an <b>OHNativeWindow</b> instance.
|
||||
* @brief Attach a buffer to an <b>OHNativeWindow</b> instance.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeWindowDetachBuffer<\b>,
|
||||
* otherwise buffer management will be chaotic.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
@ -632,7 +661,8 @@ int32_t OH_NativeWindow_NativeWindowSetTunnelHandle(OHNativeWindow *window, cons
|
||||
int32_t OH_NativeWindow_NativeWindowAttachBuffer(OHNativeWindow *window, OHNativeWindowBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Detach a buffer from an <b>OHNativeWindow</b> instance.
|
||||
* @brief Detach a buffer from an <b>OHNativeWindow</b> instance.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
@ -644,7 +674,8 @@ int32_t OH_NativeWindow_NativeWindowAttachBuffer(OHNativeWindow *window, OHNativ
|
||||
int32_t OH_NativeWindow_NativeWindowDetachBuffer(OHNativeWindow *window, OHNativeWindowBuffer *buffer);
|
||||
|
||||
/**
|
||||
* @brief Get surfaceId from native window.
|
||||
* @brief Get surfaceId from native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
@ -657,6 +688,14 @@ int32_t OH_NativeWindow_GetSurfaceId(OHNativeWindow *window, uint64_t *surfaceId
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OHNativeWindow</b> instance.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_DestroyNativeWindow<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* If there is a concurrent destroy OHNativeWindow, you need to add once and decrement once to the
|
||||
* OHNativeWindow reference count through <b>OH_NativeWindow_NativeObjectReference<\b> and
|
||||
* <b>OH_NativeWindow_NativeObjectUnreference<\b>.\n
|
||||
* If the surface obtained through surfaceId is created in this process, the surface cannot be obtained
|
||||
* across processes.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param surfaceId Indicates the surfaceId to a surface.
|
||||
@ -668,7 +707,8 @@ int32_t OH_NativeWindow_GetSurfaceId(OHNativeWindow *window, uint64_t *surfaceId
|
||||
int32_t OH_NativeWindow_CreateNativeWindowFromSurfaceId(uint64_t surfaceId, OHNativeWindow **window);
|
||||
|
||||
/**
|
||||
* @brief Sets scalingMode of a native window.
|
||||
* @brief Sets scalingMode of a native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
@ -680,7 +720,8 @@ int32_t OH_NativeWindow_CreateNativeWindowFromSurfaceId(uint64_t surfaceId, OHNa
|
||||
int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHScalingModeV2 scalingMode);
|
||||
|
||||
/**
|
||||
* @brief Set native window buffer hold.
|
||||
* @brief Set native window buffer hold.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
@ -690,42 +731,48 @@ int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHS
|
||||
void OH_NativeWindow_SetBufferHold(OHNativeWindow *window);
|
||||
|
||||
/**
|
||||
* @brief Write an OHNativeWindow to an OHIPCParcel.
|
||||
* @brief Write an OHNativeWindow to an OHIPCParcel.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
* @param parcel Indicates the pointer to an <b>OHIPCParcel</b> instance.
|
||||
* @return 0 - Success.
|
||||
* 40001000 - parcel is NULL or window is NULL.
|
||||
* @return {@link NATIVE_ERROR_OK} 0 - Success.
|
||||
* {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - parcel is NULL or window is NULL.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_NativeWindow_WriteToParcel(OHNativeWindow *window, OHIPCParcel *parcel);
|
||||
|
||||
/**
|
||||
* @brief Read an OHNativeWindow from an OHIPCParcel.
|
||||
* @brief Read an OHNativeWindow from an OHIPCParcel.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param parcel Indicates the pointer to an <b>OHIPCParcel</b> instance.
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
* @return 0 - Success.
|
||||
* 40001000 - parcel is NULL or parcel does not contain the window.
|
||||
* @return {@link NATIVE_ERROR_OK} 0 - Success.
|
||||
* {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - parcel is NULL or parcel does not contain the window.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_NativeWindow_ReadFromParcel(OHIPCParcel *parcel, OHNativeWindow **window);
|
||||
|
||||
/**
|
||||
* @brief Get the last flushed <b>OHNativeWindowBuffer</b> from an <b>OHNativeWindow</b> instance.
|
||||
* @brief Get the last flushed <b>OHNativeWindowBuffer</b> from an <b>OHNativeWindow</b> instance.\n
|
||||
* When the fenceFd is used up, you need to close it.\n
|
||||
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeObjectUnreference<\b>,
|
||||
* otherwise memory leaks will occur.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
|
||||
* @param buffer Indicates the pointer to an <b>OHNativeWindowBuffer</b> pointer.
|
||||
* @param fenceFd Indicates the pointer to a file descriptor handle.
|
||||
* @param matrix Indicates the retrieved 4*4 transform matrix.
|
||||
* @return 0 - Success.
|
||||
* 40001000 - window is NULL or buffer is NULL or fenceFd is NULL.
|
||||
* 41207000 - buffer state is wrong.
|
||||
* @return {@link NATIVE_ERROR_OK} 0 - Success.
|
||||
* {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - window is NULL or buffer is NULL or fenceFd is NULL.
|
||||
* {@link NATIVE_ERROR_BUFFER_STATE_INVALID} 41207000 - buffer state is wrong.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
@ -733,7 +780,8 @@ int32_t OH_NativeWindow_ReadFromParcel(OHIPCParcel *parcel, OHNativeWindow **win
|
||||
int32_t OH_NativeWindow_GetLastFlushedBufferV2(OHNativeWindow *window, OHNativeWindowBuffer **buffer,
|
||||
int *fenceFd, float matrix[16]);
|
||||
/**
|
||||
* @brief Set the color space of the native window.
|
||||
* @brief Set the color space of the native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -747,7 +795,8 @@ int32_t OH_NativeWindow_GetLastFlushedBufferV2(OHNativeWindow *window, OHNativeW
|
||||
int32_t OH_NativeWindow_SetColorSpace(OHNativeWindow *window, OH_NativeBuffer_ColorSpace colorSpace);
|
||||
|
||||
/**
|
||||
* @brief Get the color space of the native window.
|
||||
* @brief Get the color space of the native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -761,7 +810,8 @@ int32_t OH_NativeWindow_SetColorSpace(OHNativeWindow *window, OH_NativeBuffer_Co
|
||||
int32_t OH_NativeWindow_GetColorSpace(OHNativeWindow *window, OH_NativeBuffer_ColorSpace *colorSpace);
|
||||
|
||||
/**
|
||||
* @brief Set the metadata type of the native window.
|
||||
* @brief Set the metadata type of the native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
@ -779,7 +829,8 @@ int32_t OH_NativeWindow_SetMetadataValue(OHNativeWindow *window, OH_NativeBuffer
|
||||
int32_t size, uint8_t *metadata);
|
||||
|
||||
/**
|
||||
* @brief Set the metadata type of the native window.
|
||||
* @brief Set the metadata type of the native window.\n
|
||||
* This interface dose not support concurrency.\n
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
|
||||
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
|
||||
|
Loading…
Reference in New Issue
Block a user