6#ifndef YARP_GSTREAMERTREAM_H
7#define YARP_GSTREAMERTREAM_H
31 m_interrupting(false),
54 return m_localAddress;
59 return m_remoteAddress;
74 bool isOk()
const override;
82 void reset()
override;
89 bool m_closed, m_interrupting;
93 enum class enum_phases
96 PHASE_1_PREPARE_HEADER = 1,
97 PHASE_2_SEND_HEADER = 2,
98 PHASE_3_SEND_IMAGE = 3
99 } m_enum_phases = enum_phases::PHASE_0_GET_IMG;
101 bool m_debug_test_image_generation =
false;
107 char* m_cursor =
nullptr;
108 size_t m_remaining = 0;
void reset() override
Reset the stream.
void close() override
Terminate the stream.
void interrupt() override
Interrupt the stream.
void beginPacket() override
Mark the beginning of a logical packet.
yarp::sig::ImageOf< yarp::sig::PixelRgb > * getFrame()
bool isOk() const override
Check if the stream is ok or in an error state.
virtual ~GstreamerStream()
const yarp::os::Contact & getLocalAddress() const override
Get the address of the local side of the stream.
virtual bool open(const std::string &pipeline_string, const yarp::os::Contact &remote)
void endPacket() override
Mark the end of a logical packet (see beginPacket).
OutputStream & getOutputStream() override
Get an OutputStream to write to.
InputStream & getInputStream() override
Get an InputStream to read from.
const yarp::os::Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
A simple abstraction for a block of bytes.
Simple specification of the minimum functions needed from output streams.
virtual void write(char ch)
Write a single byte to the stream.
A class for thread synchronization and mutual exclusion.
A stream which can be asked to perform bidirectional communication.