Use this reference to identify which APIs to call, when to use them, and why. For full signatures, overloads, enums, and members, follow the Doxygen links.
System
, Server
, Pipeline
, ports, PTP sync, global logging.Plugin::TaskWorker
, plugin ports/params.ESdkProException
, ErrorCode
, LogLevel
, version constants.
System
.Server
.Camera
s; set parameters.Pipeline
of Task
s (and plugins).
Doxygen entry point: class index (link → annotated.html
).
Manages systems, servers, pipelines, and synchronization between components. Also provides basic configuration and logging utilities.
SetPtpSyncMode(bool enable)
, which aligns timestamps across multiple servers and cameras.Off
, Error
, Warning
, Info
, Debug
).System
method; call it early in program initialization.
System
instance per process.SetLogLevel()
before initialization to ensure consistent verbosity across logs.
System sys = System::Create();
Server srv = sys.ConnectServer("127.0.0.1");
auto infos = srv.DiscoverCameras();
Camera cam = srv.AddCamera(infos.front());
Pipeline pipe = sys.GetPipeline();
CameraTask camTask = pipe.CreateCameraTask(cam);
RawSavingTask rawTask = pipe.CreateRawSavingTask(srv, "/data/out");
pipe.ConnectTasks(camTask.GetOutput(), rawTask.GetInput());
SetLogLevel(LogLevel::Info);
pipe.SetPtpSyncMode(true);
pipe.Start();
// ...
pipe.Stop();
Controls camera lifecycle and typed parameters for exposure, gain, and other adjustable values.
classeSdkPro_1_1Camera.html
)
GetRange()
to validate values.
auto exp = cam.GetParameter<UInt32CameraParam>("Exposure"); // µs
auto [minExp, maxExp, step] = exp.GetRange();
uint32_t desired = 5000;
uint32_t clamped = std::max(minExp, std::min(maxExp, desired - (desired % std::max(step, 1u))));
exp.SetValue(clamped);
cam.StartStreaming();
// ...
cam.StopStreaming();
Builds a graph of tasks that process frames through the pipeline. Supports zero-copy FlexTrans connectors on Linux.
CameraTask
, NvencTask
, RawSavingTask
) (link → task pages)classeSdkPro_1_1Frame.html
)classeSdkPro_1_1Pipeline.html
)
CameraTask camTask = pipe.CreateCameraTask(cam);
NvencTask encTask = pipe.CreateNvencTask(srv /*, codec/bitrate/etc. */);
RawSavingTask rawTask = pipe.CreateRawSavingTask(srv, "/data/out");
pipe.ConnectTasks(camTask.GetOutput(), encTask.GetInput());
pipe.ConnectTasks(camTask.GetOutput(), rawTask.GetInput());
// Linux zero-copy variants:
// pipe.ConnectTasksFlexTrans(camTask.GetOutput(), encTask.GetInput());
// pipe.ConnectTasksFlexTrans(camTask.GetOutput(), "192.168.10.11", rawTask.GetInput(), "192.168.10.12");
pipe.Start();
// ...
pipe.Stop();
Enables custom processing through user-defined plugins. Implement a Plugin::TaskWorker
, define ports, and expose optional parameters.
classeSdkPro_1_1Plugin_1_1TaskWorker.html
)
Process()
non-blocking and fast.HWPlatform
between tasks to avoid unnecessary copies.
class CustomTask : public Plugin::TaskWorker {
public:
static inline const std::string c_name{"CustomTask"};
static inline const std::string c_in{"InputFrame"};
static inline const std::string c_out{"OutputFrame"};
CustomTask() {
SetName(c_name);
in_ = CreateFrameInput(c_in, HWPlatform::Host);
out_ = CreateFrameOutput(c_out, HWPlatform::Host);
}
bool Process() override {
auto frame = in_.GetFrame();
if (!frame.IsValid()) return false;
// ... processing ...
out_.Push(frame);
return true;
}
private:
Plugin::FrameInput in_{};
Plugin::FrameOutput out_{};
};
Provides diagnostics, exceptions, logging, and version information.
GetErrorCode()
.Success
, General
, NotFound
, Invalid
.Off
, Error
, Warning
, Info
, Debug
.c_eSdkProVersionStr = "1.3.0"
c_eSdkProVersionMajor = 1
c_eSdkProVersionMinor = 3
SetLogLevel()
early in main()
.ESdkProException
at critical boundaries.c_eSdkProVersionStr
in support logs to match builds.
SetLogLevel(LogLevel::Info);
try {
System sys = System::Create();
sys.GetPipeline().Start();
// ...
sys.GetPipeline().Stop();
} catch (const ESdkProException& ex) {
auto code = ex.GetErrorCode(); // ErrorCode::{Success,General,NotFound,Invalid}
// log/report
}