<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\ValueObject;

/**
 * Encapsulates all parameters for a single non-adaptive output conversion.
 *
 * Replaces the 11-parameter convertSingleOutput() signature.
 *
 * @internal
 */
final readonly class SingleOutputConversionRequest {

  /**
   * Constructs a SingleOutputConversionRequest.
   *
   * @param string $sourcePath
   *   Path to the source media file.
   * @param \Drupal\ffmpeg_media\ValueObject\ConversionContext $context
   *   Conversion context (entity type, bundle, field name).
   * @param \Drupal\ffmpeg_media\ValueObject\ProfileOutput $outputConfig
   *   Output configuration from the conversion profile.
   * @param \Drupal\ffmpeg_media\ValueObject\VideoInfo $videoInfo
   *   Probed video information.
   * @param int $mediaId
   *   Media entity ID.
   * @param int $currentOutput
   *   One-based index of the current output in the batch.
   * @param int $totalOutputs
   *   Total number of single outputs in the batch.
   * @param bool $synchronous
   *   Whether the conversion runs synchronously.
   * @param string|null $outputDirectory
   *   Target output directory, or NULL for default.
   * @param bool $hardwareRequired
   *   Whether the profile requires GPU hardware acceleration.
   * @param string|null $outputKey
   *   Qualified output key, or NULL to derive from container.
   */
  public function __construct(
    public string $sourcePath,
    public ConversionContext $context,
    public ProfileOutput $outputConfig,
    public VideoInfo $videoInfo,
    public int $mediaId,
    public int $currentOutput,
    public int $totalOutputs,
    public bool $synchronous,
    public ?string $outputDirectory,
    public bool $hardwareRequired,
    public ?string $outputKey = NULL,
  ) {}

}
