コード例 #1
0
ファイル: mmg.cpp プロジェクト: VRDate/mkvtoolnix
wxString
mmg_track_t::create_label() {
  wxString file_name = files[source]->file_name;
  file_name          = wxString::Format(wxT("%s (%s)"), file_name.AfterLast(wxT(PSEP)).c_str(), file_name.BeforeLast(wxT(PSEP)).c_str());

  if ('c' == type)
    return wxString::Format(Z("Chapters (%d entries) from %s"), num_entries, file_name.c_str());

  if (('t' == type) && (TRACK_ID_GLOBAL_TAGS == id))
    return wxString::Format(Z("Global tags (%d entries) from %s"), num_entries, file_name.c_str());

  if ('t' == type) {
    std::string format;
    fix_format(Y("Tags for track ID %lld (%d entries) from %s"), format);
    return wxString::Format(wxU(format), id - TRACK_ID_TAGS_BASE, num_entries, file_name.c_str());
  }

  std::string format;
  fix_format(Y("%s%s (ID %lld, type: %s) from %s"), format);
  wxString type_str = type == 'a' ? Z("audio")
                    : type == 'v' ? Z("video")
                    : type == 's' ? Z("subtitles")
                    :               Z("unknown");

  return wxString::Format(wxU(format), appending ? wxT("++> ") : wxEmptyString, ctype.c_str(), id, type_str.c_str(), file_name.c_str());
}
コード例 #2
0
ファイル: helpers.cpp プロジェクト: ProfOh/mkvtoolnix
wxString
create_track_order(bool all) {
  size_t i;
  wxString result;
  std::string temp;

  fix_format("%d:" LLD, temp);
  wxString format = wxU(temp);
  for (i = 0; i < tracks.size(); i++) {
    if (!all && (!tracks[i]->enabled || tracks[i]->appending || ('c' == tracks[i]->type) || ('t' == tracks[i]->type)))
      continue;

    if (!result.IsEmpty())
      result += wxT(",");
    result += wxString::Format(format, tracks[i]->source, tracks[i]->id);
  }

  return result;
}
コード例 #3
0
ファイル: helpers.cpp プロジェクト: ProfOh/mkvtoolnix
wxString
create_append_mapping() {
  size_t i;
  wxString result;
  std::string temp;

  fix_format("%d:" LLD ":%d:" LLD, temp);
  wxString format = wxU(temp);
  for (i = 1; i < tracks.size(); i++) {
    if (!tracks[i]->enabled || !tracks[i]->appending || ('c' == tracks[i]->type) || ('t' == tracks[i]->type))
      continue;

    if (!result.IsEmpty())
      result += wxT(",");

    auto to = i - 1;
    while ((0 < to) && !tracks[to]->enabled)
      --to;

    result += wxString::Format(format, tracks[i]->source, tracks[i]->id, tracks[to]->source, tracks[to]->id);
  }

  return result;
}