You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavfi: implement avfilter_get_audio_buffer_ref_from_frame.
This commit is contained in:
@@ -56,6 +56,20 @@ AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame
|
|||||||
return picref;
|
return picref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
|
||||||
|
int perms)
|
||||||
|
{
|
||||||
|
AVFilterBufferRef *picref =
|
||||||
|
avfilter_get_audio_buffer_ref_from_arrays((uint8_t **)frame->data, (int *)frame->linesize, perms,
|
||||||
|
frame->nb_samples, frame->format,
|
||||||
|
av_frame_get_channel_layout(frame),
|
||||||
|
av_sample_fmt_is_planar(frame->format));
|
||||||
|
if (!picref)
|
||||||
|
return NULL;
|
||||||
|
avfilter_copy_frame_props(picref, frame);
|
||||||
|
return picref;
|
||||||
|
}
|
||||||
|
|
||||||
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
||||||
const AVFilterBufferRef *samplesref)
|
const AVFilterBufferRef *samplesref)
|
||||||
{
|
{
|
||||||
|
@@ -46,6 +46,16 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src);
|
|||||||
*/
|
*/
|
||||||
AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
|
AVFilterBufferRef *avfilter_get_video_buffer_ref_from_frame(const AVFrame *frame, int perms);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create and return a picref reference from the data and properties
|
||||||
|
* contained in frame.
|
||||||
|
*
|
||||||
|
* @param perms permissions to assign to the new buffer reference
|
||||||
|
*/
|
||||||
|
AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_frame(const AVFrame *frame,
|
||||||
|
int perms);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill an AVFrame with the information stored in samplesref.
|
* Fill an AVFrame with the information stored in samplesref.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user