stream; use const params in finish_format

This commit is contained in:
Wim Taymans 2018-06-08 12:29:26 +02:00
parent 1b37db8add
commit 057da435da
4 changed files with 5 additions and 5 deletions

View file

@ -231,7 +231,7 @@ on_stream_format_changed(void *_data, const struct spa_pod *format)
struct pw_type *t = data->t; struct pw_type *t = data->t;
uint8_t params_buffer[1024]; uint8_t params_buffer[1024];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer));
struct spa_pod *params[2]; const struct spa_pod *params[2];
Uint32 sdl_format; Uint32 sdl_format;
void *d; void *d;

View file

@ -167,7 +167,7 @@ on_stream_format_changed(void *_data, const struct spa_pod *format)
struct pw_type *t = data->t; struct pw_type *t = data->t;
uint8_t params_buffer[1024]; uint8_t params_buffer[1024];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer));
struct spa_pod *params[2]; const struct spa_pod *params[2];
if (format == NULL) { if (format == NULL) {
pw_stream_finish_format(stream, 0, NULL, 0); pw_stream_finish_format(stream, 0, NULL, 0);

View file

@ -1045,7 +1045,7 @@ set_init_params(struct pw_stream *stream,
impl->n_init_params = n_init_params; impl->n_init_params = n_init_params;
} }
static void set_params(struct pw_stream *stream, int n_params, struct spa_pod **params) static void set_params(struct pw_stream *stream, int n_params, const struct spa_pod **params)
{ {
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
int i; int i;
@ -1193,7 +1193,7 @@ int pw_stream_disconnect(struct pw_stream *stream)
void pw_stream_finish_format(struct pw_stream *stream, void pw_stream_finish_format(struct pw_stream *stream,
int res, int res,
struct spa_pod **params, const struct spa_pod **params,
uint32_t n_params) uint32_t n_params)
{ {
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);

View file

@ -289,7 +289,7 @@ int pw_stream_disconnect(struct pw_stream *stream);
void void
pw_stream_finish_format(struct pw_stream *stream, /**< a \ref pw_stream */ pw_stream_finish_format(struct pw_stream *stream, /**< a \ref pw_stream */
int res, /**< a result code */ int res, /**< a result code */
struct spa_pod **params, /**< an array of params. The params should const struct spa_pod **params, /**< an array of params. The params should
* ideally contain parameters for doing * ideally contain parameters for doing
* buffer allocation. */ * buffer allocation. */
uint32_t n_params /**< number of elements in \a params */); uint32_t n_params /**< number of elements in \a params */);