7 #ifndef __WVENCODERSTREAM_H
8 #define __WVENCODERSTREAM_H
11 #include "wvstreamclone.h"
12 #include "wvencoder.h"
144 virtual bool isok()
const;
146 virtual size_t uread(
void *buf,
size_t size);
147 virtual size_t uwrite(
const void *buf,
size_t size);
155 void checkreadisok();
156 void checkwriteisok();
159 void pull(
size_t size);
162 bool push(
bool flush,
bool finish);
165 const char *wstype()
const {
return "WvEncoderStream"; }
168 #endif // __WVENCODERSTREAM_H
virtual size_t uwrite(const void *buf, size_t size)
unbuffered I/O functions; these ignore the buffer, which is handled by write().
bool post_select(SelectInfo &si)
post_select() is called after ::select(), and returns true if this object is now ready.
WvEncoderStream chains a series of encoders on the input and output ports of the underlying stream to...
bool flush_write()
Flushes the write chain through to the stream's output buffer.
WvEncoderChain writechain
Encoder chain through which output data is passed.
WvEncoderStream(WvStream *cloned)
Creates an encoder stream.
virtual bool flush(time_t msec_timeout)
flush the output buffer, if we can do it without delaying more than msec_timeout milliseconds at a ti...
virtual bool isok() const
Defines isok() semantics for encoders.
bool finish_read()
Calls flush() then finish() on the read chain of encoders.
virtual size_t uread(void *buf, size_t size)
unbuffered I/O functions; these ignore the buffer, which is handled by read().
size_t min_readsize
Controls the minimum number of unencoded bytes the encoder should try to read at once from the underl...
the data structure used by pre_select()/post_select() and internally by select().
WvStreamClone simply forwards all requests to the "cloned" stream.
virtual bool flush_internal(time_t msec_timeout)
WvStream overrides.
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
bool flush_read()
Flushes the read chain through to the stream's input buffer.
virtual void close()
Safely shuts down the stream.
An encoder chain owns a list of encoders that are used in sequence to transform data from a source bu...
bool finish_write()
Calls flush() then finish() on the write chain of encoders.
WvEncoderChain readchain
Encoder chain through which input data is passed.
void pre_select(SelectInfo &si)
pre_select() sets up for eventually calling ::select().