![]() |
Audacity 3.2.0
|
An ImportFileHandle for data. More...
#include <ImportPlugin.h>
Public Types | |
using | ProgressResult = BasicUI::ProgressResult |
using | ByteCount = unsigned long long |
Public Member Functions | |
ImportFileHandle (const FilePath &filename) | |
virtual | ~ImportFileHandle () |
void | CreateProgress () |
virtual TranslatableString | GetFileDescription ()=0 |
virtual ByteCount | GetFileUncompressedBytes ()=0 |
virtual wxInt32 | GetStreamCount ()=0 |
virtual const TranslatableStrings & | GetStreamInfo ()=0 |
virtual void | SetStreamUsage (wxInt32 StreamID, bool Use)=0 |
virtual ProgressResult | Import (WaveTrackFactory *trackFactory, TrackHolders &outTracks, Tags *tags)=0 |
Static Public Member Functions | |
static sampleFormat | ChooseFormat (sampleFormat effectiveFormat) |
Choose appropriate format, which will not be narrower than the specified one. More... | |
Protected Member Functions | |
std::shared_ptr< WaveTrack > | NewWaveTrack (WaveTrackFactory &trackFactory, sampleFormat effectiveFormat, double rate) |
Build a wave track with appropriate format, which will not be narrower than the specified one. More... | |
Protected Attributes | |
FilePath | mFilename |
std::unique_ptr< ProgressDialog > | mProgress |
An ImportFileHandle for data.
Base class for FlacImportFileHandle, LOFImportFileHandle, MP3ImportFileHandle, OggImportFileHandle and PCMImportFileHandle. Gives API for sound file import.
The Ogg format supports multiple logical bitstreams that can be chained within the physical bitstream. The sampling rate and number of channels can vary between these logical bitstreams. For the moment, we'll ignore all but the first logical bitstream.
Ogg also allows for an arbitrary number of channels. Luckily, so does Audacity. We'll call the first channel LeftChannel, the second RightChannel, and all others after it MonoChannel.
Definition at line 106 of file ImportPlugin.h.
using ImportFileHandle::ByteCount = unsigned long long |
Definition at line 127 of file ImportPlugin.h.
Definition at line 109 of file ImportPlugin.h.
ImportFileHandle::ImportFileHandle | ( | const FilePath & | filename | ) |
Definition at line 36 of file ImportPlugin.cpp.
|
virtual |
Definition at line 41 of file ImportPlugin.cpp.
|
static |
Choose appropriate format, which will not be narrower than the specified one.
Definition at line 54 of file ImportPlugin.cpp.
References floatSample, format, int16Sample, and QualitySettings::SampleFormatChoice().
Referenced by ImportRaw(), NewWaveTrack(), and PCMImportFileHandle::PCMImportFileHandle().
void ImportFileHandle::CreateProgress | ( | ) |
Definition at line 45 of file ImportPlugin.cpp.
References GetFileDescription(), mFilename, mProgress, title, Verbatim(), and XO().
Referenced by GStreamerImportFileHandle::Import(), AUPImportFileHandle::Import(), FFmpegImportFileHandle::Import(), FLACImportFileHandle::Import(), MP3ImportFileHandle::Import(), anonymous_namespace{ImportMP3_MPG123.cpp}::MP3ImportFileHandle::Import(), OggImportFileHandle::Import(), PCMImportFileHandle::Import(), and WavPackImportFileHandle::Import().
|
pure virtual |
Implemented in AUPImportFileHandle, FFmpegImportFileHandle, FLACImportFileHandle, GStreamerImportFileHandle, LOFImportFileHandle, MP3ImportFileHandle, anonymous_namespace{ImportMP3_MPG123.cpp}::MP3ImportFileHandle, OggImportFileHandle, PCMImportFileHandle, and WavPackImportFileHandle.
Referenced by CreateProgress().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
protected |
Build a wave track with appropriate format, which will not be narrower than the specified one.
Definition at line 69 of file ImportPlugin.cpp.
References ChooseFormat(), and WaveTrackFactory::Create().
Referenced by FFmpegImportFileHandle::Import(), FLACImportFileHandle::Import(), OggImportFileHandle::Import(), PCMImportFileHandle::Import(), WavPackImportFileHandle::Import(), MP3ImportFileHandle::OutputCB(), and anonymous_namespace{ImportMP3_MPG123.cpp}::MP3ImportFileHandle::SetupOutputFormat().
|
pure virtual |
|
protected |
Definition at line 158 of file ImportPlugin.h.
Referenced by CreateProgress(), AUPImportFileHandle::HandleImport(), AUPImportFileHandle::HandleProject(), AUPImportFileHandle::Import(), OggImportFileHandle::Import(), PCMImportFileHandle::Import(), FLACImportFileHandle::Init(), GStreamerImportFileHandle::Init(), AUPImportFileHandle::Open(), MP3ImportFileHandle::Open(), and anonymous_namespace{ImportMP3_MPG123.cpp}::MP3ImportFileHandle::Open().
|
protected |
Definition at line 159 of file ImportPlugin.h.
Referenced by CreateProgress(), GStreamerImportFileHandle::Import(), AUPImportFileHandle::Import(), anonymous_namespace{ImportMP3_MPG123.cpp}::MP3ImportFileHandle::Import(), OggImportFileHandle::Import(), PCMImportFileHandle::Import(), WavPackImportFileHandle::Import(), MP3ImportFileHandle::InputCB(), and FFmpegImportFileHandle::WriteData().