mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 00:20:06 +02:00
Add FFmpeg format/codec to Export options panel
This commit is contained in:
parent
4806c02e81
commit
8d3e6eb2ad
@ -778,7 +778,9 @@ BEGIN_EVENT_TABLE(ExportFFmpegCustomOptions, wxPanelWrapper)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
ExportFFmpegCustomOptions::ExportFFmpegCustomOptions(wxWindow *parent, int WXUNUSED(format))
|
ExportFFmpegCustomOptions::ExportFFmpegCustomOptions(wxWindow *parent, int WXUNUSED(format))
|
||||||
: wxPanelWrapper(parent, wxID_ANY)
|
: wxPanelWrapper(parent, wxID_ANY),
|
||||||
|
mFormat(NULL),
|
||||||
|
mCodec(NULL)
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
PopulateOrExchange(S);
|
PopulateOrExchange(S);
|
||||||
@ -797,10 +799,19 @@ void ExportFFmpegCustomOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
{
|
{
|
||||||
S.StartHorizontalLay(wxCENTER);
|
S.StartHorizontalLay(wxCENTER);
|
||||||
{
|
{
|
||||||
S.StartHorizontalLay(wxCENTER, 0);
|
S.StartVerticalLay(wxCENTER, 0);
|
||||||
{
|
{
|
||||||
S.Id(OpenID).AddButton(XO("Open custom FFmpeg format options"));
|
S.Id(OpenID).AddButton(XO("Open custom FFmpeg format options"));
|
||||||
|
S.StartMultiColumn(2, wxCENTER);
|
||||||
|
{
|
||||||
|
S.AddPrompt(XO("Current Format:"));
|
||||||
|
mFormat = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
|
||||||
|
S.AddPrompt(XO("Current Codec:"));
|
||||||
|
mCodec = S.Style(wxTE_READONLY).AddTextBox({}, wxT(""), 25);
|
||||||
|
}
|
||||||
|
S.EndMultiColumn();
|
||||||
}
|
}
|
||||||
|
#
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
@ -810,6 +821,11 @@ void ExportFFmpegCustomOptions::PopulateOrExchange(ShuttleGui & S)
|
|||||||
///
|
///
|
||||||
bool ExportFFmpegCustomOptions::TransferDataToWindow()
|
bool ExportFFmpegCustomOptions::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
|
if (mFormat)
|
||||||
|
{
|
||||||
|
mFormat->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegFormat"), wxT("")));
|
||||||
|
mCodec->SetValue(gPrefs->Read(wxT("/FileFormats/FFmpegCodec"), wxT("")));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,6 +863,8 @@ void ExportFFmpegCustomOptions::OnOpen(wxCommandEvent & WXUNUSED(evt))
|
|||||||
|
|
||||||
ExportFFmpegOptions od(pWin);
|
ExportFFmpegOptions od(pWin);
|
||||||
od.ShowModal();
|
od.ShowModal();
|
||||||
|
|
||||||
|
TransferDataToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
FFmpegPreset::FFmpegPreset()
|
FFmpegPreset::FFmpegPreset()
|
||||||
|
@ -190,6 +190,8 @@ public:
|
|||||||
void OnOpen(wxCommandEvent & evt);
|
void OnOpen(wxCommandEvent & evt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
wxTextCtrl *mFormat;
|
||||||
|
wxTextCtrl *mCodec;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user