Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4fe272a7
Commit
4fe272a7
authored
Jul 12, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DecoderBuffer: add method _available()
parent
a7d9f248
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
DecoderBuffer.cxx
src/DecoderBuffer.cxx
+6
-0
DecoderBuffer.hxx
src/DecoderBuffer.hxx
+7
-0
No files found.
src/DecoderBuffer.cxx
View file @
4fe272a7
...
@@ -130,6 +130,12 @@ decoder_buffer_fill(DecoderBuffer *buffer)
...
@@ -130,6 +130,12 @@ decoder_buffer_fill(DecoderBuffer *buffer)
return
true
;
return
true
;
}
}
size_t
decoder_buffer_available
(
const
DecoderBuffer
*
buffer
)
{
return
buffer
->
length
-
buffer
->
consumed
;;
}
const
void
*
const
void
*
decoder_buffer_read
(
const
DecoderBuffer
*
buffer
,
size_t
*
length_r
)
decoder_buffer_read
(
const
DecoderBuffer
*
buffer
,
size_t
*
length_r
)
{
{
...
...
src/DecoderBuffer.hxx
View file @
4fe272a7
...
@@ -78,6 +78,13 @@ bool
...
@@ -78,6 +78,13 @@ bool
decoder_buffer_fill
(
DecoderBuffer
*
buffer
);
decoder_buffer_fill
(
DecoderBuffer
*
buffer
);
/**
/**
* How many bytes are stored in the buffer?
*/
gcc_pure
size_t
decoder_buffer_available
(
const
DecoderBuffer
*
buffer
);
/**
* Reads data from the buffer. This data is not yet consumed, you
* Reads data from the buffer. This data is not yet consumed, you
* have to call decoder_buffer_consume() to do that. The returned
* have to call decoder_buffer_consume() to do that. The returned
* buffer becomes invalid after a decoder_buffer_fill() or a
* buffer becomes invalid after a decoder_buffer_fill() or a
...
...
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