History

lavfi/framepool: add audio support

Matthieu Bouron committed 9 years ago

Commit eb336811 parent b1f68f02 files · +144 −1Browse files

Showing the changes to libavfilter/framepool.h (1 of 2 files). Show all

Unified · Split

libavfilter/framepool.h+35−1
@@ -41,7 +41,7 @@ typedef struct FFFramePool FFFramePool; · 40 unmodified lines
41 * @param height height of each frame in this pool41 * @param height height of each frame in this pool
42 * @param format format of each frame in this pool42 * @param format format of each frame in this pool
43 * @param align buffers alignement of each frame in this pool43 * @param align buffers alignement of each frame in this pool
44 * @return newly created frame pool on success, NULL on error.44 * @return newly created video frame pool on success, NULL on error.
45 */45 */
46FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),46FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size),
47 int width,47 int width,
@@ -49,6 +49,24 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size), · 1 unmodified line
49 enum AVPixelFormat format,49 enum AVPixelFormat format,
50 int align);50 int align);
51 51
52/**
53 * Allocate and initialize an audio frame pool.
54 *
55 * @param alloc a function that will be used to allocate new frame buffers when
56 * the pool is empty. May be NULL, then the default allocator will be used
57 * (av_buffer_alloc()).
58 * @param channels channels of each frame in this pool
59 * @param nb_samples number of samples of each frame in this pool
60 * @param format format of each frame in this pool
61 * @param align buffers alignement of each frame in this pool
62 * @return newly created audio frame pool on success, NULL on error.
63 */
64FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(int size),
65 int channels,
66 int samples,
67 enum AVSampleFormat format,
68 int align);
69
52/**70/**
53 * Deallocate the frame pool. It is safe to call this function while71 * Deallocate the frame pool. It is safe to call this function while
54 * some of the allocated frame are still in use.72 * some of the allocated frame are still in use.
@@ -72,6 +90,22 @@ int ff_frame_pool_get_video_config(FFFramePool *pool, · 17 unmodified lines
72 enum AVPixelFormat *format,90 enum AVPixelFormat *format,
73 int *align);91 int *align);
74 92
93/**
94 * Get the audio frame pool configuration.
95 *
96 * @param channels channels of each frame in this pool
97 * @param nb_samples number of samples of each frame in this pool
98 * @param format format of each frame in this pool
99 * @param align buffers alignement of each frame in this pool
100 * @return 0 on success, a negative AVERROR otherwise.
101 */
102int ff_frame_pool_get_audio_config(FFFramePool *pool,
103 int *channels,
104 int *nb_samples,
105 enum AVSampleFormat *format,
106 int *align);
107
108
75/**109/**
76 * Allocate a new AVFrame, reussing old buffers from the pool when available.110 * Allocate a new AVFrame, reussing old buffers from the pool when available.
77 * This function may be called simultaneously from multiple threads.111 * This function may be called simultaneously from multiple threads.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t