mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
stream: constify format array because we copy
This commit is contained in:
parent
834da99c7c
commit
937a1567dd
6 changed files with 7 additions and 7 deletions
|
|
@ -250,7 +250,7 @@ static void unhandle_socket(struct pw_stream *stream)
|
|||
|
||||
static void
|
||||
set_possible_formats(struct pw_stream *stream,
|
||||
int n_possible_formats, struct spa_format **possible_formats)
|
||||
int n_possible_formats, const struct spa_format **possible_formats)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
int i;
|
||||
|
|
@ -888,7 +888,7 @@ pw_stream_connect(struct pw_stream *stream,
|
|||
const char *port_path,
|
||||
enum pw_stream_flags flags,
|
||||
uint32_t n_possible_formats,
|
||||
struct spa_format **possible_formats)
|
||||
const struct spa_format **possible_formats)
|
||||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ pw_stream_connect(struct pw_stream *stream, /**< a \ref pw_stream */
|
|||
* to let the server choose a port */
|
||||
enum pw_stream_flags flags, /**< stream flags */
|
||||
uint32_t n_possible_formats, /**< number of items in \a possible_formats */
|
||||
struct spa_format **possible_formats /**< an array with possible accepted formats */);
|
||||
const struct spa_format **possible_formats /**< an array with possible accepted formats */);
|
||||
|
||||
/** Disconnect \a stream \memberof pw_stream */
|
||||
void pw_stream_disconnect(struct pw_stream *stream);
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ static void on_state_changed(struct pw_listener *listener, struct pw_context *co
|
|||
|
||||
case PW_CONTEXT_STATE_CONNECTED:
|
||||
{
|
||||
struct spa_format *formats[1];
|
||||
const struct spa_format *formats[1];
|
||||
uint8_t buffer[1024];
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
struct spa_pod_frame f[2];
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ static void on_state_changed(struct pw_listener *listener, struct pw_context *co
|
|||
|
||||
case PW_CONTEXT_STATE_CONNECTED:
|
||||
{
|
||||
struct spa_format *formats[1];
|
||||
const struct spa_format *formats[1];
|
||||
uint8_t buffer[1024];
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
struct spa_pod_frame f[2];
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ gst_pipewire_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||
pwsink->path,
|
||||
flags,
|
||||
possible->len,
|
||||
(struct spa_format **) possible->pdata);
|
||||
(const struct spa_format **) possible->pdata);
|
||||
|
||||
while (TRUE) {
|
||||
state = pwsink->stream->state;
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
|||
pwsrc->path,
|
||||
PW_STREAM_FLAG_AUTOCONNECT,
|
||||
possible->len,
|
||||
(struct spa_format **)possible->pdata);
|
||||
(const struct spa_format **)possible->pdata);
|
||||
g_ptr_array_free (possible, TRUE);
|
||||
|
||||
while (TRUE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue