stream: clarify seeking documentation

This commit is contained in:
Rémi Denis-Courmont 2017-11-30 18:30:23 +02:00
parent 4262e27660
commit ad303c60a7
1 changed files with 10 additions and 0 deletions

View File

@ -238,6 +238,11 @@ VLC_API block_t *vlc_stream_ReadBlock(stream_t *) VLC_USED;
/**
* Tells the current stream position.
*
* This function tells the current read offset (in bytes) from the start of
* the start of the stream.
* @note The read offset may be larger than the stream size, either because of
* a seek past the end, or because the stream shrank asynchronously.
*
* @return the byte offset from the beginning of the stream (cannot fail)
*/
VLC_API uint64_t vlc_stream_Tell(const stream_t *) VLC_USED;
@ -267,6 +272,11 @@ VLC_API bool vlc_stream_Eof(const stream_t *) VLC_USED;
/**
* Sets the current stream position.
*
* This function changes the read offset within a stream, if the stream
* supports seeking. In case of error, the read offset is not changed.
*
* @note It is possible (but not useful) to seek past the end of a stream.
*
* @param offset byte offset from the beginning of the stream
* @return zero on success, a negative value on error
*/