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

Shared - Refactor Timeline Items #257

Closed
2 of 3 tasks
Joery-M opened this issue Oct 11, 2024 · 0 comments · Fixed by #295
Closed
2 of 3 tasks

Shared - Refactor Timeline Items #257

Joery-M opened this issue Oct 11, 2024 · 0 comments · Fixed by #295
Labels
refactor Overhaul how a part of the application works scope: Shared Will affect packages/shared scope: Timeline Will affect timeline

Comments

@Joery-M
Copy link
Owner

Joery-M commented Oct 11, 2024

Timeline item definition

This issue explains what 'timeline items' represent in the application.

Timeline items are the representation of elements that are rendered at a specific time. Timeline items dictate when an element is rendered, what effects are applied to the rendering step, how the item can be interacted with and how the item is displayed (See transition in #256).

Timeline items don't inherently define what media is played and when, that job is delegated to effects (#256).

Timeline items are not specific to video or audio, they are generic. This is also represented in the user interface, there is no split between audio and video, opting instead for using the sources defined on a timeline item.

Effects

A timeline item has a list of effects that are executed to compose an image or to modify an audio stream.

When rendering an image:

  1. The source effect is executed to receive data about width and height of the media.
  2. The item iterates over the remaining effects and executes the ones that are designated to modify images.
    • Each effect can modify a transformation matrix to alter the position, scale, rotation or skew of the end result. Transformations should always be relative to the last value.
  3. The item takes the completed image and applies the transformation and any other effects required for composition, like blend mode.

When processing audio:

  1. The source effect is executed to receive base audio data.
  2. The item iterates over the remaining effects and executes the ones that are designated to modify audio.
    • Note: Experiment with how gain is handled to avoid clipping (if that even happens)
  3. The item caches the processed audio chunk.

This issue should implement these basic requirements:

  • Adding timeline items to timelines.
  • Displaying timeline items in the timeline UI.
  • (At minimum) code to move timeline items.
@Joery-M Joery-M added scope: Safelight UI Will affect Safelight UI scope: Shared Will affect packages/shared refactor Overhaul how a part of the application works labels Oct 11, 2024
@Joery-M Joery-M added this to the Setup and structure milestone Oct 11, 2024
@Joery-M Joery-M removed the scope: Safelight UI Will affect Safelight UI label Oct 14, 2024
@Joery-M Joery-M added the scope: Timeline Will affect timeline label Oct 27, 2024
@Joery-M Joery-M linked a pull request Nov 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Overhaul how a part of the application works scope: Shared Will affect packages/shared scope: Timeline Will affect timeline
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant