Commit fa4bf579 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avutil/audio_fifo: Constify some pointees

Also constify AVAudioFifo* in the peek functions
besides constifying intermediate pointers (void**->void * const *).
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 9bf31f60
...@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 ...@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first: API changes, most recent first:
2023-09-07 - xxxxxxxxxx - lavu 58.22.100 - audio_fifo.h
Constify some pointees in av_audio_fifo_write(), av_audio_fifo_read(),
av_audio_fifo_peek() and av_audio_fifo_peek_at().
2023-09-07 - xxxxxxxxxx - lavu 58.21.100 - samplefmt.h 2023-09-07 - xxxxxxxxxx - lavu 58.21.100 - samplefmt.h
Constify some pointees in av_samples_copy() and av_samples_set_silence(). Constify some pointees in av_samples_copy() and av_samples_set_silence().
......
...@@ -116,7 +116,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples) ...@@ -116,7 +116,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples)
return 0; return 0;
} }
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples) int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples)
{ {
int i, ret, size; int i, ret, size;
...@@ -142,12 +142,13 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples) ...@@ -142,12 +142,13 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
return nb_samples; return nb_samples;
} }
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples) int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples)
{ {
return av_audio_fifo_peek_at(af, data, nb_samples, 0); return av_audio_fifo_peek_at(af, data, nb_samples, 0);
} }
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset) int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data,
int nb_samples, int offset)
{ {
int i, ret, size; int i, ret, size;
...@@ -171,7 +172,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs ...@@ -171,7 +172,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs
return nb_samples; return nb_samples;
} }
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples) int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples)
{ {
int i, size; int i, size;
......
...@@ -91,7 +91,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples); ...@@ -91,7 +91,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
* code on failure. If successful, the number of samples * code on failure. If successful, the number of samples
* actually written will always be nb_samples. * actually written will always be nb_samples.
*/ */
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples);
/** /**
* Peek data from an AVAudioFifo. * Peek data from an AVAudioFifo.
...@@ -107,7 +107,7 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); ...@@ -107,7 +107,7 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
* be greater than nb_samples, and will only be less than * be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples. * nb_samples if av_audio_fifo_size is less than nb_samples.
*/ */
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples); int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples);
/** /**
* Peek data from an AVAudioFifo. * Peek data from an AVAudioFifo.
...@@ -124,7 +124,8 @@ int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples); ...@@ -124,7 +124,8 @@ int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
* be greater than nb_samples, and will only be less than * be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples. * nb_samples if av_audio_fifo_size is less than nb_samples.
*/ */
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset); int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data,
int nb_samples, int offset);
/** /**
* Read data from an AVAudioFifo. * Read data from an AVAudioFifo.
...@@ -140,7 +141,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs ...@@ -140,7 +141,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs
* be greater than nb_samples, and will only be less than * be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples. * nb_samples if av_audio_fifo_size is less than nb_samples.
*/ */
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples); int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples);
/** /**
* Drain data from an AVAudioFifo. * Drain data from an AVAudioFifo.
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 58 #define LIBAVUTIL_VERSION_MAJOR 58
#define LIBAVUTIL_VERSION_MINOR 21 #define LIBAVUTIL_VERSION_MINOR 22
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment