mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pulse-server: clear timer when stream is created
Make a function when the stream is created so that we can clear the create_tag and the timer.
This commit is contained in:
parent
5ff1cb5545
commit
3fb9524cf1
3 changed files with 12 additions and 2 deletions
|
|
@ -621,7 +621,7 @@ static int reply_create_playback_stream(struct stream *stream, struct pw_manager
|
||||||
TAG_INVALID);
|
TAG_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->create_tag = SPA_ID_INVALID;
|
stream_created(stream);
|
||||||
|
|
||||||
return client_queue_message(client, reply);
|
return client_queue_message(client, reply);
|
||||||
}
|
}
|
||||||
|
|
@ -783,7 +783,7 @@ static int reply_create_record_stream(struct stream *stream, struct pw_manager_o
|
||||||
TAG_INVALID);
|
TAG_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->create_tag = SPA_ID_INVALID;
|
stream_created(stream);
|
||||||
|
|
||||||
return client_queue_message(client, reply);
|
return client_queue_message(client, reply);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,15 @@ error_errno:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stream_created(struct stream *stream)
|
||||||
|
{
|
||||||
|
struct client *client = stream->client;
|
||||||
|
pw_log_debug("client %p: stream %p channel:%d", client, stream, stream->channel);
|
||||||
|
|
||||||
|
stream->create_tag = SPA_ID_INVALID;
|
||||||
|
pw_timer_queue_cancel(&stream->timer);
|
||||||
|
}
|
||||||
|
|
||||||
void stream_free(struct stream *stream)
|
void stream_free(struct stream *stream)
|
||||||
{
|
{
|
||||||
struct client *client = stream->client;
|
struct client *client = stream->client;
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@ struct stream {
|
||||||
struct stream *stream_new(struct client *client, enum stream_type type, uint32_t create_tag,
|
struct stream *stream_new(struct client *client, enum stream_type type, uint32_t create_tag,
|
||||||
const struct sample_spec *ss, const struct channel_map *map,
|
const struct sample_spec *ss, const struct channel_map *map,
|
||||||
const struct buffer_attr *attr);
|
const struct buffer_attr *attr);
|
||||||
|
void stream_created(struct stream *stream);
|
||||||
void stream_free(struct stream *stream);
|
void stream_free(struct stream *stream);
|
||||||
void stream_flush(struct stream *stream);
|
void stream_flush(struct stream *stream);
|
||||||
uint32_t stream_pop_missing(struct stream *stream);
|
uint32_t stream_pop_missing(struct stream *stream);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue