mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
stream: we should not update clock automatically
A driver node should update the clock before it starts the graph cycle.
This commit is contained in:
parent
265f7dd09f
commit
6363bbd1b9
2 changed files with 2 additions and 29 deletions
|
|
@ -951,16 +951,6 @@ static int impl_port_reuse_buffer(void *object, uint32_t port_id, uint32_t buffe
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void update_target(struct filter *impl)
|
|
||||||
{
|
|
||||||
struct spa_io_position *p = impl->rt.position;
|
|
||||||
if (SPA_LIKELY(p != NULL)) {
|
|
||||||
p->clock.rate = p->clock.target_rate;
|
|
||||||
p->clock.position += p->clock.duration;
|
|
||||||
p->clock.duration = p->clock.target_duration;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void copy_position(struct filter *impl)
|
static inline void copy_position(struct filter *impl)
|
||||||
{
|
{
|
||||||
struct spa_io_position *p = impl->rt.position;
|
struct spa_io_position *p = impl->rt.position;
|
||||||
|
|
@ -1964,10 +1954,7 @@ do_trigger_process(struct spa_loop *loop,
|
||||||
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
||||||
{
|
{
|
||||||
struct filter *impl = user_data;
|
struct filter *impl = user_data;
|
||||||
int res;
|
int res = impl_node_process(impl);
|
||||||
|
|
||||||
update_target(impl);
|
|
||||||
res = impl_node_process(impl);
|
|
||||||
return spa_node_call_ready(&impl->callbacks, res);
|
return spa_node_call_ready(&impl->callbacks, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -572,16 +572,6 @@ static int impl_set_param(void *object, uint32_t id, uint32_t flags, const struc
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void update_target(struct stream *impl)
|
|
||||||
{
|
|
||||||
struct spa_io_position *p = impl->rt.position;
|
|
||||||
if (SPA_LIKELY(p != NULL)) {
|
|
||||||
p->clock.rate = p->clock.target_rate;
|
|
||||||
p->clock.position += p->clock.duration;
|
|
||||||
p->clock.duration = p->clock.target_duration;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void copy_position(struct stream *impl, int64_t queued)
|
static inline void copy_position(struct stream *impl, int64_t queued)
|
||||||
{
|
{
|
||||||
struct spa_io_position *p = impl->rt.position;
|
struct spa_io_position *p = impl->rt.position;
|
||||||
|
|
@ -2273,9 +2263,7 @@ do_trigger_deprecated(struct spa_loop *loop,
|
||||||
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
bool async, uint32_t seq, const void *data, size_t size, void *user_data)
|
||||||
{
|
{
|
||||||
struct stream *impl = user_data;
|
struct stream *impl = user_data;
|
||||||
int res;
|
int res = impl->node_methods.process(impl);
|
||||||
update_target(impl);
|
|
||||||
res = impl->node_methods.process(impl);
|
|
||||||
return spa_node_call_ready(&impl->callbacks, res);
|
return spa_node_call_ready(&impl->callbacks, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2426,8 +2414,6 @@ int pw_stream_trigger_process(struct pw_stream *stream)
|
||||||
if (!impl->driving && !impl->trigger) {
|
if (!impl->driving && !impl->trigger) {
|
||||||
res = trigger_request_process(impl);
|
res = trigger_request_process(impl);
|
||||||
} else {
|
} else {
|
||||||
update_target(impl);
|
|
||||||
|
|
||||||
if (!impl->process_rt)
|
if (!impl->process_rt)
|
||||||
call_process(impl);
|
call_process(impl);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue