mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[cscore] Use frame time in Linux UsbCameraImpl (#7609)
This commit is contained in:
@@ -426,6 +426,24 @@ Java_edu_wpi_first_util_WPIUtilJNI_setRawFrameData
|
||||
f->pixelFormat = pixelFormat;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_util_WPIUtilJNI
|
||||
* Method: setRawFrameTime
|
||||
* Signature: (JJI)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_util_WPIUtilJNI_setRawFrameTime
|
||||
(JNIEnv* env, jclass, jlong frame, jlong time, jint timeSource)
|
||||
{
|
||||
auto* f = reinterpret_cast<wpi::RawFrame*>(frame);
|
||||
if (!f) {
|
||||
wpi::ThrowNullPointerException(env, "frame is null");
|
||||
return;
|
||||
}
|
||||
f->timestamp = time;
|
||||
f->timestampSrc = timeSource;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_util_WPIUtilJNI
|
||||
* Method: setRawFrameInfo
|
||||
|
||||
Reference in New Issue
Block a user