Files
libv4l2_nvargus/libv4l2_nvargus/inc/nvargusv4l2_nvqueue.h
svcmobrel-release 4bd55365ec Updating prebuilts and/or headers
8e62a0e398b15aa8ea7ad8b63a8e55a2d34c22d4 - libv4l2_nvargus/libv4l2_nvargus.cpp
08591e4e7c932d134ab3b5de5608f79817f25b10 - libv4l2_nvargus/Makefile
e5896289dc5cf1a1be97cd111bef4715314a657d - libv4l2_nvargus/README
c074d3137499a5c6cc4441dc5ae519bc97bf6b0e - libv4l2_nvargus/nvargusv4l2_argus.cpp
592bab81439af0cb17984e0b0e1d1b4b1a498ea2 - libv4l2_nvargus/nvargusv4l2_nvqueue.cpp
62ff489fd24d7e62098d8bd0b681f017a3f1ed89 - libv4l2_nvargus/nvargusv4l2_os.cpp
1a6b614bf258c08fff0dd94d908650494ac7c3f5 - libv4l2_nvargus/LICENSE.libv4l2_nvargus
2a8f761ddbd0acd63d41333cfd33c0130a68f986 - libv4l2_nvargus/nvargusv4l2.cpp
d093942b319f8c8bbd51a2a8ed28ad2633554540 - libv4l2_nvargus/nvargusv4l2_context.cpp
138a72695eb516d82dba17bf87260fe5a692ec74 - libv4l2_nvargus/nvargusv4l2_ioctl.cpp
1522ea0088250fb7ce0c9f77c75dbca5d0f511f4 - libv4l2_nvargus/inc/nvargusv4l2.h
25353aa29a931dfc9f52054852b50d690716a64c - libv4l2_nvargus/inc/nvargusv4l2_nvqueue.h
e0025b2f87abda4cd744e356e26cef85246a1fdc - libv4l2_nvargus/inc/nvargusv4l2_os.h
d1c5f6e8cd188bbd39c99c32d4e4e68ee85e0f8b - libv4l2_nvargus/inc/nvargusv4l2_argus.h
ebcc91d051727ba390d71db0887f788ffcfd8091 - libv4l2_nvargus/inc/nvargusv4l2_ioctl.h
e5746299bc1597bb8442e5e7297628d51484cb3e - libv4l2_nvargus/inc/nvargusv4l2_context.h

Change-Id: Ibae2722cb197e3469ec743e061fffd945ac08fd7
2025-08-25 10:24:10 -07:00

55 lines
2.1 KiB
C

/*
* Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __ARGUSV4L2_NVQUEUE_H__
#define __ARGUSV4L2_NVQUEUE_H__
#include <stdlib.h>
#include "nvargusv4l2_os.h"
typedef struct NvQueueRec
{
NvMutexHandle mutexLock; /* mutex lock for queue */
u_int32_t maxEntries; /* maximum number of allowed entries */
u_int32_t entrySize; /* size of individual entry */
u_int32_t pushIndex; /* index of where to push entry */
u_int32_t popIndex; /* index of where to grab entry */
u_int8_t *pEntryList; /* pointer to beginning entry */
} NvQueue;
typedef struct NvQueueRec *NvQueueHandle;
int32_t NvQueueCreate(NvQueueHandle *phQueue, u_int32_t maxEntries, u_int32_t entrySize);
int32_t NvQueueEnQ(NvQueueHandle hQueue, void *pElem);
int32_t NvQueueDeQ(NvQueueHandle hQueue, void *pElem);
int32_t NvQueuePeek(NvQueueHandle hQueue, void *pElem);
int32_t NvQueuePeekEntry(NvQueueHandle hQueue, void *pElem, u_int32_t entry);
void NvQueueDestroy(NvQueueHandle *phQueue);
u_int32_t NvQueueGetNumEntries(NvQueueHandle hQueue);
#endif /* __ARGUSV4L2_NVQUEUE_H__ */