tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_FFmpegEncoderAudioFormat.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14#if TRACKTION_ENABLE_FFMPEG
15
16class FFmpegEncoderAudioFormat : public juce::AudioFormat
17{
18public:
22 FFmpegEncoderAudioFormat (const juce::File& ffmpegExecutableToUse);
23 ~FFmpegEncoderAudioFormat();
24
25 bool canHandleFile (const juce::File&);
26 juce::Array<int> getPossibleSampleRates();
27 juce::Array<int> getPossibleBitDepths();
28 bool canDoStereo();
29 bool canDoMono();
30 bool isCompressed();
31 juce::StringArray getQualityOptions();
32
33 juce::AudioFormatReader* createReaderFor (juce::InputStream*, bool deleteStreamIfOpeningFails);
34
35 juce::AudioFormatWriter* createWriterFor (juce::OutputStream*, double sampleRateToUse,
36 unsigned int numberOfChannels, int bitsPerSample,
37 const juce::StringPairArray& metadataValues, int qualityOptionIndex);
38
39 using AudioFormat::createWriterFor;
40
41private:
42 juce::File ffmpegExe;
43 class Writer;
44
45 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FFmpegEncoderAudioFormat)
46};
47
48#endif
49
50}} // namespace tracktion { inline namespace engine
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)