Audacity 3.2.0
FFmpegPresets.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 FFmpegPresets.h
6
7 Audacity(R) is copyright (c) 1999-2010 Audacity Team.
8 License: GPL v2 or later. See License.txt.
9
10 LRN
11
12 Vitaly Sverchinsky split from ExportFFmpegDialogs.h
13
14**********************************************************************/
15
16#pragma once
17
18#include <unordered_map>
19#include "XMLTagHandler.h"
20
22{
23public:
26
27 wxString mPresetName;
28 wxArrayString mControlState;
29};
30
31using FFmpegPresetMap = std::unordered_map<wxString, FFmpegPreset>;
32
34
36{
37public:
39 ~FFmpegPresets() override;
40
41 void GetPresetList(wxArrayString &list);
42 void LoadPreset(ExportFFmpegOptions *parent, wxString &name);
43 bool SavePreset(ExportFFmpegOptions *parent, wxString &name);
44 void DeletePreset(wxString &name);
45 bool OverwriteIsOk( wxString &name );
46 FFmpegPreset *FindPreset(wxString &name);
47
48 void ImportPresets(wxString &filename);
49 void ExportPresets(wxString &filename);
50
51 bool HandleXMLTag(const std::string_view& tag, const AttributesList &attrs) override;
52 XMLTagHandler *HandleXMLChild(const std::string_view& tag) override;
53 void WriteXMLHeader(XMLWriter &xmlFile) const;
54 void WriteXML(XMLWriter &xmlFile) const;
55
56private:
57
59 FFmpegPreset *mPreset; // valid during XML parsing only
60 bool mAbortImport; // tells importer to ignore the rest of the import
61};
std::unordered_map< wxString, FFmpegPreset > FFmpegPresetMap
Definition: FFmpegPresets.h:31
wxString name
Definition: TagsEditor.cpp:166
std::vector< Attribute > AttributesList
Definition: XMLTagHandler.h:40
Custom FFmpeg export dialog.
wxArrayString mControlState
Definition: FFmpegPresets.h:28
wxString mPresetName
Definition: FFmpegPresets.h:27
void LoadPreset(ExportFFmpegOptions *parent, wxString &name)
FFmpegPresetMap mPresets
Definition: FFmpegPresets.h:58
bool SavePreset(ExportFFmpegOptions *parent, wxString &name)
void ImportPresets(wxString &filename)
bool OverwriteIsOk(wxString &name)
XMLTagHandler * HandleXMLChild(const std::string_view &tag) override
void DeletePreset(wxString &name)
FFmpegPreset * mPreset
Definition: FFmpegPresets.h:59
bool HandleXMLTag(const std::string_view &tag, const AttributesList &attrs) override
~FFmpegPresets() override
void WriteXMLHeader(XMLWriter &xmlFile) const
void GetPresetList(wxArrayString &list)
void WriteXML(XMLWriter &xmlFile) const
void ExportPresets(wxString &filename)
FFmpegPreset * FindPreset(wxString &name)
This class is an interface which should be implemented by classes which wish to be able to load and s...
Definition: XMLTagHandler.h:42
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:25