You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented an element that acts similarly to the membrane_realtimer:
the elements starts a timer on handle_playing with :no_interval
on handle_buffer timer's interval is calculated and set with the use of :timer_interval action
on handle_tick, the buffer is output, and the timer's interval is set to :no_interval
I have noticed, that the timer starts running late (with latency in respect to walltime equal to ~100ms) and the compensation mechanism does not seem to take that under consideration, as the latency persists over time.
I have also experimented with using :start_timer and :stop_timer (with no luck).
It's possible that the problem would occur also with the membrane_realtimer, but I haven't checked it.
After rewriting the element so that it directly uses Process.send_after (with a similar compensation mechanism as the one introduced in membrane_core), the problem has been solved.
The text was updated successfully, but these errors were encountered:
It turns out that the problem was with the handle_tick returning timer_interval: :no_interval action and then demand: ... action. The demand action was then calling handle_buffer synchronously (since there were some buffers already waiting in the input queue) and that handle_buffer was overwriting timer_interval with a particular interval. When such a chain of actions was returned by the CallbackHandler.exec_and_handle_callback in the TimerController, the Timer.tick was called unaware of the fact, that there was :no_interval in between of the actions.
It should be solved with this PR: #685
I have implemented an element that acts similarly to the membrane_realtimer:
handle_playing
with:no_interval
handle_buffer
timer's interval is calculated and set with the use of:timer_interval
actionhandle_tick
, the buffer is output, and the timer's interval is set to:no_interval
I have noticed, that the timer starts running late (with latency in respect to walltime equal to ~100ms) and the compensation mechanism does not seem to take that under consideration, as the latency persists over time.
I have also experimented with using
:start_timer
and:stop_timer
(with no luck).It's possible that the problem would occur also with the membrane_realtimer, but I haven't checked it.
After rewriting the element so that it directly uses
Process.send_after
(with a similar compensation mechanism as the one introduced in membrane_core), the problem has been solved.The text was updated successfully, but these errors were encountered: