Skip to content

Change FFmpeg Task to provide re-usable init functionalities #51

@pjotrek-b

Description

@pjotrek-b

Sounds easier than it looks.
I'd like to re-use $sources, $targets, $recipes handling code from FFmpeg task, while allowing to create other kind of todo-lists (like $sources glob patterns resolving to list-of-files, and the $target filenames are put together (by mask) accordingly. Using placeholder variables.

However, the current FFmpeg CITask implementation is hardcoded to:

$this->checkArrayKeysMatch2(array(
            self::TODO_IN => $this->sources,
            self::TODO_OUT => $this->targets,
            self::TODO_RECIPE => $this->recipes,
            self::TODO_VALIDATE => $this->validates
            ));

Resolved to:

$todoList[] = array(
            self::TODO_RECIPE => $recipe,
            self::TODO_IN => $this->filesIn,
            self::TODO_OUT => $this->filesOut,
            self::TODO_VALIDATE => $validate,
            );

Worked but is un-inheritable for reuse in objects (eg MediaConch task).
If I manage to split and rewrite the init() of the task to get a list (task-type-specific), but resolves a list-of-arrays and assigns them dynamically.

To be continued...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions