#pragma once

#include <cstddef>
#include <optional>
#include <span>

namespace smartcut::media {

enum class VideoStreamRole {
  other,
  attached_picture,
  program_video,
};

constexpr std::optional<std::size_t> first_program_video_stream(
    std::span<const VideoStreamRole> streams) {
  for (std::size_t index = 0; index < streams.size(); ++index)
    if (streams[index] == VideoStreamRole::program_video) return index;
  return std::nullopt;
}

}  // namespace smartcut::media
