Audacity  2.2.2
Public Types | Public Member Functions | Protected Attributes | List of all members
ImportFileHandle Class Referenceabstract

An ImportFileHandle for data. More...

#include <ImportPlugin.h>

Inheritance diagram for ImportFileHandle:
LOFImportFileHandle PCMImportFileHandle

Public Types

using ByteCount = unsigned long long
 

Public Member Functions

 ImportFileHandle (const wxString &filename)
 
virtual ~ImportFileHandle ()
 
void CreateProgress ()
 
virtual wxString GetFileDescription ()=0
 
virtual ByteCount GetFileUncompressedBytes ()=0
 
virtual ProgressResult Import (TrackFactory *trackFactory, TrackHolders &outTracks, Tags *tags)=0
 
virtual wxInt32 GetStreamCount ()=0
 
virtual const wxArrayString & GetStreamInfo ()=0
 
virtual void SetStreamUsage (wxInt32 StreamID, bool Use)=0
 

Protected Attributes

wxString mFilename
 
Maybe< ProgressDialogmProgress
 

Detailed Description

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 119 of file ImportPlugin.h.

Member Typedef Documentation

using ImportFileHandle::ByteCount = unsigned long long

Definition at line 151 of file ImportPlugin.h.

Constructor & Destructor Documentation

ImportFileHandle::ImportFileHandle ( const wxString &  filename)
inline

Definition at line 122 of file ImportPlugin.h.

123  : mFilename(filename),
124  mProgress{}
125  {
126  }
Maybe< ProgressDialog > mProgress
Definition: ImportPlugin.h:174
wxString mFilename
Definition: ImportPlugin.h:173
virtual ImportFileHandle::~ImportFileHandle ( )
inlinevirtual

Definition at line 128 of file ImportPlugin.h.

129  {
130  }

Member Function Documentation

void ImportFileHandle::CreateProgress ( )
inline

Definition at line 134 of file ImportPlugin.h.

References _(), Maybe< X >::create(), GetFileDescription(), mFilename, and mProgress.

Referenced by PCMImportFileHandle::Import().

135  {
136  wxFileName ff(mFilename);
137  wxString title;
138 
139  title.Printf(_("Importing %s"), GetFileDescription());
140  mProgress.create(title, ff.GetFullName());
141  }
virtual wxString GetFileDescription()=0
Maybe< ProgressDialog > mProgress
Definition: ImportPlugin.h:174
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxString mFilename
Definition: ImportPlugin.h:173
void create(Args &&...args)
Definition: MemoryX.h:251
virtual wxString ImportFileHandle::GetFileDescription ( )
pure virtual

Implemented in LOFImportFileHandle, and PCMImportFileHandle.

Referenced by CreateProgress().

virtual ByteCount ImportFileHandle::GetFileUncompressedBytes ( )
pure virtual
virtual wxInt32 ImportFileHandle::GetStreamCount ( )
pure virtual
virtual const wxArrayString& ImportFileHandle::GetStreamInfo ( )
pure virtual
virtual ProgressResult ImportFileHandle::Import ( TrackFactory trackFactory,
TrackHolders outTracks,
Tags tags 
)
pure virtual
virtual void ImportFileHandle::SetStreamUsage ( wxInt32  StreamID,
bool  Use 
)
pure virtual

Member Data Documentation

wxString ImportFileHandle::mFilename
protected

Definition at line 173 of file ImportPlugin.h.

Referenced by CreateProgress(), and PCMImportFileHandle::Import().

Maybe<ProgressDialog> ImportFileHandle::mProgress
protected

Definition at line 174 of file ImportPlugin.h.

Referenced by CreateProgress(), and PCMImportFileHandle::Import().


The documentation for this class was generated from the following file: