Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop ignoring timestamps #34

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Stop ignoring timestamps #34

merged 2 commits into from
Mar 18, 2024

Conversation

Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Mar 4, 2024

No description provided.

def handle_stream_format(:input, stream_format, ctx, state) do
%{input: input} = ctx.pads
%{cnode: cnode} = state

if !input.stream_format || stream_format == input.stream_format do
def handle_stream_format(:input, stream_format, ctx, %{cnode: cnode} = state) do
if !ctx.pads.input.stream_format || stream_format == ctx.pads.input.stream_format do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if that's better :P

Comment on lines 54 to 60
%{last_pts: nil, last_payload: nil} ->
[demand: :input]

%{last_pts: last_pts, last_payload: last_payload} ->
:ok = CNode.call(state.cnode, :display_frame, [last_payload])

[timer_interval: {:demand_timer, pts - last_pts}]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • when we get the first frame, we should display it immediately
  • when we get a subsequent frame, we should display it in handle_tick

so it looks like it should be the other way round

@Noarkhh Noarkhh requested a review from mat-hek March 13, 2024 13:07
@Noarkhh Noarkhh merged commit 8648e06 into master Mar 18, 2024
3 checks passed
@Noarkhh Noarkhh deleted the use-timestamps branch March 18, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants