OpenMAX Bellagio 0.9.3
queue.h File Reference
#include <pthread.h>

Go to the source code of this file.

Data Structures

struct  qelem_t
struct  queue_t

Macros

#define MAX_QUEUE_ELEMENTS   10

Typedefs

typedef struct qelem_t qelem_t
typedef struct queue_t queue_t

Functions

int queue_init (queue_t *queue)
void queue_deinit (queue_t *queue)
int queue (queue_t *queue, void *data)
void * dequeue (queue_t *queue)
int getquenelem (queue_t *queue)

Macro Definition Documentation

◆ MAX_QUEUE_ELEMENTS

#define MAX_QUEUE_ELEMENTS   10

src/queue.h

Implements a simple FIFO structure used for queueing OMX buffers.

Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Maximum number of elements in a queue

Definition at line 32 of file queue.h.

Referenced by queue_deinit(), and queue_init().

Typedef Documentation

◆ qelem_t

typedef struct qelem_t qelem_t

Output port queue element. Contains an OMX buffer header type

Definition at line 35 of file queue.h.

◆ queue_t

typedef struct queue_t queue_t

This structure contains the queue

Function Documentation

◆ dequeue()

◆ getquenelem()

int getquenelem ( queue_t * queue)

Returns the number of elements hold in the queue

Parameters
queuethe requested queue
Returns
the number of elements in the queue

Definition at line 143 of file queue.c.

References queue().

◆ queue()

int queue ( queue_t * queue,
void * data )

Enqueue an element to the given queue descriptor

Parameters
queuethe queue descritpor where to queue data
datathe data to be enqueued
Returns
-1 if the queue is full

Enqueue an element to the given queue descriptor

Parameters
queuethe queue descriptor where to queue data
datathe data to be enqueued
Returns
-1 if the queue is full

Definition at line 103 of file queue.c.

References queue().

Referenced by base_clock_port_SendBufferFunction(), base_port_AllocateTunnelBuffer(), base_port_FlushProcessingBuffers(), base_port_ReturnBufferFunction(), base_port_SendBufferFunction(), clocksrc_port_FlushProcessingBuffers(), dequeue(), getquenelem(), omx_base_component_SendCommand(), omx_video_scheduler_component_port_FlushProcessingBuffers(), omx_video_scheduler_component_port_SendBufferFunction(), queue(), queue_deinit(), and queue_init().

◆ queue_deinit()

void queue_deinit ( queue_t * queue)

Deinitialize a queue descriptor flushing all of its internal data

Parameters
queuethe queue descriptor to dump

Definition at line 77 of file queue.c.

References MAX_QUEUE_ELEMENTS, qelem_t::q_forw, and queue().

Referenced by base_constructor_remove_garbage_collected(), base_port_Destructor(), and omx_base_component_Destructor().

◆ queue_init()

int queue_init ( queue_t * queue)

Initialize a queue descriptor

Parameters
queueThe queue descriptor to initialize. The user needs to allocate the queue
Returns
-1 if the resources are not enough and the allocation cannot be performed

src/queue.c

Implements a simple FIFO structure used for queueing OMX buffers.

Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Initialize a queue descriptor

Parameters
queueThe queue descriptor to initialize. The user needs to allocate the queue

Definition at line 38 of file queue.c.

References MAX_QUEUE_ELEMENTS, qelem_t::q_forw, and queue().

Referenced by base_port_Constructor(), and omx_base_component_Constructor().


Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo