27 "yarp.carrier.gstreamer.gstreamerStream",
36 return open(pipeline_string, local, remote);
41 m_localAddress = local;
42 m_remoteAddress = remote;
50 ret = m_decoder->
init(pipeline_string);
73 if ((!m_closed) && (!m_interrupting))
76 m_interrupting =
true;
84 while (m_interrupting)
112 if (m_debug_test_image_generation)
134 if (m_debug_test_image_generation)
145 if (m_enum_phases == enum_phases::PHASE_0_GET_IMG)
148 m_enum_phases = enum_phases::PHASE_1_PREPARE_HEADER;
150 if (m_enum_phases == enum_phases::PHASE_1_PREPARE_HEADER)
153 m_enum_phases = enum_phases::PHASE_2_SEND_HEADER;
155 if (m_enum_phases == enum_phases::PHASE_2_SEND_HEADER)
159 if (m_remaining == 0)
162 m_cursor = (
char*)(&m_imgHeader);
163 m_remaining =
sizeof(m_imgHeader);
179 m_enum_phases = enum_phases::PHASE_3_SEND_IMAGE;
183 if (m_enum_phases == enum_phases::PHASE_3_SEND_IMAGE)
186 if (m_remaining == 0) {
188 m_cursor = (
char*)(m_pointer_last_frame->
getRawImage());
205 m_enum_phases = enum_phases::PHASE_0_GET_IMG;
207 return bytestobecopied;
const yarp::os::LogComponent & GSTREAMER_STREAM()
yarp::sig::ImageOf< yarp::sig::PixelRgb > * getLastFrame()
bool init(std::string pipeline_string)
void reset() override
Reset 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()
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).
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
A mini-server for performing network communication in the background.
A simple abstraction for a block of bytes.
static LogCallback printCallback()
Get current print callback.
static LogType minimumPrintLevel()
Get current minimum print level.
static void delaySystem(double seconds)
unsigned char * getRawImage() const
Access to the internal image buffer.
size_t getRawImageSize() const
Access to the internal buffer size information (this is how much memory has been allocated for the im...
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.