memcpy(subtitle->palette, palette, 16 * sizeof(uint32_t));
subtitle->palette_set = 1;
+ const char * name = NULL;
switch (lang_extension)
{
case 1:
case 2:
subtitle->attributes = HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Large Type");
+ name = "Large Type";
break;
case 3:
subtitle->attributes = HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Children");
+ name = "Children";
break;
case 5:
subtitle->attributes = HB_SUBTITLE_ATTR_CC;
strcat(subtitle->lang, " Closed Caption");
+ name = "Closed Caption";
break;
case 6:
subtitle->attributes = HB_SUBTITLE_ATTR_CC | HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Closed Caption, Large Type");
+ name = "Closed Caption, Large Type";
break;
case 7:
subtitle->attributes = HB_SUBTITLE_ATTR_CC |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Closed Caption, Children");
+ name = "Closed Caption, Children";
break;
case 9:
subtitle->attributes = HB_SUBTITLE_ATTR_FORCED;
case 13:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY;
strcat(subtitle->lang, " Director's Commentary");
+ name = "Commentary";
break;
case 14:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Director's Commentary, Large Type");
+ name = "Commentary, Large Type";
break;
case 15:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Director's Commentary, Children");
+ name = "Commentary, Children";
default:
subtitle->attributes = HB_SUBTITLE_ATTR_UNKNOWN;
break;
}
+ if (name != NULL)
+ {
+ subtitle->name = strdup(name);
+ }
switch (style)
{
case HB_VOBSUB_STYLE_4_3:
lang = lang_for_code( lang_code );
+ const char * name = NULL;
switch ( lang_extension )
{
case 1:
break;
case 2:
audio->config.lang.attributes = HB_AUDIO_ATTR_VISUALLY_IMPAIRED;
+ name = "Visually Impaired";
break;
case 3:
audio->config.lang.attributes = HB_AUDIO_ATTR_COMMENTARY;
+ name = "Commentary";
break;
case 4:
audio->config.lang.attributes = HB_AUDIO_ATTR_ALT_COMMENTARY;
+ name = "Commentary";
break;
default:
audio->config.lang.attributes = HB_AUDIO_ATTR_NONE;
break;
}
+ if (name != NULL)
+ {
+ audio->config.in.name = strdup(name);
+ }
snprintf( audio->config.lang.simple,
sizeof( audio->config.lang.simple ), "%s",
memcpy(subtitle->palette, palette, 16 * sizeof(uint32_t));
subtitle->palette_set = 1;
+ const char * name = NULL;
switch (lang_extension)
{
case 1:
case 2:
subtitle->attributes = HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Large Type");
+ name = "Large Type";
break;
case 3:
subtitle->attributes = HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Children");
+ name = "Children";
break;
case 5:
subtitle->attributes = HB_SUBTITLE_ATTR_CC;
strcat(subtitle->lang, " Closed Caption");
+ name = "Closed Caption";
break;
case 6:
subtitle->attributes = HB_SUBTITLE_ATTR_CC | HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Closed Caption, Large Type");
+ name = "Closed Caption, Large Type";
break;
case 7:
subtitle->attributes = HB_SUBTITLE_ATTR_CC |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Closed Caption, Children");
+ name = "Closed Caption, Children";
break;
case 9:
subtitle->attributes = HB_SUBTITLE_ATTR_FORCED;
case 13:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY;
strcat(subtitle->lang, " Director's Commentary");
+ name = "Commentary";
break;
case 14:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_LARGE;
strcat(subtitle->lang, " Director's Commentary, Large Type");
+ name = "Commentary, Large Type";
break;
case 15:
subtitle->attributes = HB_SUBTITLE_ATTR_COMMENTARY |
HB_SUBTITLE_ATTR_CHILDREN;
strcat(subtitle->lang, " Director's Commentary, Children");
+ name = "Commentary, Children";
default:
subtitle->attributes = HB_SUBTITLE_ATTR_UNKNOWN;
break;
}
+ if (name != NULL)
+ {
+ subtitle->name = strdup(name);
+ }
switch (style)
{
case HB_VOBSUB_STYLE_4_3:
{
continue;
}
+ const char * name = NULL;
switch ( lang_extension )
{
case 1:
break;
case 2:
audio->config.lang.attributes = HB_AUDIO_ATTR_VISUALLY_IMPAIRED;
+ name = "Visually Impaired";
break;
case 3:
audio->config.lang.attributes = HB_AUDIO_ATTR_COMMENTARY;
+ name = "Commentary";
break;
case 4:
audio->config.lang.attributes = HB_AUDIO_ATTR_ALT_COMMENTARY;
+ name = "Commentary";
break;
default:
audio->config.lang.attributes = HB_AUDIO_ATTR_NONE;
break;
}
+ if (name != NULL)
+ {
+ audio->config.in.name = strdup(name);
+ }
/* Check for duplicate tracks */
audio_tmp = NULL;