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

rewrite timestamps #55

Merged
merged 40 commits into from
Jan 17, 2024
Merged

rewrite timestamps #55

merged 40 commits into from
Jan 17, 2024

Conversation

bartkrak
Copy link
Contributor

@bartkrak bartkrak marked this pull request as ready for review December 19, 2023 10:32
@bartkrak bartkrak requested a review from mat-hek as a code owner December 19, 2023 10:32
@bartkrak bartkrak marked this pull request as draft December 19, 2023 10:32
@bartkrak bartkrak requested review from FelonEkonom and removed request for FelonEkonom December 19, 2023 10:33
@bartkrak bartkrak marked this pull request as ready for review December 20, 2023 13:05
@bartkrak bartkrak requested a review from FelonEkonom December 20, 2023 13:05
@FelonEkonom FelonEkonom self-requested a review January 3, 2024 16:39
@bartkrak bartkrak requested a review from FelonEkonom January 11, 2024 04:58
processor,
[packet | packets],
channels,
updated_state =
Copy link
Member

Choose a reason for hiding this comment

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

You can just name this variable state

metadata: %{duration: fixture.duration}
}
end)
defp buffer_from_fixture(fixtures, self_delimited? \\ false) do
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
defp buffer_from_fixture(fixtures, self_delimited? \\ false) do
defp buffers_from_fixtures(fixtures, self_delimited? \\ false) do

@@ -58,6 +58,7 @@ defmodule Membrane.Opus.Encoder do
options
|> Map.from_struct()
|> Map.merge(%{
pts_current: nil,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pts_current: nil,
current_pts: nil,

Comment on lines 167 to 177
defp check_pts_integrity(true = _flag, %Buffer{pts: pts}, input_pts) do
if pts != input_pts do
raise """
PTS values are not continuous
"""
end
end

defp check_pts_integrity(false = _flag, %Buffer{pts: _pts}, _input_pts) do
end

Copy link
Member

@FelonEkonom FelonEkonom Jan 12, 2024

Choose a reason for hiding this comment

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

In the another comment I have written that is should be deleted, but FYI if you want to write function that do some checks and raises if any of them is not met and does nothing otherwise,

  1. If all checks pass, function should return :ok instead of nil
  2. name of the function should end with !

@bartkrak bartkrak requested a review from FelonEkonom January 15, 2024 12:14
Copy link
Member

@FelonEkonom FelonEkonom left a comment

Choose a reason for hiding this comment

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

Remove .vscode/settings.json

@bartkrak bartkrak requested a review from FelonEkonom January 15, 2024 17:22
Comment on lines 135 to 139
defp set_current_pts(%{queue: <<>>} = state, input_pts) do
%{state | current_pts: input_pts}
end

defp set_current_pts(state, _input_pts), do: state
Copy link
Member

Choose a reason for hiding this comment

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

let's move this below the public functions, or at least below the place it's first used

@mat-hek mat-hek force-pushed the elem-rewrite-timestamps branch from a7c53de to 1ac385b Compare January 17, 2024 16:01
@bartkrak bartkrak merged commit 128ac62 into master Jan 17, 2024
3 checks passed
@bartkrak bartkrak deleted the elem-rewrite-timestamps branch January 17, 2024 16:12
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.

3 participants