encoder/Interface: update API docs
This commit is contained in:
parent
eb7d321cb8
commit
0d09f307b2
@ -41,11 +41,10 @@ public:
|
||||
/**
|
||||
* Ends the stream: flushes the encoder object, generate an
|
||||
* end-of-stream marker (if applicable), make everything which
|
||||
* might currently be buffered available by encoder_read().
|
||||
* might currently be buffered available by Read().
|
||||
*
|
||||
* After this function has been called, the encoder may not be
|
||||
* usable for more data, and only Read() and Close() can be
|
||||
* called.
|
||||
* usable for more data, and only Read() can be called.
|
||||
*
|
||||
* Throws on error.
|
||||
*/
|
||||
@ -75,7 +74,7 @@ public:
|
||||
* Sends a tag to the encoder.
|
||||
*
|
||||
* Instructions: call PreTag(); then obtain flushed data with
|
||||
* Read(); finally call Tag().
|
||||
* Read(); finally call Tag() and again Read().
|
||||
*
|
||||
* Throws on error.
|
||||
*
|
||||
@ -97,12 +96,13 @@ public:
|
||||
/**
|
||||
* Reads encoded data from the encoder.
|
||||
*
|
||||
* Call this repeatedly until no more data is returned.
|
||||
* Call this repeatedly after End(), Flush(), PreTag(), SendTag() and
|
||||
* Write() until no more data is returned.
|
||||
*
|
||||
* @param buffer a buffer that can be used to write data into
|
||||
*
|
||||
* @return the portion of the buffer that was filled (but may
|
||||
* also point to a different buffer, e.g. one owned by this object)
|
||||
* also point to a different buffer, e.g. one owned by this object)
|
||||
*/
|
||||
virtual std::span<const std::byte> Read(std::span<std::byte> buffer) noexcept = 0;
|
||||
};
|
||||
@ -112,13 +112,11 @@ public:
|
||||
virtual ~PreparedEncoder() noexcept = default;
|
||||
|
||||
/**
|
||||
* Opens the object. You must call this prior to using it.
|
||||
* Before you free it, you must call Close(). You may open
|
||||
* and close (reuse) one encoder any number of times.
|
||||
* Create an #Encoder instance.
|
||||
*
|
||||
* After this function returns successfully and before the
|
||||
* first encoder_write() call, you should invoke
|
||||
* encoder_read() to obtain the file header.
|
||||
* first Encoder::Write() call, you should invoke
|
||||
* Encoder::Read() to obtain the file header.
|
||||
*
|
||||
* Throws on error.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user