Class NativeImageQueue
Definition
- Assembly:
- Tizen.NUI.dll
NativeImageQueue is a class for displaying an image resource using queue.
public class NativeImageQueue : NativeImageInterface
- Inheritance
- Derived
-
Tizen.NUI.TbmQueueImageSourceTizen.NUI.TbmQueueImageSourceTizen.NUI.TbmQueueImageSource
Examples
NativeImageQueue queue = new NativeImageQueue(width,height,ColorFormat.RGBA8888);
if(queue.CanDequeueBuffer())
{
var buffer = queue.DequeueBuffer(ref bufferWidth,ref bufferHeight,ref bufferStride);
/* Use buffer */
queue.EnqueueBuffer(buffer);
}
Constructors
View SourceNativeImageQueue(uint, uint, uint, ColorFormat)
Creates an initialized NativeImageQueue with queue count and size and color format.
Declaration
public NativeImageQueue(uint queueCount, uint width, uint height, NativeImageQueue.ColorFormat colorFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | queueCount | The number of queue count. Use system default value if it is 0. |
| uint | width | A Width of queue. |
| uint | height | A Height of queue. |
| NativeImageQueue.ColorFormat | colorFormat | A color format of queue. |
Remarks
Since queueCount can increase the memory usage, we recommened queueCount value is less or equal than 3.
NativeImageQueue(uint, uint, ColorFormat)
Creates an initialized NativeImageQueue with size and color format.
Declaration
public NativeImageQueue(uint width, uint height, NativeImageQueue.ColorFormat colorFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | width | A Width of queue. |
| uint | height | A Height of queue. |
| NativeImageQueue.ColorFormat | colorFormat | A color format of queue. |
Methods
View SourceCanDequeueBuffer()
Checks if the buffer can be got from the queue.
Declaration
public bool CanDequeueBuffer()
Returns
| Type | Description |
|---|---|
| bool | True if the buffer can be got from the queue. |
DequeueBuffer(ref int, ref int, ref int)
Dequeue buffer from the queue.
Declaration
public IntPtr DequeueBuffer(ref int width, ref int height, ref int stride)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | A reference to the buffer's width. |
| int | height | A reference to the buffer's height. |
| int | stride | A reference to the buffer's stride. |
Returns
| Type | Description |
|---|---|
| IntPtr | A handle of buffer. |
EnqueueBuffer(IntPtr)
Enqueue buffer to the queue.
Declaration
public bool EnqueueBuffer(IntPtr buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | buffer | A Handle of buffer to be enqueued. |
Returns
| Type | Description |
|---|---|
| bool | True if success. |
GenerateUrl()
Generate Url from native image queue.
Declaration
public override ImageUrl GenerateUrl()
Returns
| Type | Description |
|---|---|
| ImageUrl | The ImageUrl of NativeImageQueue. |
Overrides
Remarks
This API should not be called at worker thread.
GetQueueCount()
The number of queue.
Declaration
public uint GetQueueCount()
Returns
| Type | Description |
|---|---|
| uint |
Remarks
Hidden API: Only for inhouse or developing usage. The behavior and interface can be changed anytime.
ReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
Examples
NativeImageQueue queue = new NativeImageQueue(width,height,ColorFormat.RGBA8888);
if(queue.CanDequeueBuffer())
{
var buffer = queue.DequeueBuffer(ref bufferWidth,ref bufferHeight,ref bufferStride);
/* Use buffer */
queue.EnqueueBuffer(buffer);
}