Audacity 3.2.0
|
An ImportFileHandle for MP3 data. More...
Public Member Functions | |
MP3ImportFileHandle (const FilePath &filename) | |
~MP3ImportFileHandle () | |
TranslatableString | GetFileDescription () override |
ByteCount | GetFileUncompressedBytes () override |
ProgressResult | Import (WaveTrackFactory *trackFactory, TrackHolders &outTracks, Tags *tags) override |
wxInt32 | GetStreamCount () override |
const TranslatableStrings & | GetStreamInfo () override |
void | SetStreamUsage (wxInt32 StreamID, bool Use) override |
Public Member Functions inherited from ImportFileHandle | |
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 |
Private Member Functions | |
bool | Open () |
void | CheckTags () |
void | CheckAPETags (bool atEnd) |
void | CheckID3V1Tags () |
void | CheckID3V2Tags (bool atEnd) |
void | CheckLyrics () |
bool | CheckMP3 () |
bool | FillBuffer () |
void | LoadID3 (Tags *tags) |
mad_flow | InputCB (struct mad_stream *stream) |
mad_flow | FilterCB (struct mad_stream const *stream, struct mad_frame *frame) |
mad_flow | OutputCB (struct mad_header const *header, struct mad_pcm *pcm) |
mad_flow | ErrorCB (struct mad_stream *stream, struct mad_frame *frame) |
Static Private Member Functions | |
static mad_flow | input_cb (void *that, struct mad_stream *stream) |
static mad_flow | filter_cb (void *that, struct mad_stream const *stream, struct mad_frame *frame) |
static mad_flow | output_cb (void *that, struct mad_header const *header, struct mad_pcm *pcm) |
static mad_flow | error_cb (void *that, struct mad_stream *stream, struct mad_frame *frame) |
Private Attributes | |
mad_decoder | mDecoder |
wxFile | mFile |
wxFileOffset | mFilePos |
wxFileOffset | mFileLen |
unsigned char | mInputBuffer [INPUT_BUFFER_SIZE+MAD_BUFFER_GUARD] |
int | mInputBufferLen |
WaveTrackFactory * | mTrackFactory |
NewChannelGroup | mChannels |
unsigned | mNumChannels |
ProgressResult | mUpdateResult |
int | mDelay |
int | mPadding |
bool | mHaveID3 |
friend | MP3ImportPlugin |
Additional Inherited Members | |
Public Types inherited from ImportFileHandle | |
using | ProgressResult = BasicUI::ProgressResult |
using | ByteCount = unsigned long long |
Static Public Member Functions inherited from ImportFileHandle | |
static sampleFormat | ChooseFormat (sampleFormat effectiveFormat) |
Choose appropriate format, which will not be narrower than the specified one. More... | |
Protected Member Functions inherited from ImportFileHandle | |
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 inherited from ImportFileHandle | |
FilePath | mFilename |
std::unique_ptr< ProgressDialog > | mProgress |
An ImportFileHandle for MP3 data.
Audacity has finally moved to using a single mp3 library on all platforms! It is the high performance, beautifully written libmad (mpeg audio decoder). Finally there is harmony in the mp3 universe.
Much of this source code is based on 'minimad.c' as distributed with libmad.
Definition at line 104 of file ImportMP3_MAD.cpp.
MP3ImportFileHandle::MP3ImportFileHandle | ( | const FilePath & | filename | ) |
Definition at line 219 of file ImportMP3_MAD.cpp.
MP3ImportFileHandle::~MP3ImportFileHandle | ( | ) |
Definition at line 224 of file ImportMP3_MAD.cpp.
|
private |
Definition at line 384 of file ImportMP3_MAD.cpp.
References mFile, mFileLen, mFilePos, and mInputBuffer.
Referenced by CheckTags().
|
private |
Definition at line 426 of file ImportMP3_MAD.cpp.
References mFile, mFileLen, mHaveID3, and mInputBuffer.
Referenced by CheckTags().
|
private |
Definition at line 519 of file ImportMP3_MAD.cpp.
References mFile, mFileLen, mFilePos, mHaveID3, and mInputBuffer.
Referenced by CheckTags().
|
private |
Definition at line 453 of file ImportMP3_MAD.cpp.
References mFile, mFileLen, and mInputBuffer.
Referenced by CheckTags().
|
private |
Definition at line 561 of file ImportMP3_MAD.cpp.
References FillBuffer(), mFile, mFilePos, mInputBuffer, and mInputBufferLen.
Referenced by Open().
|
private |
Definition at line 362 of file ImportMP3_MAD.cpp.
References CheckAPETags(), CheckID3V1Tags(), CheckID3V2Tags(), and CheckLyrics().
Referenced by Open().
|
staticprivate |
Definition at line 1077 of file ImportMP3_MAD.cpp.
References ErrorCB(), and MakeSimpleGuard().
Referenced by Import().
|
private |
Definition at line 1089 of file ImportMP3_MAD.cpp.
References BasicUI::DefaultCaption(), mFileLen, mFilePos, mNumChannels, BasicUI::ShowErrorDialog(), and XO().
Referenced by error_cb().
|
private |
Definition at line 632 of file ImportMP3_MAD.cpp.
References INPUT_BUFFER_SIZE, mFile, mFileLen, mFilePos, mInputBuffer, and mInputBufferLen.
Referenced by CheckMP3(), and InputCB().
|
staticprivate |
Definition at line 904 of file ImportMP3_MAD.cpp.
References FilterCB(), and MakeSimpleGuard().
Referenced by Import().
|
private |
Definition at line 916 of file ImportMP3_MAD.cpp.
References MAD_DELAY, mDecoder, mDelay, and mPadding.
Referenced by filter_cb().
|
overridevirtual |
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 233 of file ImportMP3_MAD.cpp.
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 239 of file ImportMP3_MAD.cpp.
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 244 of file ImportMP3_MAD.cpp.
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 254 of file ImportMP3_MAD.cpp.
References RefreshCode::Cancelled, ImportFileHandle::CreateProgress(), error_cb(), filter_cb(), input_cb(), LoadID3(), MAD_DELAY, mChannels, mDecoder, mDelay, mNumChannels, mPadding, mTrackFactory, mUpdateResult, output_cb(), and BasicUI::Success.
|
staticprivate |
Definition at line 851 of file ImportMP3_MAD.cpp.
References InputCB(), and MakeSimpleGuard().
Referenced by Import().
|
private |
Definition at line 862 of file ImportMP3_MAD.cpp.
References FillBuffer(), mFileLen, mFilePos, mInputBuffer, mInputBufferLen, ImportFileHandle::mProgress, mUpdateResult, and BasicUI::Success.
Referenced by input_cb().
|
private |
Definition at line 661 of file ImportMP3_MAD.cpp.
References Tags::Clear(), Tags::GetGenre(), Tags::GetTag(), Tags::HasTag(), mFile, Tags::SetTag(), TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_GENRE, TAG_TITLE, TAG_TRACK, TAG_YEAR, UTF8CTOWX, and wxT().
Referenced by Import().
|
private |
Definition at line 323 of file ImportMP3_MAD.cpp.
References CheckMP3(), CheckTags(), mFile, mFileLen, ImportFileHandle::mFilename, mFilePos, mHaveID3, and mInputBufferLen.
|
staticprivate |
Definition at line 1012 of file ImportMP3_MAD.cpp.
References MakeSimpleGuard(), and OutputCB().
Referenced by Import().
|
private |
Definition at line 1024 of file ImportMP3_MAD.cpp.
References floatSample, mChannels, mNumChannels, mTrackFactory, and ImportFileHandle::NewWaveTrack().
Referenced by output_cb().
|
overridevirtual |
Implements ImportFileHandle.
|
private |
Definition at line 160 of file ImportMP3_MAD.cpp.
Referenced by Import(), and OutputCB().
|
private |
Definition at line 150 of file ImportMP3_MAD.cpp.
Referenced by FilterCB(), and Import().
|
private |
Definition at line 165 of file ImportMP3_MAD.cpp.
Referenced by FilterCB(), and Import().
|
private |
Definition at line 152 of file ImportMP3_MAD.cpp.
Referenced by CheckAPETags(), CheckID3V1Tags(), CheckID3V2Tags(), CheckLyrics(), CheckMP3(), FillBuffer(), LoadID3(), and Open().
|
private |
Definition at line 154 of file ImportMP3_MAD.cpp.
Referenced by CheckAPETags(), CheckID3V1Tags(), CheckID3V2Tags(), CheckLyrics(), ErrorCB(), FillBuffer(), InputCB(), and Open().
|
private |
Definition at line 153 of file ImportMP3_MAD.cpp.
Referenced by CheckAPETags(), CheckID3V2Tags(), CheckMP3(), ErrorCB(), FillBuffer(), InputCB(), and Open().
|
private |
Definition at line 168 of file ImportMP3_MAD.cpp.
Referenced by CheckID3V1Tags(), CheckID3V2Tags(), and Open().
|
private |
Definition at line 156 of file ImportMP3_MAD.cpp.
Referenced by CheckAPETags(), CheckID3V1Tags(), CheckID3V2Tags(), CheckLyrics(), CheckMP3(), FillBuffer(), and InputCB().
|
private |
Definition at line 157 of file ImportMP3_MAD.cpp.
Referenced by CheckMP3(), FillBuffer(), InputCB(), and Open().
|
private |
Definition at line 161 of file ImportMP3_MAD.cpp.
Referenced by ErrorCB(), Import(), and OutputCB().
|
private |
Definition at line 170 of file ImportMP3_MAD.cpp.
|
private |
Definition at line 166 of file ImportMP3_MAD.cpp.
Referenced by FilterCB(), and Import().
|
private |
Definition at line 159 of file ImportMP3_MAD.cpp.
Referenced by Import(), and OutputCB().
|
private |
Definition at line 163 of file ImportMP3_MAD.cpp.