re-organize folder structure
This commit is contained in:
43
include/vizionstreamer/StreamingEngine.h
Normal file
43
include/vizionstreamer/StreamingEngine.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* VizionStreamer - Streaming Engine Interface
|
||||
* Copyright (c) 2025 Maik Jurischka
|
||||
*
|
||||
* Licensed under CC BY-NC-SA 4.0
|
||||
* https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vizionsdk/VizionSDK.h>
|
||||
#include "vizionstreamer/GStreamerPipeline.h"
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
||||
class StreamingEngine {
|
||||
public:
|
||||
explicit StreamingEngine(std::shared_ptr<VxCamera> camera);
|
||||
~StreamingEngine();
|
||||
|
||||
bool start(const std::string& gstPipeline);
|
||||
void stop();
|
||||
[[nodiscard]] bool isRunning() const { return running_; }
|
||||
|
||||
void setFormat(const VxFormat& format);
|
||||
[[nodiscard]] VxFormat getCurrentFormat() const { return currentFormat_; }
|
||||
|
||||
void setPipelineDescription(const std::string& pipeline);
|
||||
|
||||
private:
|
||||
void acquisitionLoop();
|
||||
|
||||
std::shared_ptr<VxCamera> camera_;
|
||||
std::unique_ptr<GStreamerPipeline> gstPipeline_;
|
||||
std::unique_ptr<std::thread> acquisitionThread_;
|
||||
std::atomic<bool> running_;
|
||||
std::mutex mutex_;
|
||||
VxFormat currentFormat_;
|
||||
std::unique_ptr<uint8_t[]> buffer_;
|
||||
size_t bufferSize_;
|
||||
};
|
||||
Reference in New Issue
Block a user