Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unify the assignment and usage of the name and language of streams #2162

Merged
16 commits merged into from

5 participants

Andreas Zelend Joakim Plate Martijn Kaijser davilla da-anda
Andreas Zelend
Collaborator

The first few commits improve/correct the assignment of dvd streams' name and language.
Next the get*Language methods now return a three char code if possible.
This code is used to show the full language name in the gui.

Joakim Plate
Collaborator
Andreas Zelend
Collaborator

I'm not 100% sure what you mean since I haven't added any function to the player. Do you want to save method calls? If this is the goal I can add a commit, but I doubt that another lengthy method improves comprehensibility.

Joakim Plate
Collaborator
Andreas Zelend
Collaborator

@elupus ideally #2128 should go in first, because it fixes a bug in get_audio_info which I would only be too happy to use.

Andreas Zelend
Collaborator

Now the language of any selection stream should be a three char code. These are used for the language priority evaluations.

Joakim Plate elupus commented on the diff
...dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
((67 lines not shown))
- switch( audio_attributes.lang_extension )
- {
- case DVD_AUDIO_LANG_EXT_VisuallyImpaired:
- strLanguage+= " (Visually Impaired)";
- break;
- case DVD_AUDIO_LANG_EXT_DirectorsComments1:
- strLanguage+= " (Directors Comments)";
- break;
- case DVD_AUDIO_LANG_EXT_DirectorsComments2:
- strLanguage+= " (Directors Comments 2)";
- break;
- case DVD_AUDIO_LANG_EXT_NotSpecified:
- case DVD_AUDIO_LANG_EXT_NormalCaptions:
- default:
- break;
- }
Joakim Plate Collaborator
elupus added a note

Why was this removed? This is the closest we get to an actual name.

Andreas Zelend Collaborator
ace20022 added a note

The main problem is that with the current version of dvdnav the only thing that get_audio_info returns correctly is the language code, at least with any dvd I tested. The second thing was that this code fragment belonged to GetAudioStreamLanguage, I therefore removed it and then simply forgot to re-add it to GetAudioStreamName or rather search for an alternative to get this info.

I will adapt these commits after the new version of dvdnav got merged.

da-anda Collaborator
da-anda added a note

can we remove the hardcoded labels and make them translateable instead when refactoring this?

Andreas Zelend Collaborator
ace20022 added a note

Sure, can do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Andreas Zelend
Collaborator

I'm working on an update, but found some other issues, e.g. audio_attributes.lang_extension is wrong, the info is store in audio_attributes.code_extension. Maybe I can push something tomorrow; when is the merge window closed?

Martijn Kaijser

At the end of tomorrow

Andreas Zelend
Collaborator

Some issues that I've noticed and don't know how to handle correctly, so comments are highly appreciated!
Moved here: https://gist.github.com/ace20022/c9da53faefebb3d76ef5

Andreas Zelend
Collaborator

Had a look at blurays in the meantime, no special handling is needed for them. Btw this pr should fix the auto language selection since this also uses 3 char codes.

Andreas Zelend
Collaborator

@elupus Could you please have a look at this pr. It is not only a gui gimmick, at least imo, it also fixes the subtitle auto-selection and fixes, or improves, json-rpc usage, e.g., remotes w.r.t. language representation. At the moment you get the full language names, sometimes even localised and in the wrong field:
For example: https://gist.github.com/ace20022/4a5207870ff4302b9ca0

Andreas Zelend
Collaborator

I have revised and extended this pr after 87047e9. It's quite large now.
There are some issues regarding libdvd that I've noticed. I opened a gist for discussion, so no mail spam will be generated: https://gist.github.com/ace20022/c9da53faefebb3d76ef5.

@davilla Could you please check the amlplayer commits? Especially 3ee15dac4af70c068774f8f01d644165a6e01ff4.

Hopefully I haven't miss anything.

davilla
Collaborator

nm :) I see the previous commit that does the expansion at the source. looks fine.

Andreas Zelend
Collaborator

@davilla thanks, that was really quick ;)

I see the previous commit that does the expansion at the source.

Not exactly, that's just a conversion to 3 chars if necessary. The only place where the full name is required is the gui, imo.

davilla
Collaborator

do we do the convert to a full name over and over in the GUI ? if so, CPU sucker :)

Andreas Zelend
Collaborator

Only for presentation in the audio/subtitle settings dialog; for subs this is done already (in the current implementation)

Andreas Zelend
Collaborator

@elupus If you find some time, could you please have look? Especially at the gist thing. I'm afraid this month's deadline is coming closer ;)

Joakim Plate
Collaborator
Andreas Zelend
Collaborator

No problem, have fun :)

...s/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h
@@ -44,6 +44,19 @@
struct dvdnav_s;
+struct DVDStreamInfo
Joakim Plate Collaborator
elupus added a note

DVDNavStreamInfo or make it a member of the navigator class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Joakim Plate
Collaborator

Fix above, rebase and then you can assign it to next merge window.

Andreas Zelend
Collaborator

@elupus will do soon. Any thoughts about this: https://gist.github.com/ace20022/c9da53faefebb3d76ef5 ?
I can't assign it to a merge window (not a team member), can I :) ?

ace20022 added some commits
Andreas Zelend ace20022 [DVDInputStreamNavigator/Players] Use a struct and dvdnav_get_audio_i…
…nfo(...) to query all required audio stream info at once.

[Fixes]
- Fix stream type, e.g. "(Directors Comments)", recognition. It is stored in code_extension not in lang_extension.

- Properly set the number of channels of a dvd audio stream.

- Set the stream language of dvd audio tracks properly/consistent with other audio streams, i.e. set it to a three char code.

- Set the stream name of dvd audio tracks properly/consistent with other audio streams.
63bb4a6
Andreas Zelend ace20022 [DVDInputStreamNavigator/Players] Use a struct and dvdnav_get_stitle_…
…info(...) to query all required subtitle stream info at once.

[Fixes]
- Set the stream language of dvd subtitles properly/consistent with other streams, i.e. set it to a three char code.

- Set the stream name of dvd subtitle tracks properly/consistent with other streams; in particular don't use the language as the name.
d8b2ca8
Andreas Zelend ace20022 Make the type, e.g. "(Forced)", of a stream translatable in its name. d3722b9
Andreas Zelend ace20022 [Players] Don't assign "unknown" to the audio/subtitle stream name, l…
…eave it empty instead.
e7dfb28
Andreas Zelend ace20022 [DVDDemuxer] Don't set the language as the stream name. d54456c
Andreas Zelend ace20022 [AMLPlayer] Set the name of a stream properly/consistent with the oth…
…er players, i.e., codec name (if possible) + channels.

Don't assign "unknown" to the audio/subtitle stream name, leave it empty instead.
25b1623
Andreas Zelend ace20022 [Players] Convert the language code of a selection stream to three ch…
…ars if necessary.
bee3993
Andreas Zelend ace20022 [AMLPlayer] Convert the language code of a stream to three chars if n…
…ecessary.
d65cd9c
Andreas Zelend ace20022 [AMLPlayer] Always set the name and language fields of a subtitle/aud…
…io stream in the getInfo methods.
e71cb79
Andreas Zelend ace20022 [GUI Audio] Adapt the presentation of audio and subtitle items. The l…
…abels are built as follows:

"[language|unknown] - name" or, if name is empty, "[language/unknown]"
1d8cf16
Andreas Zelend ace20022 [Players] Set the language code instead of the full name in the GetSu…
…btitleStreamInfo methods.
089ba3a
Andreas Zelend ace20022 [DVDDemux] Add "Dolby TrueHD" and 7.1 recognition to GetStreamType. A…
…dditionally adapt the default channel string to "channel count-chs"
33b0427
Andreas Zelend ace20022 [Player] Return the language code of a stream, or its name if the lan…
…guage is not specified.
93e562f
Andreas Zelend
Collaborator

@elupus done.

Andreas Zelend
Collaborator

@elupus I replied here: https://gist.github.com/ace20022/c9da53faefebb3d76ef5 (no notifications triggered from gist...)

Andreas Zelend
Collaborator

@elupus

OK, checked it with an hexeditor in combination with ifoedit and the newer pgcedit. The correct enum is/should be:

/* The audio format */
typedef enum {
  DVD_AUDIO_FORMAT_AC3        = 0,
  DVD_AUDIO_FORMAT_UNKNOWN_1  = 1,
  DVD_AUDIO_FORMAT_MPEG       = 2,
  DVD_AUDIO_FORMAT_MPEG2_ext  = 3,
  DVD_AUDIO_FORMAT_LPCM       = 4,
  DVD_AUDIO_FORMAT_UNKNOWN_5  = 5,
  DVD_AUDIO_FORMAT_DTS        = 6,
  DVD_AUDIO_FORMAT_SDDS       = 7
} DVDAudioFormat_t;

the include comes from xbmc\cores\dvdplayer\DVDInputStreams\dvdnav\dvd_types.h . Is it sufficient to only change it there? The other files are lib\libdvd\includes\dvdnav\dvd_types.h and lib\libdvd\libdvdnav\src\dvdnav\dvd_types.h

Joakim Plate
Collaborator
Andreas Zelend
Collaborator

@elupus changed it. Which upstream is the correct one, since videolan forked the project?

Joakim Plate
Collaborator
Andreas Zelend
Collaborator

@elupus I proposed it here: http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2013-March/thread.html.
Videolan.org has no mailing list for libdvdnav...

Andreas Zelend
Collaborator

@elupus Can this one go in this merge window?

Joakim Plate
Collaborator
Deleted user ghost merged commit c3c7fd3 into from
Andreas Zelend ace20022 deleted the branch
Joakim Plate

This can cash i think. You are using a string pointer here that the Format call could easily delete before it construct the new one.

Should be:

strItem.AppendFormat(" (%i/%i)", i + 1, (int)setting.max + 1);
Joakim Plate
Collaborator

okay, will change that while investigating the other issue regarding the indices. But it might take some days, or do you think it's urgent?

Collaborator

Nah probably not. It would have given crashes directly if it was a real problem. Should be fixed thou.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2013
  1. Andreas Zelend

    [DVDInputStreamNavigator/Players] Use a struct and dvdnav_get_audio_i…

    ace20022 authored
    …nfo(...) to query all required audio stream info at once.
    
    [Fixes]
    - Fix stream type, e.g. "(Directors Comments)", recognition. It is stored in code_extension not in lang_extension.
    
    - Properly set the number of channels of a dvd audio stream.
    
    - Set the stream language of dvd audio tracks properly/consistent with other audio streams, i.e. set it to a three char code.
    
    - Set the stream name of dvd audio tracks properly/consistent with other audio streams.
  2. Andreas Zelend

    [DVDInputStreamNavigator/Players] Use a struct and dvdnav_get_stitle_…

    ace20022 authored
    …info(...) to query all required subtitle stream info at once.
    
    [Fixes]
    - Set the stream language of dvd subtitles properly/consistent with other streams, i.e. set it to a three char code.
    
    - Set the stream name of dvd subtitle tracks properly/consistent with other streams; in particular don't use the language as the name.
  3. Andreas Zelend
  4. Andreas Zelend
  5. Andreas Zelend
  6. Andreas Zelend

    [AMLPlayer] Set the name of a stream properly/consistent with the oth…

    ace20022 authored
    …er players, i.e., codec name (if possible) + channels.
    
    Don't assign "unknown" to the audio/subtitle stream name, leave it empty instead.
  7. Andreas Zelend
  8. Andreas Zelend
  9. Andreas Zelend

    [AMLPlayer] Always set the name and language fields of a subtitle/aud…

    ace20022 authored
    …io stream in the getInfo methods.
  10. Andreas Zelend

    [GUI Audio] Adapt the presentation of audio and subtitle items. The l…

    ace20022 authored
    …abels are built as follows:
    
    "[language|unknown] - name" or, if name is empty, "[language/unknown]"
  11. Andreas Zelend
  12. Andreas Zelend

    [DVDDemux] Add "Dolby TrueHD" and 7.1 recognition to GetStreamType. A…

    ace20022 authored
    …dditionally adapt the default channel string to "channel count-chs"
  13. Andreas Zelend
Commits on Mar 20, 2013
  1. Andreas Zelend
  2. Andreas Zelend

    [Cosmetics] Fix indentations.

    ace20022 authored
  3. Andreas Zelend

    [Fix] Fixes dvdnav_audio_stream_format(...). Don't change the audio f…

    ace20022 authored
    …ormat numbers, e.g. DTS is 6 not 5, 5 is unknown.
This page is out of date. Refresh to see the latest.
30 language/English/strings.po
View
@@ -11746,3 +11746,33 @@ msgstr ""
msgctxt "#36042"
msgid "Use limited color range (16-235)"
msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37000"
+msgid "(Visually Impaired)"
+msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37001"
+msgid "(Directors Comments)"
+msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37002"
+msgid "(Directors Comments 2)"
+msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37011"
+msgid "(CC)"
+msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37012"
+msgid "(Forced)"
+msgstr ""
+
+#: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
+msgctxt "#37013"
+msgid "(Directors Comments)"
+msgstr ""
23 lib/libdvd/libdvdnav/src/dvdnav.c
View
@@ -925,27 +925,10 @@ uint16_t dvdnav_audio_stream_format(dvdnav_t *this, uint8_t stream) {
attr = vm_get_audio_attr(this->vm, stream);
pthread_mutex_unlock(&this->vm_lock);
- switch(attr.audio_format) {
- case 0:
- format = DVDNAV_FORMAT_AC3;
- break;
- case 2: /* MPEG-1 or MPEG-2 without extension bitstream. */
- case 3: /* MPEG-2 with extension bitstream. */
- format = DVDNAV_FORMAT_MPEGAUDIO;
- break;
- case 4:
- format = DVDNAV_FORMAT_LPCM;
- break;
- case 6:
- format = DVDNAV_FORMAT_DTS;
- break;
- case 7:
- format = DVDNAV_FORMAT_SDDS;
- break;
- default:
+ if (attr.audio_format >=0 && attr.audio_format <= 7)
+ format = attr.audio_format;
+ else
format = 0xffff;
- break;
- }
return format;
}
13 lib/libdvd/libdvdnav/src/dvdnav/dvd_types.h
View
@@ -161,14 +161,13 @@ typedef enum {
/* The audio format */
typedef enum {
DVD_AUDIO_FORMAT_AC3 = 0,
- DVD_AUDIO_FORMAT_MPEG1 = 1,
- DVD_AUDIO_FORMAT_MPEG1_DRC = 2,
- DVD_AUDIO_FORMAT_MPEG2 = 3,
- DVD_AUDIO_FORMAT_MPEG2_DRC = 4,
- DVD_AUDIO_FORMAT_LPCM = 5,
+ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1,
+ DVD_AUDIO_FORMAT_MPEG = 2,
+ DVD_AUDIO_FORMAT_MPEG2_EXT = 3,
+ DVD_AUDIO_FORMAT_LPCM = 4,
+ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5,
DVD_AUDIO_FORMAT_DTS = 6,
- DVD_AUDIO_FORMAT_SDDS = 7,
- DVD_AUDIO_FORMAT_Other = 8
+ DVD_AUDIO_FORMAT_SDDS = 7
} DVDAudioFormat_t;
/* Audio language extension */
16 lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h
View
@@ -32,11 +32,11 @@
extern "C" {
#endif
-# include <dvdnav/dvd_types.h>
-# include <dvdread/dvd_reader.h>
-# include <dvdread/nav_types.h>
-# include <dvdread/ifo_types.h> /* For vm_cmd_t */
-# include <dvdnav/dvdnav_events.h>
+#include <dvdnav/dvd_types.h>
+#include <dvdread/dvd_reader.h>
+#include <dvdread/nav_types.h>
+#include <dvdread/ifo_types.h> /* For vm_cmd_t */
+#include <dvdnav/dvdnav_events.h>
@@ -63,12 +63,6 @@ typedef int32_t dvdnav_status_t;
#define DVDNAV_STATUS_ERR 0
#define DVDNAV_STATUS_OK 1
-#define DVDNAV_FORMAT_AC3 0
-#define DVDNAV_FORMAT_MPEGAUDIO 3
-#define DVDNAV_FORMAT_LPCM 4
-#define DVDNAV_FORMAT_DTS 5
-#define DVDNAV_FORMAT_SDDS 6
-
/*********************************************************************
* initialisation & housekeeping functions *
*********************************************************************/
23 lib/libdvd/patches/libdvdnav_correct_audio_format_enum.diff
View
@@ -0,0 +1,23 @@
+--- libdvdnav-4.2.0/src/dvdnav/dvd_types.h Wed Mar 20 08:51:10 2013
++++ lib/libdvd/libdvdnav/src/dvdnav/dvd_types.h Wed Mar 20 12:22:25 2013
+@@ -161,14 +161,13 @@
+ /* The audio format */
+ typedef enum {
+ DVD_AUDIO_FORMAT_AC3 = 0,
+- DVD_AUDIO_FORMAT_MPEG1 = 1,
+- DVD_AUDIO_FORMAT_MPEG1_DRC = 2,
+- DVD_AUDIO_FORMAT_MPEG2 = 3,
+- DVD_AUDIO_FORMAT_MPEG2_DRC = 4,
+- DVD_AUDIO_FORMAT_LPCM = 5,
++ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1,
++ DVD_AUDIO_FORMAT_MPEG = 2,
++ DVD_AUDIO_FORMAT_MPEG2_EXT = 3,
++ DVD_AUDIO_FORMAT_LPCM = 4,
++ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5,
+ DVD_AUDIO_FORMAT_DTS = 6,
+- DVD_AUDIO_FORMAT_SDDS = 7,
+- DVD_AUDIO_FORMAT_Other = 8
++ DVD_AUDIO_FORMAT_SDDS = 7
+ } DVDAudioFormat_t;
+
+ /* Audio language extension */
33 lib/libdvd/patches/libdvdnav_correct_dvdnav_audio_stream_format.diff
View
@@ -0,0 +1,33 @@
+--- libdvdnav-4.2.0/src/dvdnav.c Wed Mar 20 11:38:53 2013
++++ lib/libdvd/libdvdnav/src/dvdnav.c Wed Mar 20 13:20:35 2013
+@@ -907,27 +925,10 @@
+ attr = vm_get_audio_attr(this->vm, stream);
+ pthread_mutex_unlock(&this->vm_lock);
+
+- switch(attr.audio_format) {
+- case 0:
+- format = DVDNAV_FORMAT_AC3;
+- break;
+- case 2: /* MPEG-1 or MPEG-2 without extension bitstream. */
+- case 3: /* MPEG-2 with extension bitstream. */
+- format = DVDNAV_FORMAT_MPEGAUDIO;
+- break;
+- case 4:
+- format = DVDNAV_FORMAT_LPCM;
+- break;
+- case 6:
+- format = DVDNAV_FORMAT_DTS;
+- break;
+- case 7:
+- format = DVDNAV_FORMAT_SDDS;
+- break;
+- default:
++ if (attr.audio_format >=0 && attr.audio_format <= 7)
++ format = attr.audio_format;
++ else
+ format = 0xffff;
+- break;
+- }
+
+ return format;
+ }
15 lib/libdvd/patches/libdvdnav_remove_unneeded_defines.diff
View
@@ -0,0 +1,15 @@
+--- libdvdnav-4.2.0/src/dvdnav/dvdnav.h Wed Mar 20 11:38:52 2013
++++ lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h Wed Mar 20 13:19:13 2013
+@@ -63,12 +63,6 @@
+ #define DVDNAV_STATUS_ERR 0
+ #define DVDNAV_STATUS_OK 1
+
+-#define DVDNAV_FORMAT_AC3 0
+-#define DVDNAV_FORMAT_MPEGAUDIO 3
+-#define DVDNAV_FORMAT_LPCM 4
+-#define DVDNAV_FORMAT_DTS 5
+-#define DVDNAV_FORMAT_SDDS 6
+-
+ /*********************************************************************
+ * initialisation & housekeeping functions *
+ *********************************************************************/
71 xbmc/cores/amlplayer/AMLPlayer.cpp
View
@@ -914,24 +914,9 @@ void CAMLPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &inf
if (index > (int)m_subtitle_streams.size() -1 || index < 0)
return;
- if (m_subtitle_streams[m_subtitle_index]->source == STREAM_SOURCE_NONE)
- {
- if ( m_subtitle_streams[index]->language.size())
- {
- CStdString name;
- g_LangCodeExpander.Lookup(name, m_subtitle_streams[index]->language);
- info.name = name;
- }
- else
- info.name = g_localizeStrings.Get(13205); // Unknown
- }
- else
- {
- if(m_subtitle_streams[m_subtitle_index]->name.length() > 0)
- info.name = m_subtitle_streams[m_subtitle_index]->name;
- else
- info.name = g_localizeStrings.Get(13205); // Unknown
- }
+ info.language = m_subtitle_streams[index]->language;
+ info.name = m_subtitle_streams[m_subtitle_index]->name;
+
if (m_log_level > 5)
CLog::Log(LOGDEBUG, "CAMLPlayer::GetSubtitleName, iStream(%d)", index);
}
@@ -1105,20 +1090,36 @@ void CAMLPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info)
info.bitrate = m_audio_streams[index]->bit_rate;
- if ( m_audio_streams[index]->language.size())
- info.language = m_audio_streams[index]->language;
+ info.language = m_audio_streams[index]->language;
info.channels = m_audio_streams[index]->channel;
info.audioCodecName = AudioCodecName(m_audio_streams[index]->format);
- info.name.Format("Undefined");
-
- if ( m_audio_streams[index]->language.size())
+ if (info.audioCodecName.size())
+ info.name = info.audioCodecName + " ";
+
+ switch(info.channels)
{
- CStdString name;
- g_LangCodeExpander.Lookup( name, m_audio_streams[index]->language);
- info.name = name;
+ case 1:
+ info.name += "Mono";
+ break;
+ case 2:
+ info.name += "Stereo";
+ break;
+ case 6:
+ info.name += "5.1";
+ break;
+ case 7:
+ info.name += "6.1";
+ break;
+ case 8:
+ info.name += "7.1";
+ break;
+ default:
+ char temp[32];
+ sprintf(temp, "%d-chs", info.channels);
+ info.name += temp;
}
}
@@ -1929,7 +1930,16 @@ bool CAMLPlayer::WaitForFormatValid(int timeout_ms)
info->format = media_info.audio_info[i]->aformat;
#if !defined(TARGET_ANDROID)
if (media_info.audio_info[i]->audio_language[0] != 0)
+ {
info->language = std::string(media_info.audio_info[i]->audio_language, 3);
+
+ if (info->language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, info->language);
+ info->language = lang;
+ }
+ }
#endif
m_audio_streams.push_back(info);
}
@@ -1953,7 +1963,16 @@ bool CAMLPlayer::WaitForFormatValid(int timeout_ms)
info->id = media_info.sub_info[i]->id;
info->type = STREAM_SUBTITLE;
if (media_info.sub_info[i]->sub_language && media_info.sub_info[i]->sub_language[0] != 0)
+ {
info->language = std::string(media_info.sub_info[i]->sub_language, 3);
+
+ if (info->language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, info->language);
+ info->language = lang;
+ }
+ }
m_subtitle_streams.push_back(info);
}
m_subtitle_index = media_info.stream_info.cur_sub_index;
14 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp
View
@@ -20,7 +20,6 @@
#include "DVDDemux.h"
#include "DVDCodecs/DVDCodecs.h"
-#include "utils/LangCodeExpander.h"
void CDemuxStreamTeletext::GetStreamInfo(std::string& strInfo)
{
@@ -44,15 +43,17 @@ void CDemuxStreamAudio::GetStreamType(std::string& strInfo)
strcpy(sInfo, "DTS ");
}
else if (codec == CODEC_ID_MP2) strcpy(sInfo, "MP2 ");
+ else if (codec == CODEC_ID_TRUEHD) strcpy(sInfo, "Dolby TrueHD ");
else strcpy(sInfo, "");
if (iChannels == 1) strcat(sInfo, "Mono");
else if (iChannels == 2) strcat(sInfo, "Stereo");
else if (iChannels == 6) strcat(sInfo, "5.1");
+ else if (iChannels == 8) strcat(sInfo, "7.1");
else if (iChannels != 0)
{
char temp[32];
- sprintf(temp, " %d %s", iChannels, "Channels");
+ sprintf(temp, " %d%s", iChannels, "-chs");
strcat(sInfo, temp);
}
strInfo = sInfo;
@@ -168,14 +169,7 @@ CDemuxStreamTeletext* CDVDDemux::GetStreamFromTeletextId(int iTeletextIndex)
void CDemuxStream::GetStreamName( std::string& strInfo )
{
- if( language[0] == 0 )
- strInfo = "";
- else
- {
- CStdString name;
- g_LangCodeExpander.Lookup( name, language );
- strInfo = name;
- }
+ strInfo = "";
}
AVDiscard CDemuxStream::GetDiscard()
195 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
View
@@ -27,6 +27,8 @@
#include "utils/log.h"
#include "guilib/Geometry.h"
#include "utils/URIUtils.h"
+#include "utils/StringUtils.h"
+#include "guilib/LocalizeStrings.h"
#if defined(TARGET_DARWIN)
#include "osx/CocoaInterface.h"
#endif
@@ -822,52 +824,61 @@ int CDVDInputStreamNavigator::GetActiveSubtitleStream()
return activeStream;
}
-std::string CDVDInputStreamNavigator::GetSubtitleStreamLanguage(int iId)
+bool CDVDInputStreamNavigator::GetSubtitleStreamInfo(const int iId, DVDNavStreamInfo &info)
{
- if (!m_dvdnav) return NULL;
-
- CStdString strLanguage;
+ if (!m_dvdnav) return false;
- subp_attr_t subp_attributes;
int streamId = ConvertSubtitleStreamId_XBMCToExternal(iId);
+ subp_attr_t subp_attributes;
+
if( m_dll.dvdnav_get_stitle_info(m_dvdnav, streamId, &subp_attributes) == DVDNAV_STATUS_OK )
{
+ SetSubtitleStreamName(info, subp_attributes);
- if (subp_attributes.type == DVD_SUBPICTURE_TYPE_Language ||
- subp_attributes.type == DVD_SUBPICTURE_TYPE_NotSpecified)
- {
- if (!g_LangCodeExpander.Lookup(strLanguage, subp_attributes.lang_code)) strLanguage = "Unknown";
+ char lang[3];
+ lang[2] = 0;
+ lang[1] = (subp_attributes.lang_code & 255);
+ lang[0] = (subp_attributes.lang_code >> 8) & 255;
- switch (subp_attributes.lang_extension)
- {
- case DVD_SUBPICTURE_LANG_EXT_NotSpecified:
- case DVD_SUBPICTURE_LANG_EXT_NormalCaptions:
- case DVD_SUBPICTURE_LANG_EXT_BigCaptions:
- case DVD_SUBPICTURE_LANG_EXT_ChildrensCaptions:
- break;
+ CStdString temp;
+ g_LangCodeExpander.ConvertToThreeCharCode(temp, lang);
+ info.language = temp;
- case DVD_SUBPICTURE_LANG_EXT_NormalCC:
- case DVD_SUBPICTURE_LANG_EXT_BigCC:
- case DVD_SUBPICTURE_LANG_EXT_ChildrensCC:
- strLanguage+= " (CC)";
- break;
- case DVD_SUBPICTURE_LANG_EXT_Forced:
- strLanguage+= " (Forced)";
- break;
- case DVD_SUBPICTURE_LANG_EXT_NormalDirectorsComments:
- case DVD_SUBPICTURE_LANG_EXT_BigDirectorsComments:
- case DVD_SUBPICTURE_LANG_EXT_ChildrensDirectorsComments:
- strLanguage+= " (Directors Comments)";
- break;
- }
- }
- else
+ return true;
+ }
+ return false;
+}
+
+void CDVDInputStreamNavigator::SetSubtitleStreamName(DVDNavStreamInfo &info, const subp_attr_t subp_attributes)
+{
+ if (subp_attributes.type == DVD_SUBPICTURE_TYPE_Language ||
+ subp_attributes.type == DVD_SUBPICTURE_TYPE_NotSpecified)
+ {
+ switch (subp_attributes.lang_extension)
{
- strLanguage = "Unknown";
+ case DVD_SUBPICTURE_LANG_EXT_NotSpecified:
+ case DVD_SUBPICTURE_LANG_EXT_NormalCaptions:
+ case DVD_SUBPICTURE_LANG_EXT_BigCaptions:
+ case DVD_SUBPICTURE_LANG_EXT_ChildrensCaptions:
+ break;
+
+ case DVD_SUBPICTURE_LANG_EXT_NormalCC:
+ case DVD_SUBPICTURE_LANG_EXT_BigCC:
+ case DVD_SUBPICTURE_LANG_EXT_ChildrensCC:
+ info.name += g_localizeStrings.Get(37011);
+ break;
+ case DVD_SUBPICTURE_LANG_EXT_Forced:
+ info.name += g_localizeStrings.Get(37012);
+ break;
+ case DVD_SUBPICTURE_LANG_EXT_NormalDirectorsComments:
+ case DVD_SUBPICTURE_LANG_EXT_BigDirectorsComments:
+ case DVD_SUBPICTURE_LANG_EXT_ChildrensDirectorsComments:
+ info.name += g_localizeStrings.Get(37013);
+ break;
+ default:
+ break;
}
}
-
- return strLanguage;
}
int CDVDInputStreamNavigator::GetSubTitleStreamCount()
@@ -925,37 +936,105 @@ int CDVDInputStreamNavigator::GetActiveAudioStream()
return activeStream;
}
-std::string CDVDInputStreamNavigator::GetAudioStreamLanguage(int iId)
+void CDVDInputStreamNavigator::SetAudioStreamName(DVDNavStreamInfo &info, const audio_attr_t audio_attributes)
{
- if (!m_dvdnav) return NULL;
+ switch( audio_attributes.code_extension )
+ {
+ case DVD_AUDIO_LANG_EXT_VisuallyImpaired:
+ info.name = g_localizeStrings.Get(37000);
+ break;
+ case DVD_AUDIO_LANG_EXT_DirectorsComments1:
+ info.name = g_localizeStrings.Get(37001);
+ break;
+ case DVD_AUDIO_LANG_EXT_DirectorsComments2:
+ info.name = g_localizeStrings.Get(37002);
+ break;
+ case DVD_AUDIO_LANG_EXT_NotSpecified:
+ case DVD_AUDIO_LANG_EXT_NormalCaptions:
+ default:
+ break;
+ }
- CStdString strLanguage;
+ switch(audio_attributes.audio_format)
+ {
+ case DVD_AUDIO_FORMAT_AC3:
+ info.name += " AC3";
+ break;
+ case DVD_AUDIO_FORMAT_UNKNOWN_1:
+ info.name += " UNKNOWN #1";
+ break;
+ case DVD_AUDIO_FORMAT_MPEG:
+ info.name += " MPEG AUDIO";
+ break;
+ case DVD_AUDIO_FORMAT_MPEG2_EXT:
+ info.name += " MP2 Ext.";
+ break;
+ case DVD_AUDIO_FORMAT_LPCM:
+ info.name += " LPCM";
+ break;
+ case DVD_AUDIO_FORMAT_UNKNOWN_5:
+ info.name += " UNKNOWN #5";
+ break;
+ case DVD_AUDIO_FORMAT_DTS:
+ info.name += " DTS";
+ break;
+ case DVD_AUDIO_FORMAT_SDDS:
+ info.name += " SDDS";
+ break;
+ default:
+ info.name += " Other";
+ break;
+ }
+
+ switch(audio_attributes.channels + 1)
+ {
+ case 1:
+ info.name += " Mono";
+ break;
+ case 2:
+ info.name += " Stereo";
+ break;
+ case 6:
+ info.name += " 5.1";
+ break;
+ case 7:
+ info.name += " 6.1";
+ break;
+ default:
+ char temp[32];
+ sprintf(temp, " %d-chs", audio_attributes.channels + 1);
+ info.name += temp;
+ }
+
+ StringUtils::TrimLeft(info.name);
+
+}
+
+bool CDVDInputStreamNavigator::GetAudioStreamInfo(const int iId, DVDNavStreamInfo &info)
+{
+ if (!m_dvdnav) return false;
- audio_attr_t audio_attributes;
int streamId = ConvertAudioStreamId_XBMCToExternal(iId);
+ audio_attr_t audio_attributes;
+
if( m_dll.dvdnav_get_audio_info(m_dvdnav, streamId, &audio_attributes) == DVDNAV_STATUS_OK )
{
- if (!g_LangCodeExpander.Lookup(strLanguage, audio_attributes.lang_code)) strLanguage = "Unknown";
+ SetAudioStreamName(info, audio_attributes);
- switch( audio_attributes.lang_extension )
- {
- case DVD_AUDIO_LANG_EXT_VisuallyImpaired:
- strLanguage+= " (Visually Impaired)";
- break;
- case DVD_AUDIO_LANG_EXT_DirectorsComments1:
- strLanguage+= " (Directors Comments)";
- break;
- case DVD_AUDIO_LANG_EXT_DirectorsComments2:
- strLanguage+= " (Directors Comments 2)";
- break;
- case DVD_AUDIO_LANG_EXT_NotSpecified:
- case DVD_AUDIO_LANG_EXT_NormalCaptions:
- default:
- break;
- }
Joakim Plate Collaborator
elupus added a note

Why was this removed? This is the closest we get to an actual name.

Andreas Zelend Collaborator
ace20022 added a note

The main problem is that with the current version of dvdnav the only thing that get_audio_info returns correctly is the language code, at least with any dvd I tested. The second thing was that this code fragment belonged to GetAudioStreamLanguage, I therefore removed it and then simply forgot to re-add it to GetAudioStreamName or rather search for an alternative to get this info.

I will adapt these commits after the new version of dvdnav got merged.

da-anda Collaborator
da-anda added a note

can we remove the hardcoded labels and make them translateable instead when refactoring this?

Andreas Zelend Collaborator
ace20022 added a note

Sure, can do so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- }
+ char lang[3];
+ lang[2] = 0;
+ lang[1] = (audio_attributes.lang_code & 255);
+ lang[0] = (audio_attributes.lang_code >> 8) & 255;
+
+ CStdString temp;
+ g_LangCodeExpander.ConvertToThreeCharCode(temp, lang);
+ info.language = temp;
+
+ info.channels = audio_attributes.channels + 1;
- return strLanguage;
+ return true;
+ }
+ return false;
}
int CDVDInputStreamNavigator::GetAudioStreamCount()
16 xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.h
View
@@ -44,6 +44,15 @@ class CDVDOverlayPicture;
struct dvdnav_s;
+struct DVDNavStreamInfo
+{
+ std::string name;
+ std::string language;
+ int channels;
+
+ DVDNavStreamInfo() : channels(0) {}
+};
+
class DVDNavResult
{
public:
@@ -96,17 +105,17 @@ class CDVDInputStreamNavigator
bool IsInMenu() { return m_bInMenu; }
int GetActiveSubtitleStream();
- std::string GetSubtitleStreamLanguage(int iId);
int GetSubTitleStreamCount();
+ bool GetSubtitleStreamInfo(const int iId, DVDNavStreamInfo &info);
bool SetActiveSubtitleStream(int iId);
void EnableSubtitleStream(bool bEnable);
bool IsSubtitleStreamEnabled();
int GetActiveAudioStream();
- std::string GetAudioStreamLanguage(int iId);
int GetAudioStreamCount();
bool SetActiveAudioStream(int iId);
+ bool GetAudioStreamInfo(const int iId, DVDNavStreamInfo &info);
bool GetNavigatorState(std::string &xmlstate);
bool SetNavigatorState(std::string &xmlstate);
@@ -145,6 +154,9 @@ class CDVDInputStreamNavigator
int ConvertSubtitleStreamId_XBMCToExternal(int id);
int ConvertSubtitleStreamId_ExternalToXBMC(int id);
+ void SetAudioStreamName(DVDNavStreamInfo &info, const audio_attr_t audio_attributes);
+ void SetSubtitleStreamName(DVDNavStreamInfo &info, const subp_attr_t subp_attributes);
+
DllDvdNav m_dll;
bool m_bCheckButtons;
bool m_bEOF;
17 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h
View
@@ -163,15 +163,14 @@ typedef enum {
/* The audio format */
typedef enum {
- DVD_AUDIO_FORMAT_AC3 = 0,
- DVD_AUDIO_FORMAT_MPEG1 = 1,
- DVD_AUDIO_FORMAT_MPEG1_DRC = 2,
- DVD_AUDIO_FORMAT_MPEG2 = 3,
- DVD_AUDIO_FORMAT_MPEG2_DRC = 4,
- DVD_AUDIO_FORMAT_LPCM = 5,
- DVD_AUDIO_FORMAT_DTS = 6,
- DVD_AUDIO_FORMAT_SDDS = 7,
- DVD_AUDIO_FORMAT_Other = 8
+ DVD_AUDIO_FORMAT_AC3 = 0,
+ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1,
+ DVD_AUDIO_FORMAT_MPEG = 2,
+ DVD_AUDIO_FORMAT_MPEG2_EXT = 3,
+ DVD_AUDIO_FORMAT_LPCM = 4,
+ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5,
+ DVD_AUDIO_FORMAT_DTS = 6,
+ DVD_AUDIO_FORMAT_SDDS = 7
} DVDAudioFormat_t;
/* Audio language extension */
32 xbmc/cores/dvdplayer/DVDPlayer.cpp
View
@@ -318,10 +318,14 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.source = source;
s.type = STREAM_AUDIO;
s.id = i;
- s.name = nav->GetAudioStreamLanguage(i);
s.flags = CDemuxStream::FLAG_NONE;
s.filename = filename;
- s.channels = 0;
+
+ DVDNavStreamInfo info;
+ nav->GetAudioStreamInfo(i, info);
+ s.name = info.name;
+ s.language = info.language;
+ s.channels = info.channels;
Update(s);
}
@@ -332,10 +336,14 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.source = source;
s.type = STREAM_SUBTITLE;
s.id = i;
- s.name = nav->GetSubtitleStreamLanguage(i);
s.flags = CDemuxStream::FLAG_NONE;
s.filename = filename;
s.channels = 0;
+
+ DVDNavStreamInfo info;
+ nav->GetSubtitleStreamInfo(i, info);
+ s.name = info.name;
+ s.language = info.language;
Update(s);
}
}
@@ -361,6 +369,14 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.type = stream->type;
s.id = stream->iId;
s.language = stream->language;
+
+ if (s.language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, stream->language);
+ s.language = lang;
+ }
+
s.flags = stream->flags;
s.filename = demuxer->GetFileName();
stream->GetStreamName(s.name);
@@ -2691,17 +2707,11 @@ void CDVDPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &inf
SelectionStream& s = m_SelectionStreams.Get(STREAM_SUBTITLE, index);
if(s.name.length() > 0)
info.name = s.name;
- else
- info.name = g_localizeStrings.Get(13205); // Unknown
if(s.type == STREAM_NONE)
info.name += "(Invalid)";
- CStdString strStreamLang;
- if (!g_LangCodeExpander.Lookup(strStreamLang, s.language))
- info.language = g_localizeStrings.Get(13205); // Unknown
- else
- info.language = strStreamLang;
+ info.language = s.language;
}
void CDVDPlayer::SetSubtitle(int iStream)
@@ -3835,8 +3845,6 @@ void CDVDPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info)
if(s.name.length() > 0)
info.name = s.name;
- else
- info.name += "Unknown";
if(s.type == STREAM_NONE)
info.name += " (Invalid)";
32 xbmc/cores/omxplayer/OMXPlayer.cpp
View
@@ -318,10 +318,14 @@ void COMXSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.source = source;
s.type = STREAM_AUDIO;
s.id = i;
- s.name = nav->GetAudioStreamLanguage(i);
s.flags = CDemuxStream::FLAG_NONE;
s.filename = filename;
- s.channels = 0;
+
+ DVDNavStreamInfo info;
+ nav->GetAudioStreamInfo(i, info);
+ s.name = info.name;
+ s.language = info.language;
+ s.channels = info.channels;
Update(s);
}
@@ -332,10 +336,14 @@ void COMXSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.source = source;
s.type = STREAM_SUBTITLE;
s.id = i;
- s.name = nav->GetSubtitleStreamLanguage(i);
s.flags = CDemuxStream::FLAG_NONE;
s.filename = filename;
s.channels = 0;
+
+ DVDNavStreamInfo info;
+ nav->GetSubtitleStreamInfo(i, info);
+ s.name = info.name;
+ s.language = info.language;
Update(s);
}
}
@@ -361,6 +369,14 @@ void COMXSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.type = stream->type;
s.id = stream->iId;
s.language = stream->language;
+
+ if (s.language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, stream->language);
+ s.language = lang;
+ }
+
s.flags = stream->flags;
s.filename = demuxer->GetFileName();
stream->GetStreamName(s.name);
@@ -2692,17 +2708,11 @@ void COMXPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &inf
OMXSelectionStream& s = m_SelectionStreams.Get(STREAM_SUBTITLE, index);
if(s.name.length() > 0)
info.name = s.name;
- else
- info.name = g_localizeStrings.Get(13205); // Unknown
if(s.type == STREAM_NONE)
info.name += "(Invalid)";
- CStdString strStreamLang;
- if (!g_LangCodeExpander.Lookup(strStreamLang, s.language))
- info.language = g_localizeStrings.Get(13205); // Unknown
- else
- info.language = strStreamLang;
+ info.language = s.language;
}
void COMXPlayer::SetSubtitle(int iStream)
@@ -3789,8 +3799,6 @@ void COMXPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info)
if(s.name.length() > 0)
info.name = s.name;
- else
- info.name += "Unknown";
if(s.type == STREAM_NONE)
info.name += " (Invalid)";
26 xbmc/interfaces/legacy/Player.cpp
View
@@ -28,7 +28,6 @@
#include "ApplicationMessenger.h"
#include "GUIInfoManager.h"
#include "AddonUtils.h"
-#include "utils/LangCodeExpander.h"
#include "utils/log.h"
#include "cores/IPlayer.h"
@@ -396,11 +395,11 @@ namespace XBMCAddon
{
SPlayerSubtitleStreamInfo info;
g_application.m_pPlayer->GetSubtitleStreamInfo(g_application.m_pPlayer->GetSubtitle(), info);
- CStdString strName = info.name;
- if (strName == "Unknown(Invalid)")
- strName = "";
- return strName;
+ if (info.language.length() > 0)
+ return info.language;
+ else
+ return info.name;
}
return NULL;
@@ -428,10 +427,10 @@ namespace XBMCAddon
SPlayerSubtitleStreamInfo info;
g_application.m_pPlayer->GetSubtitleStreamInfo(iStream, info);
- CStdString FullLang;
- if (!g_LangCodeExpander.Lookup(FullLang, info.name))
- FullLang = info.name;
- (*ret)[iStream] = FullLang;
+ if (info.language.length() > 0)
+ (*ret)[iStream] = info.language;
+ else
+ (*ret)[iStream] = info.name;
}
return ret;
}
@@ -463,11 +462,10 @@ namespace XBMCAddon
SPlayerAudioStreamInfo info;
g_application.m_pPlayer->GetAudioStreamInfo(iStream, info);
- CStdString FullLang;
- g_LangCodeExpander.Lookup(FullLang, info.language);
- if (FullLang.IsEmpty())
- FullLang = info.name;
- (*ret)[iStream] = FullLang;
+ if (info.language.length() > 0)
+ (*ret)[iStream] = info.language;
+ else
+ (*ret)[iStream] = info.name;
}
return ret;
}
29 xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
View
@@ -38,6 +38,7 @@
#include "pvr/PVRManager.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
#include "cores/IPlayer.h"
+#include "utils/LangCodeExpander.h"
using namespace std;
using namespace XFILE;
@@ -162,16 +163,20 @@ void CGUIDialogAudioSubtitleSettings::AddAudioStreams(unsigned int id)
for (int i = 0; i <= setting.max; ++i)
{
CStdString strItem;
- CStdString strName;
+ CStdString strLanguage;
SPlayerAudioStreamInfo info;
g_application.m_pPlayer->GetAudioStreamInfo(i, info);
- strName = info.name;
- if (strName.length() == 0)
- strName = "Unnamed";
+ if (!g_LangCodeExpander.Lookup(strLanguage, info.language))
+ strLanguage = g_localizeStrings.Get(13205); // Unknown
- strItem.Format("%s (%i/%i)", strName.c_str(), i + 1, (int)setting.max + 1);
+ if (info.name.length() == 0)
+ strItem = strLanguage;
+ else
+ strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());
+
+ strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
setting.entry.push_back(make_pair(setting.entry.size(), strItem));
}
@@ -207,15 +212,17 @@ void CGUIDialogAudioSubtitleSettings::AddSubtitleStreams(unsigned int id)
g_application.m_pPlayer->GetSubtitleStreamInfo(i, info);
CStdString strItem;
- CStdString strName = info.name;
+ CStdString strLanguage;
- if (strName.length() == 0)
- strName = "Unnamed";
+ if (!g_LangCodeExpander.Lookup(strLanguage, info.language))
+ strLanguage = g_localizeStrings.Get(13205); // Unknown
- if (strName != info.language)
- strName.Format("%s [%s]", strName.c_str(), info.language.c_str());
+ if (info.name.length() == 0)
+ strItem = strLanguage;
+ else
+ strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());
- strItem.Format("%s (%i/%i)", strName.c_str(), i + 1, (int)setting.max + 1);
+ strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
setting.entry.push_back(make_pair(setting.entry.size(), strItem));
}
Something went wrong with that request. Please try again.