Audacity 3.2.0
Classes | Macros | Functions | Variables
ExportFFmpeg.cpp File Reference
#include "../FFmpeg.h"
#include "FFmpegFunctions.h"
#include <wx/choice.h>
#include <wx/log.h>
#include <wx/textctrl.h>
#include <wx/listbox.h>
#include <wx/window.h>
#include <wx/spinctrl.h>
#include <wx/combobox.h>
#include "Mix.h"
#include "ProjectRate.h"
#include "ProjectSettings.h"
#include "Tags.h"
#include "Track.h"
#include "AudacityMessageBox.h"
#include "ProgressDialog.h"
#include "wxFileNameWrapper.h"
#include "Export.h"
#include "ExportFFmpegDialogs.h"
#include "SelectFile.h"
Include dependency graph for ExportFFmpeg.cpp:

Go to the source code of this file.

Classes

class  ExportFFmpeg
 Controlling class for FFmpeg exporting. Creates the options dialog of the appropriate type, adds tags and invokes the export function. More...
 

Macros

#define FFMPEG_AUTO_RESAMPLE   1
 
#define MAX_AUDIO_PACKET_SIZE   (128 * 1024)
 

Functions

static bool CheckFFmpegPresence (bool quiet=false)
 
static int AdjustFormatIndex (int format)
 
void AddStringTagUTF8 (char field[], int size, wxString value)
 
void AddStringTagANSI (char field[], int size, wxString value)
 

Variables

static Exporter::RegisteredExportPlugin sRegisteredPlugin
 

Macro Definition Documentation

◆ FFMPEG_AUTO_RESAMPLE

#define FFMPEG_AUTO_RESAMPLE   1

Definition at line 56 of file ExportFFmpeg.cpp.

◆ MAX_AUDIO_PACKET_SIZE

#define MAX_AUDIO_PACKET_SIZE   (128 * 1024)

Function Documentation

◆ AddStringTagANSI()

void AddStringTagANSI ( char  field[],
int  size,
wxString  value 
)

Definition at line 1196 of file ExportFFmpeg.cpp.

1197{
1198 memset(field,0,size);
1199 memcpy(field,value.mb_str(),(int)strlen(value.mb_str()) > size -1 ? size -1 : strlen(value.mb_str()));
1200}
#define field(n, t)
Definition: ImportAUP.cpp:169

References field, and size.

◆ AddStringTagUTF8()

void AddStringTagUTF8 ( char  field[],
int  size,
wxString  value 
)

Definition at line 1190 of file ExportFFmpeg.cpp.

1191{
1192 memset(field,0,size);
1193 memcpy(field,value.ToUTF8(),(int)strlen(value.ToUTF8()) > size -1 ? size -1 : strlen(value.ToUTF8()));
1194}

References field, and size.

◆ AdjustFormatIndex()

static int AdjustFormatIndex ( int  format)
static

Definition at line 76 of file ExportFFmpeg.cpp.

77{
78 int subFormat = -1;
79 for (int i = 0; i <= FMT_OTHER; i++)
80 {
81 if (ExportFFmpegOptions::fmts[i].compiledIn) subFormat++;
82 if (subFormat == format || i == FMT_OTHER)
83 {
84 subFormat = i;
85 break;
86 }
87 }
88 return subFormat;
89}
@ FMT_OTHER
int format
Definition: ExportPCM.cpp:53
static ExposedFormat fmts[]
List of export types.

References FMT_OTHER, ExportFFmpegOptions::fmts, and format.

Referenced by ExportFFmpeg::Export(), and ExportFFmpeg::OptionsCreate().

Here is the caller graph for this function:

◆ CheckFFmpegPresence()

static bool CheckFFmpegPresence ( bool  quiet = false)
static

Definition at line 58 of file ExportFFmpeg.cpp.

59{
60 bool result = true;
61 auto ffmpeg = FFmpegFunctions::Load();
62
63 if (!ffmpeg)
64 {
65 if (!quiet)
66 {
68"Properly configured FFmpeg is required to proceed.\nYou can configure it at Preferences > Libraries."));
69 }
70 result = false;
71 }
72
73 return result;
74}
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
XO("Cut/Copy/Paste")
static std::shared_ptr< FFmpegFunctions > Load(bool fromUserPathOnly=false)

References AudacityMessageBox(), FFmpegFunctions::Load(), and XO().

Referenced by ExportFFmpeg::CheckFileName(), and ExportFFmpeg::Export().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sRegisteredPlugin

Exporter::RegisteredExportPlugin sRegisteredPlugin
static
Initial value:
{ "FFmpeg",
[]{ return std::make_unique< ExportFFmpeg >(); }
}

Definition at line 1385 of file ExportFFmpeg.cpp.