YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
H264Stream.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef H264STREAM_INC
7#define H264STREAM_INC
8
10#include <yarp/sig/Image.h>
12#include "H264Decoder.h"
13#include <yarp/os/InputStream.h>
14
15
18{
19private:
20
21 DgramTwoWayStream *delegate;
24 int phase;
25 char *cursor;
26 size_t remaining;
27 H264Decoder *decoder;
29public:
31
32 virtual ~H264Stream();
33
35
36 void start();
37
38 InputStream& getInputStream() override;
39 OutputStream& getOutputStream() override;
40
42 void write(const yarp::os::Bytes& b) override;
43
46
47 bool setReadEnvelopeCallback(InputStream::readEnvelopeCallbackType callback, void* data) override;
48
49};
50
51#endif
OutputStream & getOutputStream() override
Get an OutputStream to write to.
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
virtual ~H264Stream()
void start()
bool setReadEnvelopeCallback(InputStream::readEnvelopeCallbackType callback, void *data) override
InputStream & getInputStream() override
Get an InputStream to read from.
bool setStream(yarp::os::impl::DgramTwoWayStream *stream)
A simple abstraction for a block of bytes.
Definition Bytes.h:24
virtual int read()
Read and return a single byte.
InputStream()
Constructor.
virtual void write(char ch)
Write a single byte to the stream.
A stream abstraction for datagram communication.
Byte order in image header for network transmission.
Typed image class.
Definition Image.h:616
::ssize_t ssize_t
Definition numeric.h:86