mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
pbutils: descriptions: add MPEG-4 video profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
This commit is contained in:
parent
001bd78957
commit
58d19cb7ca
2 changed files with 49 additions and 1 deletions
|
@ -329,6 +329,44 @@ static const FormatInfo formats[] = {
|
||||||
{"video/x-tscc", NULL, FLAG_VIDEO, ""}
|
{"video/x-tscc", NULL, FLAG_VIDEO, ""}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const gchar *
|
||||||
|
pbutils_desc_get_mpeg4v_profile_name_from_nick (const gchar * nick)
|
||||||
|
{
|
||||||
|
const gchar map[] = "simple\000Simple\000"
|
||||||
|
"simple-scalable\000Simple Scalable\000"
|
||||||
|
"core\000Core\000"
|
||||||
|
"main\000Main\000"
|
||||||
|
"n-bit\000N-bit\000"
|
||||||
|
"scalable\000Scalable\000"
|
||||||
|
"hybrid\000Hybrid\000"
|
||||||
|
"advanced-real-time-simple\000Advanced Real-Time Simple\000"
|
||||||
|
"core-scalable\000Core-Scalable\000"
|
||||||
|
"advanced-coding-efficiency\000Advanced Coding Efficiency\000"
|
||||||
|
"advanced-core\000Advanced Core\000"
|
||||||
|
"advanced-scalable-texture\000Advanced Scalable Texture\000"
|
||||||
|
"simple-face\000Simple Face Animation\000"
|
||||||
|
"simple-fba\000Simple FBA\000"
|
||||||
|
"simple-studio\000Simple Studio\000"
|
||||||
|
"core-studio\000Core Studio\000"
|
||||||
|
"advanced-simple\000Advanced Simple\000"
|
||||||
|
"fine-granularity-scalable\000Fine Granularity Scalable\000"
|
||||||
|
"basic-animated-texture\000Basic Animated Texture\000"
|
||||||
|
"baseline\000Baseline Profile\000";
|
||||||
|
const gchar *end = map + sizeof (map);
|
||||||
|
const gchar *p;
|
||||||
|
|
||||||
|
p = map;
|
||||||
|
while (*p != '\0' && p < end) {
|
||||||
|
guint len = strlen (p);
|
||||||
|
|
||||||
|
if (strcmp (p, nick) == 0)
|
||||||
|
return p + len + 1;
|
||||||
|
p += len + 1;
|
||||||
|
p += strlen (p) + 1;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static const gchar *
|
static const gchar *
|
||||||
pbutils_desc_get_h264_profile_name_from_nick (const gchar * nick)
|
pbutils_desc_get_h264_profile_name_from_nick (const gchar * nick)
|
||||||
{
|
{
|
||||||
|
@ -730,6 +768,14 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps)
|
||||||
if (sysstream) {
|
if (sysstream) {
|
||||||
return g_strdup_printf ("MPEG-%d System Stream", ver);
|
return g_strdup_printf ("MPEG-%d System Stream", ver);
|
||||||
} else {
|
} else {
|
||||||
|
const gchar *profile = gst_structure_get_string (s, "profile");
|
||||||
|
if (profile != NULL) {
|
||||||
|
if (ver == 4)
|
||||||
|
profile = pbutils_desc_get_mpeg4v_profile_name_from_nick (profile);
|
||||||
|
}
|
||||||
|
if (profile != NULL)
|
||||||
|
return g_strdup_printf ("MPEG-%d Video (%s Profile)", ver, profile);
|
||||||
|
else
|
||||||
return g_strdup_printf ("MPEG-%d Video", ver);
|
return g_strdup_printf ("MPEG-%d Video", ver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,6 +310,8 @@ static const gchar *caps_strings[] = {
|
||||||
"video/mpeg, mpegversion=(int)4, systemstream=(boolean)FALSE",
|
"video/mpeg, mpegversion=(int)4, systemstream=(boolean)FALSE",
|
||||||
"video/mpeg, mpegversion=(int)99, systemstream=(boolean)TRUE",
|
"video/mpeg, mpegversion=(int)99, systemstream=(boolean)TRUE",
|
||||||
"video/mpeg, mpegversion=(int)99, systemstream=(boolean)FALSE",
|
"video/mpeg, mpegversion=(int)99, systemstream=(boolean)FALSE",
|
||||||
|
"video/mpeg, mpegversion=(int)4, systemstream=(boolean)FALSE, profile=main",
|
||||||
|
"video/mpeg, mpegversion=(int)4, systemstream=(boolean)FALSE, profile=adsfad",
|
||||||
"video/mpeg",
|
"video/mpeg",
|
||||||
"video/x-indeo, indeoversion=(int)3",
|
"video/x-indeo, indeoversion=(int)3",
|
||||||
"video/x-indeo, indeoversion=(int)5",
|
"video/x-indeo, indeoversion=(int)5",
|
||||||
|
|
Loading…
Reference in a new issue