MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / AskForTrackSelection

Method AskForTrackSelection

src/ffmpegsource_common.cpp:119–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119FFmpegSourceProvider::TrackSelection
120FFmpegSourceProvider::AskForTrackSelection(const std::map<int, std::string> &TrackList,
121 FFMS_TrackType Type) {
122 std::vector<int> TrackNumbers;
123 wxArrayString Choices;
124
125 for (auto const& track : TrackList) {
126 Choices.Add(agi::wxformat(_("Track %02d: %s"), track.first, track.second));
127 TrackNumbers.push_back(track.first);
128 }
129
130 int Choice = wxGetSingleChoiceIndex(
131 Type == FFMS_TYPE_VIDEO ? _("Multiple video tracks detected, please choose the one you wish to load:") : _("Multiple audio tracks detected, please choose the one you wish to load:"),
132 Type == FFMS_TYPE_VIDEO ? _("Choose video track") : _("Choose audio track"),
133 Choices);
134
135 if (Choice < 0)
136 return TrackSelection::None;
137 return static_cast<TrackSelection>(TrackNumbers[Choice]);
138}
139
140/// @brief Set ffms2 log level according to setting in config.dat
141void FFmpegSourceProvider::SetLogLevel() {

Callers

nothing calls this directly

Calls 3

wxformatFunction · 0.85
push_backMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected