WPILibC++ 2024.1.1-beta-4
RawFrame.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#ifndef WPIUTIL_WPI_RAWFRAME_H_
6#define WPIUTIL_WPI_RAWFRAME_H_
7
8/**
9 * Raw Frame
10 */
11typedef struct WPI_RawFrame { // NOLINT
12 char* data;
15 int width;
16 int height;
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/**
25 * Pixel formats
26 */
36};
37
38void WPI_AllocateRawFrameData(WPI_RawFrame* frame, int requestedSize);
40
41#ifdef __cplusplus
42} // extern "C"
43#endif
44
45#ifdef __cplusplus
46namespace wpi {
47struct RawFrame : public WPI_RawFrame {
49 data = nullptr;
50 dataLength = 0;
52 width = 0;
53 height = 0;
54 totalData = 0;
55 }
56
58};
59} // namespace wpi
60
61#endif
62
63#endif // WPIUTIL_WPI_RAWFRAME_H_
WPI_PixelFormat
Pixel formats.
Definition: RawFrame.h:27
@ WPI_PIXFMT_YUYV
Definition: RawFrame.h:30
@ WPI_PIXFMT_Y16
Definition: RawFrame.h:34
@ WPI_PIXFMT_UYVY
Definition: RawFrame.h:35
@ WPI_PIXFMT_MJPEG
Definition: RawFrame.h:29
@ WPI_PIXFMT_GRAY
Definition: RawFrame.h:33
@ WPI_PIXFMT_RGB565
Definition: RawFrame.h:31
@ WPI_PIXFMT_BGR
Definition: RawFrame.h:32
@ WPI_PIXFMT_UNKNOWN
Definition: RawFrame.h:28
void WPI_AllocateRawFrameData(WPI_RawFrame *frame, int requestedSize)
void WPI_FreeRawFrameData(WPI_RawFrame *frame)
struct WPI_RawFrame WPI_RawFrame
Raw Frame.
Definition: ntcore_cpp.h:26
Raw Frame.
Definition: RawFrame.h:11
int pixelFormat
Definition: RawFrame.h:14
char * data
Definition: RawFrame.h:12
int totalData
Definition: RawFrame.h:17
int height
Definition: RawFrame.h:16
int width
Definition: RawFrame.h:15
int dataLength
Definition: RawFrame.h:13
Definition: RawFrame.h:47
RawFrame()
Definition: RawFrame.h:48
~RawFrame()
Definition: RawFrame.h:57