add GStreamer

This commit is contained in:
Maik Jurischka
2025-12-12 11:43:15 +01:00
parent fe0af4dc64
commit 212a9ec64c
9 changed files with 606 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <vizionsdk/VizionSDK.h>
#include "StreamingEngine.h"
#include <memory>
#include <string>
#include <mutex>
@@ -12,6 +13,9 @@ public:
// Process JSON command and return JSON response
std::string processCommand(const std::string& jsonCommand);
// Get streaming engine for external control
std::shared_ptr<StreamingEngine> getStreamingEngine() { return streamingEngine_; }
private:
// Command handlers
std::string handleSetFormat(const std::string& width, const std::string& height,
@@ -28,6 +32,7 @@ private:
std::string handleGetStatus();
std::string handleStartStream();
std::string handleStopStream();
std::string handleSetPipeline(const std::string& pipeline);
// Helper functions
VX_IMAGE_FORMAT stringToFormat(const std::string& format);
@@ -36,6 +41,7 @@ private:
std::string createSuccessResponse(const std::string& message = "");
std::shared_ptr<VxCamera> camera_;
std::shared_ptr<StreamingEngine> streamingEngine_;
std::mutex mutex_;
bool streaming_;
std::string gstPipeline_;
};