gstreamer
Loading...
Searching...
No Matches
gstreamerJLABSROFactory.h
Go to the documentation of this file.
1#pragma once
2
3// gstreamer
4#include "gstreamer.h"
6
7// c++
8#include <fstream>
9
15
16#pragma pack(push, 1)
26{
27 uint32_t source_id;
28 uint32_t total_length;
31 uint32_t magic;
33 uint32_t flags;
35 uint64_t ts_sec;
36 uint64_t ts_nsec;
37};
38#pragma pack(pop)
39
57{
58public:
61
62private:
68 bool openConnection() override;
69
75 bool closeConnectionImpl() override;
76
86 bool startStreamImpl(const GFrameDataCollection* frameRunData) override;
87
94 bool endStreamImpl(const GFrameDataCollection* frameRunData) override;
95
102 bool publishFrameHeaderImpl(const GFrameHeader* gframeHeader) override;
103
110 bool publishPayloadImpl(const std::vector<GIntegralPayload*>* payload) override;
111
120 static inline std::uint64_t llswap(unsigned long long val) { return (val >> 32) | (val << 32); }
121
122private:
124 std::ofstream* ofile = nullptr;
125
127 std::vector<unsigned int> frame_data{};
128
134 std::string filename() const override { return gstreamer_definitions.rootname + ".ev"; }
135};
virtual bool closeConnectionImpl()
Plugin-specific close implementation hook.
Definition gstreamer.h:127
GStreamer(const std::shared_ptr< GOptions > &g)
Construct the streamer base and initialize module logging.
Definition gstreamer.h:85
GStreamerDefinition gstreamer_definitions
Output definition currently bound to this streamer instance.
Definition gstreamer.h:207
virtual bool openConnection()
Open the output medium used by this streamer.
Definition gstreamer.h:104
JLAB SRO plugin producing packed binary frame streams in ".ev" files.
GStreamer(const std::shared_ptr< GOptions > &g)
Inherit the constructor taking the parsed options container.
Definition gstreamer.h:85
Shared constants and error codes for the gstreamer module.
Core streaming interface and helper utilities for the gstreamer module.
Packed binary frame header written ahead of each JLAB SRO payload.