Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1f5c1333
Commit
1f5c1333
authored
Jun 24, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sink_buffer: implement fixed frame size.
parent
0689d5e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
buffersink.h
libavfilter/buffersink.h
+9
-0
sink_buffer.c
libavfilter/sink_buffer.c
+8
-0
No files found.
libavfilter/buffersink.h
View file @
1f5c1333
...
...
@@ -55,6 +55,15 @@ typedef struct {
*/
AVABufferSinkParams
*
av_abuffersink_params_alloc
(
void
);
/**
* Set the frame size for an audio buffer sink.
*
* All calls to av_buffersink_get_buffer_ref will return a buffer with
* exactly the specified number of samples, or AVERROR(EAGAIN) if there is
* not enough. The last buffer at EOF will be padded with 0.
*/
void
av_buffersink_set_frame_size
(
AVFilterContext
*
ctx
,
unsigned
frame_size
);
/**
* Tell av_buffersink_get_buffer_ref() to read video/samples buffer
* reference, but not remove it from the buffer. This is useful if you
...
...
libavfilter/sink_buffer.c
View file @
1f5c1333
...
...
@@ -125,6 +125,14 @@ static void end_frame(AVFilterLink *inlink)
}
}
void
av_buffersink_set_frame_size
(
AVFilterContext
*
ctx
,
unsigned
frame_size
)
{
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
inlink
->
min_samples
=
inlink
->
max_samples
=
inlink
->
partial_buf_size
=
frame_size
;
}
int
av_buffersink_get_buffer_ref
(
AVFilterContext
*
ctx
,
AVFilterBufferRef
**
bufref
,
int
flags
)
{
...
...
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