summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapiprofile.c
diff options
context:
space:
mode:
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>2010-05-16 21:17:49 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-09-20 12:55:46 +0200
commitfa6385cd397e698d2fa7b5e08bd522c8b336e1eb (patch)
treeddffa6e1cadb88a6f62c9c3c078477ac5240296b /gst-libs/gst/vaapi/gstvaapiprofile.c
parentadfed50a90ff59958335e0fca2c6ca35f915e563 (diff)
Fix decoder caps to report codec aliases.
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapiprofile.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiprofile.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c b/gst-libs/gst/vaapi/gstvaapiprofile.c
index 1c9f5610..40c9760a 100644
--- a/gst-libs/gst/vaapi/gstvaapiprofile.c
+++ b/gst-libs/gst/vaapi/gstvaapiprofile.c
@@ -285,18 +285,27 @@ gst_vaapi_profile_get_va_profile(GstVaapiProfile profile)
GstCaps *
gst_vaapi_profile_get_caps(GstVaapiProfile profile)
{
- const GstVaapiProfileMap * const m = get_profiles_map(profile);
- GstCaps *caps;
-
- if (!m)
- return NULL;
+ const GstVaapiProfileMap *m;
+ GstCaps *out_caps, *caps;
- caps = gst_caps_from_string(m->caps_str);
- if (!caps)
+ out_caps = gst_caps_new_empty();
+ if (!out_caps)
return NULL;
- gst_caps_set_simple(caps, "profile", G_TYPE_STRING, m->profile_str, NULL);
- return caps;
+ for (m = gst_vaapi_profiles; m->profile; m++) {
+ if (m->profile != profile)
+ continue;
+ caps = gst_caps_from_string(m->caps_str);
+ if (!caps)
+ continue;
+ gst_caps_set_simple(
+ caps,
+ "profile", G_TYPE_STRING, m->profile_str,
+ NULL
+ );
+ gst_caps_merge(out_caps, caps);
+ }
+ return out_caps;
}
/**