Audacity 3.2.0
Public Member Functions | List of all members
ExportPlugin Class Referenceabstract

#include <ExportPlugin.h>

Inheritance diagram for ExportPlugin:
[legend]

Public Member Functions

 ExportPlugin ()
 
virtual ~ExportPlugin ()
 
virtual int GetFormatCount () const =0
 
virtual FormatInfo GetFormatInfo (int index) const =0
 Returns FormatInfo structure for given index if it's valid, or a default one. FormatInfo::format isn't guaranteed to be unique. More...
 
virtual std::unique_ptr< ExportOptionsEditorCreateOptionsEditor (int formatIndex, ExportOptionsEditor::Listener *listener) const =0
 Creates format-dependent options editor, that is used to create a valid set of parameters to be used in exporting. More...
 
virtual std::vector< std::string > GetMimeTypes (int formatIndex) const
 
virtual bool ParseConfig (int formatIndex, const rapidjson::Value &config, ExportProcessor::Parameters &parameters) const
 Attempt to parse configuration JSON object and produce a suitable set of parameters. Configuration is format dependent. More...
 
virtual bool CheckFileName (wxFileName &filename, int format=0) const
 
virtual std::unique_ptr< ExportProcessorCreateProcessor (int format) const =0
 

Detailed Description

Definition at line 128 of file ExportPlugin.h.

Constructor & Destructor Documentation

◆ ExportPlugin()

ExportPlugin::ExportPlugin ( )
default

◆ ~ExportPlugin()

ExportPlugin::~ExportPlugin ( )
virtualdefault

Member Function Documentation

◆ CheckFileName()

bool ExportPlugin::CheckFileName ( wxFileName &  filename,
int  format = 0 
) const
virtual

Reimplemented in ExportMP3, and ExportFFmpeg.

Definition at line 82 of file ExportPlugin.cpp.

83{
84 return true;
85}

◆ CreateOptionsEditor()

virtual std::unique_ptr< ExportOptionsEditor > ExportPlugin::CreateOptionsEditor ( int  formatIndex,
ExportOptionsEditor::Listener listener 
) const
pure virtual

Creates format-dependent options editor, that is used to create a valid set of parameters to be used in exporting.

Parameters
listenerOption listener object that could be used by the editor to report on option changes.

Implemented in ExportFFmpeg, ExportCL, ExportMP2, ExportOGG, ExportOpus, ExportPCM, ExportWavPack, ExportFLAC, and ExportMP3.

Referenced by ExportOptionsHandler::ExportOptionsHandler().

Here is the caller graph for this function:

◆ CreateProcessor()

virtual std::unique_ptr< ExportProcessor > ExportPlugin::CreateProcessor ( int  format) const
pure virtual
Parameters
formatControl which of the multiple formats this exporter is capable of exporting should be used. Used where a single export plug-in handles a number of related formats, but they have separate entries in the Format drop-down list box. For example, the options to export to "Other PCM", "AIFF 16 Bit" and "WAV 16 Bit" are all the same libsndfile export plug-in, but with subformat set to 0, 1, and 2 respectively.

Implemented in ExportCL, ExportFFmpeg, ExportFLAC, ExportMP3, ExportOGG, ExportOpus, ExportPCM, ExportWavPack, and ExportMP2.

Referenced by ExportTaskBuilder::Build().

Here is the caller graph for this function:

◆ GetFormatCount()

virtual int ExportPlugin::GetFormatCount ( ) const
pure virtual

◆ GetFormatInfo()

virtual FormatInfo ExportPlugin::GetFormatInfo ( int  index) const
pure virtual

Returns FormatInfo structure for given index if it's valid, or a default one. FormatInfo::format isn't guaranteed to be unique.

Parameters
indexShould not exceed the number of formats provided by GetFormatCount()

Implemented in ExportFFmpeg, ExportPCM, ExportCL, ExportFLAC, ExportMP2, ExportMP3, ExportOGG, ExportOpus, and ExportWavPack.

Referenced by TimerRecordExportDialog::OnOK(), ExportFilePanel::OnOptionsHandlerEvent(), ExportAudioDialog::UpdateLabelExportSettings(), ExportAudioDialog::UpdateTrackExportSettings(), and ExportFilePanel::ValidateAndFixExt().

Here is the caller graph for this function:

◆ GetMimeTypes()

std::vector< std::string > ExportPlugin::GetMimeTypes ( int  formatIndex) const
virtual
Returns
Mime type(s) supported by the format.

Reimplemented in ExportPCM, ExportFLAC, ExportMP3, ExportOpus, and ExportWavPack.

Definition at line 72 of file ExportPlugin.cpp.

73{
74 return {};
75}

◆ ParseConfig()

bool ExportPlugin::ParseConfig ( int  formatIndex,
const rapidjson::Value &  config,
ExportProcessor::Parameters parameters 
) const
virtual

Attempt to parse configuration JSON object and produce a suitable set of parameters. Configuration is format dependent.

Parameters
formatIndexInternal format index
configConfiguration JSON object
parametersWhere to put parameters
Returns
Whether the parsing was successful

Reimplemented in ExportPCM, ExportMP3, ExportWavPack, and ExportFLAC.

Definition at line 77 of file ExportPlugin.cpp.

78{
79 return false;
80}

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