<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\Plugin\FFmpegOutput;

use Drupal\ffmpeg_media\ValueObject\ConversionOptions;

/**
 * Interface for output plugins that support subtitle track integration.
 */
interface SubtitleAwareOutputInterface {

  /**
   * Builds FFmpeg arguments for adaptive streaming with subtitle tracks.
   *
   * @param \Drupal\ffmpeg_media\ValueObject\ConversionOptions $options
   *   The conversion options.
   * @param array<\Drupal\ffmpeg_media\ValueObject\SubtitleTrack> $subtitleTracks
   *   Array of subtitle tracks to include.
   *
   * @return array<int, string>
   *   FFmpeg arguments for adaptive streaming with subtitles.
   */
  #[\NoDiscard]
  public function buildAdaptiveArgumentsWithSubtitles(
    ConversionOptions $options,
    array $subtitleTracks,
  ): array;

  /**
   * Builds input arguments for subtitle files.
   *
   * These must be placed after the main video input in the command.
   *
   * @param array<\Drupal\ffmpeg_media\ValueObject\SubtitleTrack> $subtitleTracks
   *   Array of subtitle tracks.
   *
   * @return array<int, string>
   *   Array of -i arguments for subtitle files.
   */
  #[\NoDiscard]
  public function buildSubtitleInputArguments(array $subtitleTracks): array;

}
