mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavr: add a function for checking whether AVAudioResampleContext is open
This commit is contained in:
parent
d922c5a5fb
commit
7e86c27b4e
@ -13,6 +13,9 @@ libavutil: 2013-12-xx
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2014-02-xx - xxxxxxx - lavr 1.2.0 - avresample.h
|
||||||
|
Add avresample_is_open() for checking whether a resample context is open.
|
||||||
|
|
||||||
2014-xx-xx - xxxxxxx - lavu 53.04.0 - opt.h
|
2014-xx-xx - xxxxxxx - lavu 53.04.0 - opt.h
|
||||||
Add AV_OPT_FLAG_EXPORT and AV_OPT_FLAG_READONLY to mark options meant (only)
|
Add AV_OPT_FLAG_EXPORT and AV_OPT_FLAG_READONLY to mark options meant (only)
|
||||||
for reading.
|
for reading.
|
||||||
|
@ -171,6 +171,14 @@ AVAudioResampleContext *avresample_alloc_context(void);
|
|||||||
*/
|
*/
|
||||||
int avresample_open(AVAudioResampleContext *avr);
|
int avresample_open(AVAudioResampleContext *avr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether an AVAudioResampleContext is open or closed.
|
||||||
|
*
|
||||||
|
* @param avr AVAudioResampleContext to check
|
||||||
|
* @return 1 if avr is open, 0 if avr is closed.
|
||||||
|
*/
|
||||||
|
int avresample_is_open(AVAudioResampleContext *avr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close AVAudioResampleContext.
|
* Close AVAudioResampleContext.
|
||||||
*
|
*
|
||||||
|
@ -254,6 +254,11 @@ error:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int avresample_is_open(AVAudioResampleContext *avr)
|
||||||
|
{
|
||||||
|
return !!avr->out_fifo;
|
||||||
|
}
|
||||||
|
|
||||||
void avresample_close(AVAudioResampleContext *avr)
|
void avresample_close(AVAudioResampleContext *avr)
|
||||||
{
|
{
|
||||||
ff_audio_data_free(&avr->in_buffer);
|
ff_audio_data_free(&avr->in_buffer);
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "libavutil/version.h"
|
#include "libavutil/version.h"
|
||||||
|
|
||||||
#define LIBAVRESAMPLE_VERSION_MAJOR 1
|
#define LIBAVRESAMPLE_VERSION_MAJOR 1
|
||||||
#define LIBAVRESAMPLE_VERSION_MINOR 1
|
#define LIBAVRESAMPLE_VERSION_MINOR 2
|
||||||
#define LIBAVRESAMPLE_VERSION_MICRO 0
|
#define LIBAVRESAMPLE_VERSION_MICRO 0
|
||||||
|
|
||||||
#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
|
#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
|
||||||
|
Loading…
Reference in New Issue
Block a user