Add lcameraBuff Stage 2 plugin with YUV attach and unit tests.
Introduce params parsing, pixel/format decisions, capture layout, shared YuvStimProducer per camera, and channel stimulus buffers with attach flow. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#ifndef LCAMERA_BUFF_INTERNAL_H
|
||||
#define LCAMERA_BUFF_INTERNAL_H
|
||||
|
||||
#include <lcameraDev.h>
|
||||
#include <memory>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <user/senseApiDesc.h>
|
||||
#include <vector>
|
||||
#include <spinscale/co/invokers.h>
|
||||
|
||||
namespace smo::stim_buff::lcamera_buff {
|
||||
|
||||
class YuvStimProducer;
|
||||
|
||||
struct LcameraDevDllState
|
||||
{
|
||||
struct DlCloser
|
||||
{
|
||||
void operator()(void *handle);
|
||||
};
|
||||
|
||||
LcameraDevDllState();
|
||||
|
||||
std::unique_ptr<void, DlCloser> dlopenHandle;
|
||||
lcameraDev_mainFn *lcameraDev_main;
|
||||
lcameraDev_exitFn *lcameraDev_exit;
|
||||
lcameraDev_getOrCreateDeviceCReqFn *lcameraDev_getOrCreateDeviceCReq;
|
||||
lcameraDev_releaseDeviceCReqFn *lcameraDev_releaseDeviceCReq;
|
||||
lcameraDev_configureSessionModeCReqFn *lcameraDev_configureSessionModeCReq;
|
||||
};
|
||||
|
||||
extern const SmoCallbacks *lcameraBuffSmoHooksPtr;
|
||||
extern SmoThreadingModelDesc lcameraBuffThreadingModelDesc;
|
||||
extern LcameraDevDllState lcameraDevDll;
|
||||
extern std::vector<std::shared_ptr<YuvStimProducer>> attachedStimulusProducers;
|
||||
|
||||
std::shared_ptr<YuvStimProducer> findStimProducerByCameraId(
|
||||
const std::string& resolvedCameraId);
|
||||
|
||||
bool validateAttachRequest(
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& spec);
|
||||
|
||||
sscl::co::ViralNonPostingInvoker<int> lcameraBuff_initializeCInd();
|
||||
sscl::co::ViralNonPostingInvoker<int> lcameraBuff_finalizeCInd();
|
||||
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
lcameraBuff_attachDeviceCReq(
|
||||
sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& desc,
|
||||
const std::shared_ptr<sscl::ComponentThread>& componentThread);
|
||||
|
||||
sscl::co::DynamicViralPostingInvoker<StimBuffDeviceOpResult>
|
||||
lcameraBuff_detachDeviceCReq(
|
||||
sscl::co::ExplicitPostTarget postTarget,
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& desc);
|
||||
|
||||
} // namespace smo::stim_buff::lcamera_buff
|
||||
|
||||
#endif // LCAMERA_BUFF_INTERNAL_H
|
||||
Reference in New Issue
Block a user