Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
79b36fbb
Commit
79b36fbb
authored
Aug 31, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: move Doxygen for steam_Read() and stream_Peek()
parent
b85d67cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
29 deletions
+31
-29
include/vlc_stream.h
include/vlc_stream.h
+31
-0
src/input/stream.c
src/input/stream.c
+0
-29
No files found.
include/vlc_stream.h
View file @
79b36fbb
...
...
@@ -109,8 +109,39 @@ enum stream_query_e
STREAM_GET_PRIVATE_BLOCK
,
/**< arg1= block_t **b, arg2=bool *eof */
};
/**
* Reads data from a byte stream.
*
* This function always waits for the requested number of bytes, unless a fatal
* error is encountered or the end-of-stream is reached first.
*
* If the buffer is NULL, data is skipped instead of read. This is effectively
* a relative forward seek, but it works even on non-seekable streams.
*
* \param buf start of buffer to read data into [OUT]
* \param len number of bytes to read
* \return the number of bytes read or a negative value on error.
*/
VLC_API
ssize_t
stream_Read
(
stream_t
*
,
void
*
,
size_t
)
VLC_USED
;
/**
* Peeks at data from a byte stream.
*
* This function buffers for the requested number of bytes, waiting if
* necessary. Then it stores a pointer to the buffer. Unlike stream_Read()
* or stream_Block(), this function does not modify the stream read offset.
*
* \note
* The buffer remains valid until the next read/peek or seek operation on the
* same stream. In case of error, the buffer address is undefined.
*
* \param bufp storage space for the buffer address [OUT]
* \param len number of bytes to peek
* \return the number of bytes actually available (shorter than requested if
* the end-of-stream is reached), or a negative value on error.
*/
VLC_API
ssize_t
stream_Peek
(
stream_t
*
,
const
uint8_t
**
,
size_t
)
VLC_USED
;
VLC_API
int
stream_vaControl
(
stream_t
*
s
,
int
i_query
,
va_list
args
);
VLC_API
void
stream_Delete
(
stream_t
*
s
);
VLC_API
int
stream_Control
(
stream_t
*
s
,
int
i_query
,
...
);
...
...
src/input/stream.c
View file @
79b36fbb
...
...
@@ -338,19 +338,6 @@ static ssize_t stream_ReadRaw(stream_t *s, void *buf, size_t len)
return
(
copy
>
0
)
?
(
ssize_t
)
copy
:
ret
;
}
/**
* Reads data from a byte stream.
*
* This function always waits for the requested number of bytes, unless a fatal
* error is encountered or the end-of-stream is reached first.
*
* If the buffer is NULL, data is skipped instead of read. This is effectively
* a relative forward seek, but it works even on non-seekable streams.
*
* \param buf start of buffer to read data into [OUT]
* \param len number of bytes to read
* \return the number of bytes read or a negative value on error.
*/
ssize_t
stream_Read
(
stream_t
*
s
,
void
*
buf
,
size_t
len
)
{
stream_priv_t
*
priv
=
(
stream_priv_t
*
)
s
;
...
...
@@ -387,22 +374,6 @@ ssize_t stream_Read(stream_t *s, void *buf, size_t len)
:
((
copy
>
0
)
?
(
ssize_t
)
copy
:
ret
);
}
/**
* Peeks at data from a byte stream.
*
* This function buffers for the requested number of bytes, waiting if
* necessary. Then it stores a pointer to the buffer. Unlike stream_Read()
* or stream_Block(), this function does not modify the stream read offset.
*
* \note
* The buffer remains valid until the next read/peek or seek operation on the
* same stream. In case of error, the buffer address is undefined.
*
* \param bufp storage space for the buffer address [OUT]
* \param len number of bytes to peek
* \return the number of bytes actually available (shorter than requested if
* the end-of-stream is reached), or a negative value on error.
*/
ssize_t
stream_Peek
(
stream_t
*
s
,
const
uint8_t
**
restrict
bufp
,
size_t
len
)
{
stream_priv_t
*
priv
=
(
stream_priv_t
*
)
s
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment