#pragma once

#include <string>

namespace smartcut::media {

enum class AudioOutputCodec { copy, source, aac, ac3, mp2, opus, pcm_s16le };

struct AudioTransformOptions {
  AudioOutputCodec codec{AudioOutputCodec::copy};
  double gain_db{};
  int bitrate{192000};
  int sample_rate{};
  int channels{};
};

const char* audio_output_codec_name(AudioOutputCodec codec);
AudioOutputCodec audio_output_codec_from_name(const std::string& name);
bool audio_transform_requested(const AudioTransformOptions& options);

// Re-encodes the primary audio stream and packet-copies every other stream into
// a validated Matroska intermediate. This is deliberately separate from final
// container delivery so the video smart-render contract remains auditable.
std::string transform_primary_audio_mkv(const std::string& input, const std::string& output,
                                        const AudioTransformOptions& options);

}  // namespace smartcut::media
