HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rtcore_buffer.h
Go to the documentation of this file.
1 // Copyright 2009-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include "rtcore_device.h"
7 
9 
10 /* Types of buffers */
12 {
19 
21 
29 
31 };
32 
33 /* Opaque buffer type */
34 typedef struct RTCBufferTy* RTCBuffer;
35 
36 /* Creates a new buffer. */
37 RTC_API RTCBuffer rtcNewBuffer(RTCDevice device, size_t byteSize);
38 
39 /* Creates a new shared buffer. */
40 RTC_API RTCBuffer rtcNewSharedBuffer(RTCDevice device, void* ptr, size_t byteSize);
41 
42 /* Returns a pointer to the buffer data. */
44 
45 /* Retains the buffer (increments the reference count). */
47 
48 /* Releases the buffer (decrements the reference count). */
50 
RTC_API void rtcRetainBuffer(RTCBuffer buffer)
#define RTC_API
Definition: rtcore_config.h:55
typedefRTC_NAMESPACE_BEGIN struct RTCDeviceTy * RTCDevice
Definition: rtcore_device.h:11
RTC_API void rtcReleaseBuffer(RTCBuffer buffer)
RTC_API RTCBuffer rtcNewBuffer(RTCDevice device, size_t byteSize)
Definition: core.h:760
RTC_API void * rtcGetBufferData(RTCBuffer buffer)
#define RTC_NAMESPACE_END
Definition: rtcore_config.h:23
auto ptr(T p) -> const void *
Definition: format.h:2448
RTC_API RTCBuffer rtcNewSharedBuffer(RTCDevice device, void *ptr, size_t byteSize)
struct RTCBufferTy * RTCBuffer
Definition: rtcore_buffer.h:34
#define RTC_NAMESPACE_BEGIN
Definition: rtcore_config.h:22
RTCBufferType
Definition: rtcore_buffer.h:11