mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 17:48:26 +00:00
vaapidecode: rename member to allowed_sinkpad_caps
vaapidecode has a member named allowed_caps, but this name is not enough explicit. This patch renames allowed_caps to allowed_sinkpad_caps. No functional changes were included. https://bugzilla.gnome.org/show_bug.cgi?id=773497
This commit is contained in:
parent
0f938be7a4
commit
c258343243
2 changed files with 12 additions and 11 deletions
|
@ -954,7 +954,7 @@ gst_vaapidecode_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstVaapiDecode *const decode = GST_VAAPIDECODE (object);
|
GstVaapiDecode *const decode = GST_VAAPIDECODE (object);
|
||||||
|
|
||||||
gst_caps_replace (&decode->allowed_caps, NULL);
|
gst_caps_replace (&decode->allowed_sinkpad_caps, NULL);
|
||||||
|
|
||||||
g_cond_clear (&decode->surface_ready);
|
g_cond_clear (&decode->surface_ready);
|
||||||
g_mutex_clear (&decode->surface_ready_mutex);
|
g_mutex_clear (&decode->surface_ready_mutex);
|
||||||
|
@ -1120,9 +1120,9 @@ gst_vaapidecode_parse (GstVideoDecoder * vdec,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapidecode_ensure_allowed_caps (GstVaapiDecode * decode)
|
gst_vaapidecode_ensure_allowed_sinkpad_caps (GstVaapiDecode * decode)
|
||||||
{
|
{
|
||||||
GstCaps *caps, *allowed_caps;
|
GstCaps *caps, *allowed_sinkpad_caps;
|
||||||
GArray *profiles;
|
GArray *profiles;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
@ -1132,8 +1132,8 @@ gst_vaapidecode_ensure_allowed_caps (GstVaapiDecode * decode)
|
||||||
if (!profiles)
|
if (!profiles)
|
||||||
goto error_no_profiles;
|
goto error_no_profiles;
|
||||||
|
|
||||||
allowed_caps = gst_caps_new_empty ();
|
allowed_sinkpad_caps = gst_caps_new_empty ();
|
||||||
if (!allowed_caps)
|
if (!allowed_sinkpad_caps)
|
||||||
goto error_no_memory;
|
goto error_no_memory;
|
||||||
|
|
||||||
for (i = 0; i < profiles->len; i++) {
|
for (i = 0; i < profiles->len; i++) {
|
||||||
|
@ -1157,9 +1157,9 @@ gst_vaapidecode_ensure_allowed_caps (GstVaapiDecode * decode)
|
||||||
gst_structure_set (structure, "profile", G_TYPE_STRING,
|
gst_structure_set (structure, "profile", G_TYPE_STRING,
|
||||||
profile_name, NULL);
|
profile_name, NULL);
|
||||||
|
|
||||||
allowed_caps = gst_caps_merge (allowed_caps, caps);
|
allowed_sinkpad_caps = gst_caps_merge (allowed_sinkpad_caps, caps);
|
||||||
}
|
}
|
||||||
decode->allowed_caps = gst_caps_simplify (allowed_caps);
|
decode->allowed_sinkpad_caps = gst_caps_simplify (allowed_sinkpad_caps);
|
||||||
|
|
||||||
g_array_unref (profiles);
|
g_array_unref (profiles);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1184,7 +1184,7 @@ gst_vaapidecode_sink_getcaps (GstVideoDecoder * vdec, GstCaps * filter)
|
||||||
GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
|
GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
|
||||||
GstCaps *result;
|
GstCaps *result;
|
||||||
|
|
||||||
if (decode->allowed_caps)
|
if (decode->allowed_sinkpad_caps)
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
/* if we haven't a display yet, return our pad's template caps */
|
/* if we haven't a display yet, return our pad's template caps */
|
||||||
|
@ -1193,11 +1193,12 @@ gst_vaapidecode_sink_getcaps (GstVideoDecoder * vdec, GstCaps * filter)
|
||||||
|
|
||||||
/* if the allowed caps calculation fails, return an empty caps, so
|
/* if the allowed caps calculation fails, return an empty caps, so
|
||||||
* the auto-plug can try other decoder */
|
* the auto-plug can try other decoder */
|
||||||
if (!gst_vaapidecode_ensure_allowed_caps (decode))
|
if (!gst_vaapidecode_ensure_allowed_sinkpad_caps (decode))
|
||||||
return gst_caps_new_empty ();
|
return gst_caps_new_empty ();
|
||||||
|
|
||||||
bail:
|
bail:
|
||||||
result = gst_video_decoder_proxy_getcaps (vdec, decode->allowed_caps, filter);
|
result = gst_video_decoder_proxy_getcaps (vdec, decode->allowed_sinkpad_caps,
|
||||||
|
filter);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (decode, "Returning sink caps %" GST_PTR_FORMAT, result);
|
GST_DEBUG_OBJECT (decode, "Returning sink caps %" GST_PTR_FORMAT, result);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct _GstVaapiDecode {
|
||||||
GMutex surface_ready_mutex;
|
GMutex surface_ready_mutex;
|
||||||
GCond surface_ready;
|
GCond surface_ready;
|
||||||
GstCaps *decoder_caps;
|
GstCaps *decoder_caps;
|
||||||
GstCaps *allowed_caps;
|
GstCaps *allowed_sinkpad_caps;
|
||||||
guint current_frame_size;
|
guint current_frame_size;
|
||||||
guint has_texture_upload_meta : 1;
|
guint has_texture_upload_meta : 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue