25 }
else if (phase==3) {
40 if (s!=
"Content-Type: image/jpeg") {
64 }
while (s.length()>0);
75 cursor = (
char*)(&imgHeader);
76 remaining =
sizeof(imgHeader);
84 cursor = (
char*)(&blobHeader);
85 remaining =
sizeof(blobHeader);
90 int allow = remaining;
91 if ((
int)b.
length()<allow) {
94 if (cursor!=
nullptr) {
95 memcpy(b.
get(),cursor,allow);
const yarp::os::LogComponent & MJPEGCARRIER()
bool decompress(const yarp::os::Bytes &data, yarp::sig::FlexImage &image)
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
A simple collection of objects that can be described and transmitted in a portable way.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
A simple abstraction for a block of bytes.
const Bytes & bytes() const
void allocate(size_t len)
Makes a data block of the specified length that will be deleted if this object is destroyed.
virtual void write(char ch)
Write a single byte to the stream.
virtual InputStream & getInputStream()=0
Get an InputStream to read from.
virtual OutputStream & getOutputStream()=0
Get an OutputStream to write to.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual std::string asString() const
Get string value.
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...
#define yCError(component,...)
#define yCTrace(component,...)
#define yCWarning(component,...)
An interface to the operating system, including Port based communication.