va: Add the entrypoint parameter to gst_va_profile_caps()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
This commit is contained in:
He Junyan 2023-12-12 20:41:54 +08:00
parent 484a636841
commit 354aceb9cd
5 changed files with 8 additions and 5 deletions

View File

@ -646,7 +646,7 @@ gst_va_create_coded_caps (GstVaDisplay * display, VAProfile profile,
if (rt_formats_ptr) if (rt_formats_ptr)
*rt_formats_ptr = rt_formats; *rt_formats_ptr = rt_formats;
caps = gst_va_profile_caps (profile); caps = gst_va_profile_caps (profile, entrypoint);
if (!caps) if (!caps)
return NULL; return NULL;

View File

@ -1528,6 +1528,7 @@ gst_va_h264_enc_reset_state (GstVaBaseEnc * base)
static gboolean static gboolean
gst_va_h264_enc_reconfig (GstVaBaseEnc * base) gst_va_h264_enc_reconfig (GstVaBaseEnc * base)
{ {
GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base);
GstVideoEncoder *venc = GST_VIDEO_ENCODER (base); GstVideoEncoder *venc = GST_VIDEO_ENCODER (base);
GstVaH264Enc *self = GST_VA_H264_ENC (base); GstVaH264Enc *self = GST_VA_H264_ENC (base);
GstCaps *out_caps, *reconf_caps = NULL; GstCaps *out_caps, *reconf_caps = NULL;
@ -1638,7 +1639,7 @@ gst_va_h264_enc_reconfig (GstVaBaseEnc * base)
/* Add some tags */ /* Add some tags */
gst_va_base_enc_add_codec_tag (base, "H264"); gst_va_base_enc_add_codec_tag (base, "H264");
out_caps = gst_va_profile_caps (base->profile); out_caps = gst_va_profile_caps (base->profile, klass->entrypoint);
g_assert (out_caps); g_assert (out_caps);
out_caps = gst_caps_fixate (out_caps); out_caps = gst_caps_fixate (out_caps);

View File

@ -4400,6 +4400,7 @@ done:
static gboolean static gboolean
gst_va_h265_enc_reconfig (GstVaBaseEnc * base) gst_va_h265_enc_reconfig (GstVaBaseEnc * base)
{ {
GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base);
GstVideoEncoder *venc = GST_VIDEO_ENCODER (base); GstVideoEncoder *venc = GST_VIDEO_ENCODER (base);
GstVaH265Enc *self = GST_VA_H265_ENC (base); GstVaH265Enc *self = GST_VA_H265_ENC (base);
GstCaps *out_caps, *reconf_caps = NULL;; GstCaps *out_caps, *reconf_caps = NULL;;
@ -4545,7 +4546,7 @@ gst_va_h265_enc_reconfig (GstVaBaseEnc * base)
/* Add some tags */ /* Add some tags */
gst_va_base_enc_add_codec_tag (base, "H265"); gst_va_base_enc_add_codec_tag (base, "H265");
out_caps = gst_va_profile_caps (base->profile); out_caps = gst_va_profile_caps (base->profile, klass->entrypoint);
g_assert (out_caps); g_assert (out_caps);
out_caps = gst_caps_fixate (out_caps); out_caps = gst_caps_fixate (out_caps);

View File

@ -157,7 +157,7 @@ gst_va_profile_from_name (GstVaCodecs codec, const gchar * name)
} }
GstCaps * GstCaps *
gst_va_profile_caps (VAProfile profile) gst_va_profile_caps (VAProfile profile, VAEntrypoint entrypoint)
{ {
const struct ProfileMap *map = get_profile_map (profile); const struct ProfileMap *map = get_profile_map (profile);
GstCaps *caps; GstCaps *caps;

View File

@ -40,7 +40,8 @@ typedef enum
} GstVaCodecs; } GstVaCodecs;
guint32 gst_va_profile_codec (VAProfile profile); guint32 gst_va_profile_codec (VAProfile profile);
GstCaps * gst_va_profile_caps (VAProfile profile); GstCaps * gst_va_profile_caps (VAProfile profile,
VAEntrypoint entrypoint);
const gchar * gst_va_profile_name (VAProfile profile); const gchar * gst_va_profile_name (VAProfile profile);
VAProfile gst_va_profile_from_name (GstVaCodecs codec, VAProfile gst_va_profile_from_name (GstVaCodecs codec,
const gchar * name); const gchar * name);