![]() |
Audacity 3.2.0
|
Classes | |
| struct | OggPacket |
Public Member Functions | |
| ~OpusExportProcessor () | |
| bool | Initialize (AudacityProject &project, const Parameters ¶meters, const wxFileNameWrapper &filename, double t0, double t1, bool selectedOnly, double sampleRate, unsigned channels, MixerOptions::Downmix *mixerSpec, const Tags *tags) override |
| Called before start processing. More... | |
| ExportResult | Process (ExportProcessorDelegate &delegate) override |
Public Member Functions inherited from ExportProcessor | |
| ExportProcessor (const ExportProcessor &)=delete | |
| ExportProcessor & | operator= (const ExportProcessor &)=delete |
| ExportProcessor ()=default | |
| virtual | ~ExportProcessor () |
| virtual bool | Initialize (AudacityProject &project, const Parameters ¶meters, const wxFileNameWrapper &filename, double t0, double t1, bool selectedOnly, double rate, unsigned channels, MixerOptions::Downmix *mixerSpec=nullptr, const Tags *tags=nullptr)=0 |
| Called before start processing. More... | |
| virtual ExportResult | Process (ExportProcessorDelegate &delegate)=0 |
Private Member Functions | |
| void | WriteOpusHeader () |
| void | WriteTags () |
| int32_t | GetBestFrameSize (int32_t samplesCount) const noexcept |
Private Attributes | |
| struct { | |
| TranslatableString status | |
| int32_t sampleRate {} | |
| double t0 {} | |
| double t1 {} | |
| unsigned numChannels {} | |
| wxFileNameWrapper fName | |
| wxFile outFile | |
| std::unique_ptr< Mixer > mixer | |
| std::unique_ptr< Tags > metadata | |
| struct OpusState { | |
| OpusMSEncoder * encoder {} | |
| int32_t frameSize {} | |
| int32_t sampleRateFactor {} | |
| uint16_t preskip {} | |
| uint8_t channelMapping {} | |
| uint8_t nbStreams {} | |
| uint8_t nbCoupled {} | |
| uint8_t streamMap [255] {} | |
| } opus | |
| struct OggState { | |
| ogg_stream_state stream | |
| OggPacket audioStreamPacket | |
| } ogg | |
| std::vector< float > encodeBuffer | |
| } | context |
Additional Inherited Members | |
Public Types inherited from ExportProcessor | |
| using | Parameters = std::vector< std::tuple< ExportOptionID, ExportValue > > |
Definition at line 234 of file ExportOpus.cpp.
| OpusExportProcessor::~OpusExportProcessor | ( | ) |
Definition at line 606 of file ExportOpus.cpp.
|
inlineprivatenoexcept |
Definition at line 434 of file ExportOpus.cpp.
References context, frameSize, and sampleRate.
Referenced by Process().
|
overridevirtual |
Called before start processing.
| project | Processor may access project data, take care to exclude any data race |
| parameters | A format-dependent set of parameters used in exporting |
| selectedOnly | Set to true if all tracks should be mixed, to false if only the selected tracks should be mixed and exported. |
| tags | A Tags object that will over-ride the one in *project and be used to tag the file that is exported. @retern Implementations may simply return false without any error reporting. This is to temporarily preserve old behavior, which is to be removed in the nearest future. |
Implements ExportProcessor.
Definition at line 611 of file ExportOpus.cpp.
References _, anonymous_namespace{ExportOpus.cpp}::VBRMode::CBR, context, ExportPluginHelpers::CreateMixer(), anonymous_namespace{ExportOpus.cpp}::VBRMode::CVBR, anonymous_namespace{ExportOpus.cpp}::FailExport(), floatSample, fName, Tags::Get(), anonymous_namespace{ExportOpus.cpp}::IsValidSampleRate(), metadata, nbCoupled, nbStreams, numChannels, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDApplication, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDBitRate, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDCutoff, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDFrameDuration, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDQuality, anonymous_namespace{ExportOpus.cpp}::OPUSOptionIDVBRMode, project, sampleRate, t0, t1, anonymous_namespace{ExportOpus.cpp}::VBRMode::VBR, WriteOpusHeader(), WriteTags(), and XO().
|
overridevirtual |
Implements ExportProcessor.
Definition at line 765 of file ExportOpus.cpp.
References context, staffpad::vo::copy(), Error, anonymous_namespace{ExportOpus.cpp}::FailExport(), frameSize, GetBestFrameSize(), min(), ExportProcessorDelegate::SetStatusString(), Success, ExportPluginHelpers::UpdateProgress(), and XO().
|
private |
Definition at line 520 of file ExportOpus.cpp.
References context, OpusExportProcessor::OggPacket::MarkBOS(), OpusExportProcessor::OggPacket::packet, and OpusExportProcessor::OggPacket::Write().
Referenced by Initialize().
|
private |
Definition at line 576 of file ExportOpus.cpp.
References context, key, TAG_YEAR, audacity::ToUTF8(), and OpusExportProcessor::OggPacket::Write().
Referenced by Initialize().
| OggPacket OpusExportProcessor::audioStreamPacket |
Definition at line 413 of file ExportOpus.cpp.
| uint8_t OpusExportProcessor::channelMapping {} |
Definition at line 366 of file ExportOpus.cpp.
| struct { ... } OpusExportProcessor::context |
Referenced by GetBestFrameSize(), Initialize(), Process(), WriteOpusHeader(), and WriteTags().
| std::vector<float> OpusExportProcessor::encodeBuffer |
Definition at line 428 of file ExportOpus.cpp.
| OpusMSEncoder* OpusExportProcessor::encoder {} |
Definition at line 361 of file ExportOpus.cpp.
| wxFileNameWrapper OpusExportProcessor::fName |
Definition at line 347 of file ExportOpus.cpp.
Referenced by Initialize().
| int32_t OpusExportProcessor::frameSize {} |
Definition at line 363 of file ExportOpus.cpp.
Referenced by GetBestFrameSize(), and Process().
| std::unique_ptr<Tags> OpusExportProcessor::metadata |
Definition at line 350 of file ExportOpus.cpp.
Referenced by Initialize().
| std::unique_ptr<Mixer> OpusExportProcessor::mixer |
Definition at line 349 of file ExportOpus.cpp.
| uint8_t OpusExportProcessor::nbCoupled {} |
Definition at line 368 of file ExportOpus.cpp.
Referenced by Initialize().
| uint8_t OpusExportProcessor::nbStreams {} |
Definition at line 367 of file ExportOpus.cpp.
Referenced by Initialize().
| unsigned OpusExportProcessor::numChannels {} |
Definition at line 346 of file ExportOpus.cpp.
Referenced by Initialize().
| struct { ... } ::OggState OpusExportProcessor::ogg |
| struct { ... } ::OpusState OpusExportProcessor::opus |
| wxFile OpusExportProcessor::outFile |
Definition at line 348 of file ExportOpus.cpp.
| uint16_t OpusExportProcessor::preskip {} |
Definition at line 365 of file ExportOpus.cpp.
| int32_t OpusExportProcessor::sampleRate {} |
Definition at line 342 of file ExportOpus.cpp.
Referenced by GetBestFrameSize(), and Initialize().
| int32_t OpusExportProcessor::sampleRateFactor {} |
Definition at line 364 of file ExportOpus.cpp.
| TranslatableString OpusExportProcessor::status |
Definition at line 341 of file ExportOpus.cpp.
| ogg_stream_state OpusExportProcessor::stream |
Definition at line 411 of file ExportOpus.cpp.
| uint8_t OpusExportProcessor::streamMap[255] {} |
Definition at line 369 of file ExportOpus.cpp.
| double OpusExportProcessor::t0 {} |
Definition at line 344 of file ExportOpus.cpp.
Referenced by Initialize().
| double OpusExportProcessor::t1 {} |
Definition at line 345 of file ExportOpus.cpp.
Referenced by Initialize().