![]() |
Audacity 3.2.0
|
An ImportFileHandle for AUP files (pre-AUP3) More...
Classes | |
struct | fileinfo |
struct | node |
Public Member Functions | |
AUPImportFileHandle (const FilePath &name, AudacityProject *project) | |
~AUPImportFileHandle () | |
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 WXUNUSED(StreamID), bool WXUNUSED(Use)) override |
bool | Open () |
![]() | |
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 |
![]() | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
Private Types | |
using | stack = std::vector< struct node > |
using | BlockFileMap = std::map< wxString, std::pair< FilePath, std::shared_ptr< SampleBlock > > > |
Private Attributes | |
AudacityProject & | mProject |
Tags * | mTags |
struct { | |
} | mProjectAttrs |
std::vector< fileinfo > | mFiles |
sampleCount | mTotalSamples |
sampleFormat | mFormat |
unsigned long | mNumChannels |
stack | mHandlers |
std::string | mParentTag |
std::string | mCurrentTag |
AttributesList | mAttrs |
wxFileName | mProjDir |
BlockFileMap | mFileMap |
WaveTrack * | mWaveTrack |
WaveClip * | mClip |
std::vector< WaveClip * > | mClips |
ProgressResult | mUpdateResult |
TranslatableString | mErrorMsg |
Additional Inherited Members | |
![]() | |
using | ProgressResult = BasicUI::ProgressResult |
using | ByteCount = unsigned long long |
![]() | |
static sampleFormat | ChooseFormat (sampleFormat effectiveFormat) |
Choose appropriate format, which will not be narrower than the specified one. More... | |
![]() | |
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... | |
![]() | |
FilePath | mFilename |
std::unique_ptr< ProgressDialog > | mProgress |
An ImportFileHandle for AUP files (pre-AUP3)
Definition at line 88 of file ImportAUP.cpp.
|
private |
Definition at line 213 of file ImportAUP.cpp.
|
private |
Definition at line 119 of file ImportAUP.cpp.
AUPImportFileHandle::AUPImportFileHandle | ( | const FilePath & | name, |
AudacityProject * | project | ||
) |
Definition at line 284 of file ImportAUP.cpp.
AUPImportFileHandle::~AUPImportFileHandle | ( | ) |
Definition at line 291 of file ImportAUP.cpp.
|
private |
Definition at line 1409 of file ImportAUP.cpp.
References AUPImportFileHandle::fileinfo::audioFile, AUPImportFileHandle::fileinfo::blockFile, AUPImportFileHandle::fileinfo::channel, AUPImportFileHandle::fileinfo::clip, format, AUPImportFileHandle::fileinfo::format, AUPImportFileHandle::fileinfo::len, mClip, mFiles, mTotalSamples, mWaveTrack, AUPImportFileHandle::fileinfo::origin, and AUPImportFileHandle::fileinfo::track.
Referenced by HandlePCMAliasBlockFile(), HandleSilentBlockFile(), and HandleSimpleBlockFile().
|
private |
Definition at line 1449 of file ImportAUP.cpp.
References AddSilence(), sampleCount::as_long_long(), sampleCount::as_size_t(), CopySamples(), floatSample, format, gHighQualityDither, int16Sample, int24Sample, mClip, mFileMap, mWaveTrack, SampleBuffer::ptr(), WaveTrack::RightmostOrNewClip(), SetWarning(), sf_subtype_is_integer(), sf_subtype_more_than_16_bits(), and XO().
Referenced by Import().
|
private |
Definition at line 1431 of file ImportAUP.cpp.
References WaveTrack::GetEndTime(), WaveClip::GetPlayEndTime(), WaveTrack::InsertSilence(), WaveClip::InsertSilence(), SampleTrack::LongSamplesToTime(), mClip, and mWaveTrack.
Referenced by AddSamples(), and Import().
|
overridevirtual |
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 300 of file ImportAUP.cpp.
|
overridevirtual |
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 494 of file ImportAUP.cpp.
|
private |
Definition at line 1068 of file ImportAUP.cpp.
References cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, AUPImportFileHandle::node::handler, Envelope::HandleXMLChild(), mCurrentTag, mHandlers, and mParentTag.
Referenced by HandleXMLTag().
|
private |
Definition at line 1036 of file ImportAUP.cpp.
References TimeTrack::GetEnvelope(), WaveClip::GetEnvelope(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, AUPImportFileHandle::node::handler, mHandlers, mParentTag, mWaveTrack, and WaveTrack::RightmostOrNewClip().
Referenced by HandleXMLTag().
|
private |
Definition at line 1334 of file ImportAUP.cpp.
References Track::Any(), TrackList::Get(), ProjectFileManager::Get(), GuardedCall(), ProjectFileManager::Import(), XMLValueChecker::IsGoodFileName(), XMLValueChecker::IsGoodPathName(), mAttrs, ImportFileHandle::mFilename, mProject, and wxT().
Referenced by HandleXMLTag().
|
private |
Definition at line 999 of file ImportAUP.cpp.
References cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, mHandlers, and mParentTag.
Referenced by HandleXMLTag().
|
private |
Definition at line 864 of file ImportAUP.cpp.
References TrackList::Add(), TrackList::Get(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, and mProject.
Referenced by HandleXMLTag().
|
private |
Definition at line 871 of file ImportAUP.cpp.
References TrackList::Add(), AudacityMessageBox(), TrackList::Get(), GetProjectFrame(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, mProject, and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1251 of file ImportAUP.cpp.
References AddFile(), anonymous_namespace{ImportAUP.cpp}::CaseInsensitiveEquals(), XMLValueChecker::IsGoodFileName(), XMLValueChecker::IsGoodPathName(), XMLValueChecker::IsGoodPathString(), mAttrs, mFormat, mProjDir, name, SetError(), SetWarning(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 670 of file ImportAUP.cpp.
References AudacityMessageBox(), fn, ProjectFileManager::Get(), GetProjectFrame(), mAttrs, mFileMap, ImportFileHandle::mFilename, mProjDir, mProject, set, SetError(), wxT(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1087 of file ImportAUP.cpp.
References Sequence::ConvertToSampleFormat(), WaveClip::GetSequence(), AUPImportFileHandle::node::handler, HandleWaveClip(), Sequence::IsValidSampleFormat(), mAttrs, mClip, mFormat, mHandlers, mParentTag, SetError(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1222 of file ImportAUP.cpp.
References AddFile(), mAttrs, mFormat, SetError(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1175 of file ImportAUP.cpp.
References AddFile(), anonymous_namespace{ImportAUP.cpp}::CaseInsensitiveEquals(), XMLValueChecker::IsGoodFileString(), mAttrs, mFileMap, mFormat, SetError(), SetWarning(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 961 of file ImportAUP.cpp.
References mAttrs, mParentTag, mTags, Tags::SetTag(), and wxT().
Referenced by HandleXMLTag().
|
private |
Definition at line 925 of file ImportAUP.cpp.
References mAttrs, mTags, Tags::SetTag(), and wxT().
Referenced by HandleXMLTag().
|
private |
Definition at line 888 of file ImportAUP.cpp.
References TrackList::Add(), AudacityMessageBox(), TrackList::Get(), GetProjectFrame(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, mProject, and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1152 of file ImportAUP.cpp.
References mAttrs, SetError(), and XO().
Referenced by HandleXMLTag().
|
private |
Definition at line 1012 of file ImportAUP.cpp.
References WaveTrack::CreateClip(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, AUPImportFileHandle::node::handler, WaveClip::HandleXMLChild(), mClip, mClips, mCurrentTag, mHandlers, and mParentTag.
Referenced by HandleSequence(), and HandleXMLTag().
|
private |
Definition at line 911 of file ImportAUP.cpp.
References TrackList::Add(), TrackList::Get(), WaveTrackFactory::Get(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, mClip, mProject, and mWaveTrack.
Referenced by HandleXMLTag().
|
overrideprivatevirtual |
|
overrideprivate |
Definition at line 547 of file ImportAUP.cpp.
References AUPImportFileHandle::node::handler, XMLTagHandler::HandleXMLEndTag(), mClip, mCurrentTag, mHandlers, mParentTag, mUpdateResult, AUPImportFileHandle::node::parent, BasicUI::Success, and AUPImportFileHandle::node::tag.
|
overrideprivatevirtual |
Implements XMLTagHandler.
Definition at line 576 of file ImportAUP.cpp.
References HandleControlPoint(), HandleEnvelope(), HandleImport(), HandleLabel(), HandleLabelTrack(), HandleNoteTrack(), HandlePCMAliasBlockFile(), HandleProject(), cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler, HandleSequence(), HandleSilentBlockFile(), HandleSimpleBlockFile(), HandleTag(), HandleTags(), HandleTimeTrack(), HandleWaveBlock(), HandleWaveClip(), HandleWaveTrack(), mAttrs, mCurrentTag, mHandlers, mParentTag, mUpdateResult, SetError(), BasicUI::Success, and XO().
|
overridevirtual |
Implements ImportFileHandle.
Definition at line 306 of file ImportAUP.cpp.
References AddSamples(), AddSilence(), sampleCount::as_long_long(), AudacityMessageBox(), ImportFileHandle::CreateProgress(), TranslatableString::empty(), ProjectHistory::Get(), ProjectRate::Get(), ProjectSnap::Get(), ViewInfo::Get(), TrackList::Get(), ProjectSelectionManager::Get(), ProjectSettings::Get(), XMLFileReader::GetErrorStr(), GetProjectFrame(), NumericConverterFormats::Lookup(), mClip, mClips, mErrorMsg, ImportFileHandle::mFilename, mFiles, ImportFileHandle::mProgress, mProject, mProjectAttrs, mTags, mTotalSamples, mUpdateResult, mWaveTrack, NumericConverterType_BANDWIDTH(), NumericConverterType_FREQUENCY(), NumericConverterType_TIME(), XMLFileReader::Parse(), FormatterContext::ProjectContext(), ProjectRate::SetRate(), ProjectSnap::SetSnapMode(), settings(), SNAP_NEAREST, SNAP_OFF, BasicUI::Success, and XO().
bool AUPImportFileHandle::Open | ( | ) |
Definition at line 504 of file ImportAUP.cpp.
References AudacityMessageBox(), GetProjectFrame(), ImportFileHandle::mFilename, mProject, wxT(), and XO().
|
private |
Definition at line 1660 of file ImportAUP.cpp.
References TranslatableString::Debug(), TranslatableString::empty(), mErrorMsg, mUpdateResult, and BasicUI::Success.
Referenced by HandlePCMAliasBlockFile(), HandleProject(), HandleSequence(), HandleSilentBlockFile(), HandleSimpleBlockFile(), HandleWaveBlock(), and HandleXMLTag().
|
override |
Definition at line 500 of file ImportAUP.cpp.
|
private |
Definition at line 1675 of file ImportAUP.cpp.
References TranslatableString::Debug(), TranslatableString::empty(), and mErrorMsg.
Referenced by AddSamples(), HandlePCMAliasBlockFile(), and HandleSimpleBlockFile().
|
private |
Definition at line 210 of file ImportAUP.cpp.
Referenced by HandleImport(), HandlePCMAliasBlockFile(), HandleProject(), HandleSequence(), HandleSilentBlockFile(), HandleSimpleBlockFile(), HandleTag(), HandleTags(), HandleWaveBlock(), and HandleXMLTag().
|
private |
Definition at line 218 of file ImportAUP.cpp.
Referenced by AddFile(), AddSamples(), AddSilence(), HandleSequence(), HandleWaveClip(), HandleWaveTrack(), HandleXMLEndTag(), and Import().
|
private |
Definition at line 219 of file ImportAUP.cpp.
Referenced by HandleWaveClip(), and Import().
|
private |
Definition at line 209 of file ImportAUP.cpp.
Referenced by HandleControlPoint(), HandleWaveClip(), HandleXMLEndTag(), and HandleXMLTag().
|
private |
Definition at line 222 of file ImportAUP.cpp.
Referenced by Import(), SetError(), and SetWarning().
|
private |
Definition at line 215 of file ImportAUP.cpp.
Referenced by AddSamples(), HandleProject(), and HandleSimpleBlockFile().
|
private |
Definition at line 201 of file ImportAUP.cpp.
|
private |
Definition at line 204 of file ImportAUP.cpp.
Referenced by HandlePCMAliasBlockFile(), HandleSequence(), HandleSilentBlockFile(), and HandleSimpleBlockFile().
|
private |
Definition at line 207 of file ImportAUP.cpp.
Referenced by HandleControlPoint(), HandleEnvelope(), HandleLabel(), HandleSequence(), HandleWaveClip(), HandleXMLEndTag(), and HandleXMLTag().
|
private |
Definition at line 205 of file ImportAUP.cpp.
|
private |
Definition at line 208 of file ImportAUP.cpp.
Referenced by HandleControlPoint(), HandleEnvelope(), HandleLabel(), HandleSequence(), HandleTag(), HandleWaveClip(), HandleXMLEndTag(), and HandleXMLTag().
|
private |
Definition at line 212 of file ImportAUP.cpp.
Referenced by HandlePCMAliasBlockFile(), and HandleProject().
|
private |
Definition at line 164 of file ImportAUP.cpp.
Referenced by HandleImport(), HandleLabelTrack(), HandleNoteTrack(), HandleProject(), HandleTimeTrack(), HandleWaveTrack(), Import(), and Open().
struct { ... } AUPImportFileHandle::mProjectAttrs |
Referenced by Import().
|
private |
Definition at line 165 of file ImportAUP.cpp.
Referenced by HandleTag(), HandleTags(), and Import().
|
private |
Definition at line 202 of file ImportAUP.cpp.
|
private |
Definition at line 221 of file ImportAUP.cpp.
Referenced by HandleXMLEndTag(), HandleXMLTag(), Import(), and SetError().
|
private |
Definition at line 217 of file ImportAUP.cpp.
Referenced by AddFile(), AddSamples(), AddSilence(), HandleEnvelope(), HandleWaveTrack(), and Import().