2024-06-02 06:15:09 +02:00
|
|
|
defmodule PhilomenaMedia.Processors.Processor do
|
|
|
|
@moduledoc false
|
|
|
|
|
|
|
|
alias PhilomenaMedia.Analyzers.Result
|
|
|
|
alias PhilomenaMedia.Processors
|
|
|
|
alias PhilomenaMedia.Intensities
|
|
|
|
|
2024-06-18 19:18:12 +02:00
|
|
|
@doc """
|
|
|
|
Generate a list of version filenames for the given version list.
|
|
|
|
"""
|
2024-06-02 06:15:09 +02:00
|
|
|
@callback versions(Processors.version_list()) :: [Processors.version_filename()]
|
|
|
|
|
2024-06-18 19:18:12 +02:00
|
|
|
@doc """
|
|
|
|
Process the media at the given path against the given version list, and return an
|
|
|
|
edit script with the resulting files.
|
|
|
|
"""
|
2024-06-02 06:15:09 +02:00
|
|
|
@callback process(Result.t(), Path.t(), Processors.version_list()) :: Processors.edit_script()
|
|
|
|
|
2024-06-18 19:18:12 +02:00
|
|
|
@doc """
|
|
|
|
Perform post-processing optimization tasks on the file, to reduce its size
|
|
|
|
and strip non-essential metadata.
|
|
|
|
"""
|
2024-06-02 06:15:09 +02:00
|
|
|
@callback post_process(Result.t(), Path.t()) :: Processors.edit_script()
|
|
|
|
|
2024-06-18 19:18:12 +02:00
|
|
|
@doc """
|
|
|
|
Generate corner intensities for the given path.
|
|
|
|
"""
|
2024-06-02 06:15:09 +02:00
|
|
|
@callback intensities(Result.t(), Path.t()) :: Intensities.t()
|
|
|
|
end
|