mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-21 06:38:19 +00:00
libs: context: add invalid entrypoint symbol
The symbol GST_VAAPI_ENTRYPOINT_INVALID is just a representation of zero, which was already used as an invalid value tacitly. This patch only makes it explicit. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
This commit is contained in:
parent
c05ce44815
commit
4f43d28beb
2 changed files with 13 additions and 4 deletions
|
@ -221,7 +221,8 @@ config_create (GstVaapiContext * context)
|
||||||
guint value, va_chroma_format, attrib_index;
|
guint value, va_chroma_format, attrib_index;
|
||||||
|
|
||||||
/* Reset profile and entrypoint */
|
/* Reset profile and entrypoint */
|
||||||
if (!cip->profile || !cip->entrypoint)
|
if (cip->profile == GST_VAAPI_PROFILE_UNKNOWN
|
||||||
|
|| cip->entrypoint == GST_VAAPI_ENTRYPOINT_INVALID)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
context->va_profile = gst_vaapi_profile_get_va_profile (cip->profile);
|
context->va_profile = gst_vaapi_profile_get_va_profile (cip->profile);
|
||||||
context->va_entrypoint =
|
context->va_entrypoint =
|
||||||
|
@ -409,10 +410,12 @@ gst_vaapi_context_new (GstVaapiDisplay * display,
|
||||||
{
|
{
|
||||||
GstVaapiContext *context;
|
GstVaapiContext *context;
|
||||||
|
|
||||||
g_return_val_if_fail (cip->profile, NULL);
|
|
||||||
g_return_val_if_fail (cip->entrypoint, NULL);
|
|
||||||
g_return_val_if_fail (display, NULL);
|
g_return_val_if_fail (display, NULL);
|
||||||
|
|
||||||
|
if (cip->profile == GST_VAAPI_PROFILE_UNKNOWN
|
||||||
|
|| cip->entrypoint == GST_VAAPI_ENTRYPOINT_INVALID)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
context = g_slice_new (GstVaapiContext);
|
context = g_slice_new (GstVaapiContext);
|
||||||
if (!context)
|
if (!context)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -470,6 +473,10 @@ gst_vaapi_context_reset (GstVaapiContext * context,
|
||||||
gboolean grow_surfaces = FALSE;
|
gboolean grow_surfaces = FALSE;
|
||||||
GstVaapiChromaType chroma_type;
|
GstVaapiChromaType chroma_type;
|
||||||
|
|
||||||
|
if (new_cip->profile == GST_VAAPI_PROFILE_UNKNOWN
|
||||||
|
|| new_cip->entrypoint == GST_VAAPI_ENTRYPOINT_INVALID)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
chroma_type = new_cip->chroma_type ? new_cip->chroma_type :
|
chroma_type = new_cip->chroma_type ? new_cip->chroma_type :
|
||||||
DEFAULT_CHROMA_TYPE;
|
DEFAULT_CHROMA_TYPE;
|
||||||
if (cip->chroma_type != chroma_type) {
|
if (cip->chroma_type != chroma_type) {
|
||||||
|
|
|
@ -188,6 +188,7 @@ typedef enum {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstVaapiEntrypoint:
|
* GstVaapiEntrypoint:
|
||||||
|
* @GST_VAAPI_ENTRYPOINT_INVALID: Invalid entrypoint
|
||||||
* @GST_VAAPI_ENTRYPOINT_VLD: Variable Length Decoding
|
* @GST_VAAPI_ENTRYPOINT_VLD: Variable Length Decoding
|
||||||
* @GST_VAAPI_ENTRYPOINT_IDCT: Inverse Decrete Cosine Transform
|
* @GST_VAAPI_ENTRYPOINT_IDCT: Inverse Decrete Cosine Transform
|
||||||
* @GST_VAAPI_ENTRYPOINT_MOCO: Motion Compensation
|
* @GST_VAAPI_ENTRYPOINT_MOCO: Motion Compensation
|
||||||
|
@ -200,7 +201,8 @@ typedef enum {
|
||||||
* The set of all entrypoints for #GstVaapiEntrypoint
|
* The set of all entrypoints for #GstVaapiEntrypoint
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_VAAPI_ENTRYPOINT_VLD = 1,
|
GST_VAAPI_ENTRYPOINT_INVALID,
|
||||||
|
GST_VAAPI_ENTRYPOINT_VLD,
|
||||||
GST_VAAPI_ENTRYPOINT_IDCT,
|
GST_VAAPI_ENTRYPOINT_IDCT,
|
||||||
GST_VAAPI_ENTRYPOINT_MOCO,
|
GST_VAAPI_ENTRYPOINT_MOCO,
|
||||||
GST_VAAPI_ENTRYPOINT_SLICE_ENCODE,
|
GST_VAAPI_ENTRYPOINT_SLICE_ENCODE,
|
||||||
|
|
Loading…
Reference in a new issue