[cscore] Split cscore classes into separate headers

Fixes #3713.
This commit is contained in:
Peter Johnson
2026-01-04 16:59:02 -08:00
parent f08258f784
commit e9d226491c
77 changed files with 2977 additions and 2721 deletions

View File

@@ -0,0 +1,20 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#pragma once
/**
* Pixel formats
*/
enum WPI_PixelFormat {
WPI_PIXFMT_UNKNOWN = 0, // unknown
WPI_PIXFMT_MJPEG, // Motion-JPEG (compressed image data)
WPI_PIXFMT_YUYV, // YUV 4:2:2, 16 bpp
WPI_PIXFMT_RGB565, // RGB 5-6-5, 16 bpp
WPI_PIXFMT_BGR, // BGR 8-8-8, 24 bpp
WPI_PIXFMT_GRAY, // Grayscale, 8 bpp
WPI_PIXFMT_Y16, // Grayscale, 16 bpp
WPI_PIXFMT_UYVY, // YUV 4:2:2, 16 bpp
WPI_PIXFMT_BGRA, // BGRA 8-8-8-8-, 32 bpp
};

View File

@@ -0,0 +1,26 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#pragma once
#include "wpi/util/PixelFormat.h"
namespace wpi::util {
/**
* Pixel formats
*/
enum class PixelFormat {
kUnknown = WPI_PIXFMT_UNKNOWN,
kMJPEG = WPI_PIXFMT_MJPEG,
kYUYV = WPI_PIXFMT_YUYV,
kRGB565 = WPI_PIXFMT_RGB565,
kBGR = WPI_PIXFMT_BGR,
kGray = WPI_PIXFMT_GRAY,
kY16 = WPI_PIXFMT_Y16,
kUYVY = WPI_PIXFMT_UYVY,
kBGRA = WPI_PIXFMT_BGRA,
};
} // namespace wpi::util

View File

@@ -30,21 +30,6 @@ typedef struct WPI_RawFrame { // NOLINT
int timestampSrc; // WPI_TimestampSource
} WPI_RawFrame;
/**
* Pixel formats
*/
enum WPI_PixelFormat {
WPI_PIXFMT_UNKNOWN = 0, // unknown
WPI_PIXFMT_MJPEG, // Motion-JPEG (compressed image data)
WPI_PIXFMT_YUYV, // YUV 4:2:2, 16 bpp
WPI_PIXFMT_RGB565, // RGB 5-6-5, 16 bpp
WPI_PIXFMT_BGR, // BGR 8-8-8, 24 bpp
WPI_PIXFMT_GRAY, // Grayscale, 8 bpp
WPI_PIXFMT_Y16, // Grayscale, 16 bpp
WPI_PIXFMT_UYVY, // YUV 4:2:2, 16 bpp
WPI_PIXFMT_BGRA, // BGRA 8-8-8-8-, 32 bpp
};
/**
* Timestamp metadata. Timebase is the same as wpi::util::Now
*/

View File

@@ -4,6 +4,7 @@
#pragma once
#include "wpi/util/PixelFormat.h"
#include "wpi/util/RawFrame.h"
#ifdef WPI_RAWFRAME_JNI

View File

@@ -71,6 +71,7 @@ Color = "wpi/util/Color.hpp"
Color8Bit = "wpi/util/Color8Bit.hpp"
StackTrace = "wpi/util/StackTrace.hpp"
Synchronization = "wpi/util/Synchronization.hpp"
PixelFormat = "wpi/util/PixelFormat.hpp"
RawFrame_c = "wpi/util/RawFrame.h"
RawFrame = "wpi/util/RawFrame.hpp"

View File

@@ -0,0 +1,2 @@
enums:
PixelFormat: