Commit 67eea920 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

libs: drop GST_VAAPI_IS_xxx() helper macros.

Drop obsolete GST_VAAPI_IS_xxx() helper macros since we are no longer
deriving from GObject and so those were only checking for whether the
argument was NULL or not. This is now irrelevant, and even confusing
to some extent, because we no longer have type checking.

Note: this incurs more type checking (review) but the libgstvaapi is
rather small, so this is manageable.
parent f77e1642
......@@ -5,7 +5,6 @@ GstVaapiSurfacePool
gst_vaapi_surface_pool_new
<SUBSECTION Standard>
GST_VAAPI_SURFACE_POOL
GST_VAAPI_IS_SURFACE_POOL
gst_vaapi_surface_pool_get_type
</SECTION>
......@@ -24,7 +23,6 @@ gst_vaapi_video_pool_get_size
gst_vaapi_video_pool_reserve
<SUBSECTION Standard>
GST_VAAPI_VIDEO_POOL
GST_VAAPI_IS_VIDEO_POOL
</SECTION>
<SECTION>
......@@ -37,7 +35,6 @@ gst_vaapi_display_x11_get_display
gst_vaapi_display_x11_get_screen
<SUBSECTION Standard>
GST_VAAPI_DISPLAY_X11
GST_VAAPI_IS_DISPLAY_X11
</SECTION>
<SECTION>
......@@ -51,7 +48,6 @@ gst_vaapi_window_x11_get_xid
gst_vaapi_window_x11_is_foreign_xid
<SUBSECTION Standard>
GST_VAAPI_WINDOW_X11
GST_VAAPI_IS_WINDOW_X11
</SECTION>
<SECTION>
......@@ -62,7 +58,6 @@ gst_vaapi_display_glx_new
gst_vaapi_display_glx_new_with_display
<SUBSECTION Standard>
GST_VAAPI_DISPLAY_GLX
GST_VAAPI_IS_DISPLAY_GLX
</SECTION>
<SECTION>
......@@ -109,7 +104,6 @@ gst_vaapi_display_get_render_mode
gst_vaapi_display_set_render_mode
<SUBSECTION Standard>
GST_VAAPI_DISPLAY
GST_VAAPI_IS_DISPLAY
</SECTION>
<SECTION>
......@@ -119,7 +113,6 @@ GstVaapiImagePool
gst_vaapi_image_pool_new
<SUBSECTION Standard>
GST_VAAPI_IMAGE_POOL
GST_VAAPI_IS_IMAGE_POOL
</SECTION>
<SECTION>
......@@ -150,7 +143,6 @@ gst_vaapi_window_set_size
gst_vaapi_window_put_surface
<SUBSECTION Standard>
GST_VAAPI_WINDOW
GST_VAAPI_IS_WINDOW
</SECTION>
<SECTION>
......@@ -163,7 +155,6 @@ gst_vaapi_object_unlock_display
gst_vaapi_object_get_id
<SUBSECTION Standard>
GST_VAAPI_OBJECT
GST_VAAPI_IS_OBJECT
</SECTION>
<SECTION>
......@@ -194,7 +185,6 @@ gst_vaapi_image_get_raw
gst_vaapi_image_update_from_buffer
<SUBSECTION Standard>
GST_VAAPI_IMAGE
GST_VAAPI_IS_IMAGE
</SECTION>
<SECTION>
......@@ -219,7 +209,6 @@ gst_vaapi_surface_sync
gst_vaapi_surface_query_status
<SUBSECTION Standard>
GST_VAAPI_SURFACE
GST_VAAPI_IS_SURFACE
</SECTION>
<SECTION>
......@@ -236,7 +225,6 @@ gst_vaapi_subpicture_get_image
gst_vaapi_subpicture_set_image
<SUBSECTION Standard>
GST_VAAPI_SUBPICTURE
GST_VAAPI_IS_SUBPICTURE
</SECTION>
<SECTION>
......@@ -300,7 +288,6 @@ gst_vaapi_context_get_surface_count
gst_vaapi_context_apply_composition
<SUBSECTION Standard>
GST_VAAPI_CONTEXT
GST_VAAPI_IS_CONTEXT
</SECTION>
<SECTION>
......@@ -319,7 +306,6 @@ gst_vaapi_decoder_parse
gst_vaapi_decoder_decode
<SUBSECTION Standard>
GST_VAAPI_DECODER
GST_VAAPI_IS_DECODER
</SECTION>
<SECTION>
......
......@@ -788,7 +788,7 @@ gst_vaapi_context_reset_full(GstVaapiContext *context,
GstVaapiID
gst_vaapi_context_get_id(GstVaapiContext *context)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), VA_INVALID_ID);
g_return_val_if_fail(context != NULL, VA_INVALID_ID);
return GST_VAAPI_OBJECT_ID(context);
}
......@@ -804,7 +804,7 @@ gst_vaapi_context_get_id(GstVaapiContext *context)
GstVaapiProfile
gst_vaapi_context_get_profile(GstVaapiContext *context)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), 0);
g_return_val_if_fail(context != NULL, 0);
return context->info.profile;
}
......@@ -824,7 +824,7 @@ gst_vaapi_context_get_profile(GstVaapiContext *context)
gboolean
gst_vaapi_context_set_profile(GstVaapiContext *context, GstVaapiProfile profile)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), FALSE);
g_return_val_if_fail(context != NULL, FALSE);
g_return_val_if_fail(profile, FALSE);
return gst_vaapi_context_reset(context,
......@@ -845,7 +845,7 @@ gst_vaapi_context_set_profile(GstVaapiContext *context, GstVaapiProfile profile)
GstVaapiEntrypoint
gst_vaapi_context_get_entrypoint(GstVaapiContext *context)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), 0);
g_return_val_if_fail(context != NULL, 0);
return context->info.entrypoint;
}
......@@ -865,7 +865,7 @@ gst_vaapi_context_get_size(
guint *pheight
)
{
g_return_if_fail(GST_VAAPI_IS_CONTEXT(context));
g_return_if_fail(context != NULL);
if (pwidth)
*pwidth = context->info.width;
......@@ -892,7 +892,7 @@ gst_vaapi_context_get_size(
GstVaapiSurfaceProxy *
gst_vaapi_context_get_surface_proxy(GstVaapiContext *context)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
g_return_val_if_fail(context != NULL, NULL);
return gst_vaapi_surface_proxy_new_from_pool(
GST_VAAPI_SURFACE_POOL(context->surfaces_pool));
......@@ -909,7 +909,7 @@ gst_vaapi_context_get_surface_proxy(GstVaapiContext *context)
guint
gst_vaapi_context_get_surface_count(GstVaapiContext *context)
{
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), 0);
g_return_val_if_fail(context != NULL, 0);
return gst_vaapi_video_pool_get_size(context->surfaces_pool);
}
......@@ -937,7 +937,7 @@ gst_vaapi_context_apply_composition(
guint i, n_rectangles;
gboolean reassociate = FALSE;
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), FALSE);
g_return_val_if_fail(context != NULL, FALSE);
if (!context->surfaces)
return FALSE;
......
......@@ -34,9 +34,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_CONTEXT(obj) \
((GstVaapiContext *)(obj))
#define GST_VAAPI_IS_CONTEXT(obj) \
((obj) != NULL)
typedef struct _GstVaapiContext GstVaapiContext;
typedef struct _GstVaapiContextInfo GstVaapiContextInfo;
......
......@@ -516,7 +516,7 @@ gst_vaapi_decoder_new(const GstVaapiDecoderClass *klass,
{
GstVaapiDecoder *decoder;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
g_return_val_if_fail(GST_IS_CAPS(caps), NULL);
decoder = (GstVaapiDecoder *)
......@@ -587,7 +587,7 @@ gst_vaapi_decoder_replace(GstVaapiDecoder **old_decoder_ptr,
gpointer
gst_vaapi_decoder_get_user_data(GstVaapiDecoder *decoder)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL);
g_return_val_if_fail(decoder != NULL, NULL);
return decoder->user_data;
}
......@@ -603,7 +603,7 @@ gst_vaapi_decoder_get_user_data(GstVaapiDecoder *decoder)
void
gst_vaapi_decoder_set_user_data(GstVaapiDecoder *decoder, gpointer user_data)
{
g_return_if_fail(GST_VAAPI_IS_DECODER(decoder));
g_return_if_fail(decoder != NULL);
decoder->user_data = user_data;
}
......@@ -619,7 +619,7 @@ gst_vaapi_decoder_set_user_data(GstVaapiDecoder *decoder, gpointer user_data)
GstVaapiCodec
gst_vaapi_decoder_get_codec(GstVaapiDecoder *decoder)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), (GstVaapiCodec)0);
g_return_val_if_fail(decoder != NULL, (GstVaapiCodec)0);
return decoder->codec;
}
......@@ -637,7 +637,7 @@ gst_vaapi_decoder_get_codec(GstVaapiDecoder *decoder)
GstVideoCodecState *
gst_vaapi_decoder_get_codec_state(GstVaapiDecoder *decoder)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), NULL);
g_return_val_if_fail(decoder != NULL, NULL);
return GST_VAAPI_DECODER_CODEC_STATE(decoder);
}
......@@ -655,7 +655,7 @@ void
gst_vaapi_decoder_set_codec_state_changed_func(GstVaapiDecoder *decoder,
GstVaapiDecoderStateChangedFunc func, gpointer user_data)
{
g_return_if_fail(GST_VAAPI_IS_DECODER(decoder));
g_return_if_fail(decoder != NULL);
decoder->codec_state_changed_func = func;
decoder->codec_state_changed_data = user_data;
......@@ -694,7 +694,7 @@ gst_vaapi_decoder_get_caps(GstVaapiDecoder *decoder)
gboolean
gst_vaapi_decoder_put_buffer(GstVaapiDecoder *decoder, GstBuffer *buf)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder), FALSE);
g_return_val_if_fail(decoder != NULL, FALSE);
if (buf) {
if (gst_buffer_get_size(buf) == 0)
......@@ -725,7 +725,7 @@ gst_vaapi_decoder_get_surface(GstVaapiDecoder *decoder,
GstVideoCodecFrame *frame;
GstVaapiDecoderStatus status;
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder),
g_return_val_if_fail(decoder != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
g_return_val_if_fail(out_proxy_ptr != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
......@@ -802,7 +802,7 @@ gst_vaapi_decoder_get_frame_with_timeout(GstVaapiDecoder *decoder,
{
GstVideoCodecFrame *out_frame;
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder),
g_return_val_if_fail(decoder != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
g_return_val_if_fail(out_frame_ptr != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
......@@ -982,7 +982,7 @@ gst_vaapi_decoder_parse(GstVaapiDecoder *decoder,
GstVideoCodecFrame *base_frame, GstAdapter *adapter, gboolean at_eos,
guint *got_unit_size_ptr, gboolean *got_frame_ptr)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder),
g_return_val_if_fail(decoder != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
g_return_val_if_fail(base_frame != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
......@@ -1002,7 +1002,7 @@ gst_vaapi_decoder_decode(GstVaapiDecoder *decoder, GstVideoCodecFrame *frame)
{
GstVaapiDecoderStatus status;
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder),
g_return_val_if_fail(decoder != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
g_return_val_if_fail(frame != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
......@@ -1018,7 +1018,7 @@ gst_vaapi_decoder_decode(GstVaapiDecoder *decoder, GstVideoCodecFrame *frame)
GstVaapiDecoderStatus
gst_vaapi_decoder_flush(GstVaapiDecoder *decoder)
{
g_return_val_if_fail(GST_VAAPI_IS_DECODER(decoder),
g_return_val_if_fail(decoder != NULL,
GST_VAAPI_DECODER_STATUS_ERROR_INVALID_PARAMETER);
return do_flush(decoder);
......
......@@ -34,9 +34,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DECODER(obj) \
((GstVaapiDecoder *)(obj))
#define GST_VAAPI_IS_DECODER(obj) \
((obj) != NULL)
typedef struct _GstVaapiDecoder GstVaapiDecoder;
typedef void (*GstVaapiDecoderStateChangedFunc)(GstVaapiDecoder *decoder,
const GstVideoCodecState *codec_state, gpointer user_data);
......
......@@ -1071,7 +1071,7 @@ gst_vaapi_display_lock(GstVaapiDisplay *display)
{
GstVaapiDisplayClass *klass;
g_return_if_fail(GST_VAAPI_IS_DISPLAY(display));
g_return_if_fail(display != NULL);
klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
if (klass->lock)
......@@ -1091,7 +1091,7 @@ gst_vaapi_display_unlock(GstVaapiDisplay *display)
{
GstVaapiDisplayClass *klass;
g_return_if_fail(GST_VAAPI_IS_DISPLAY(display));
g_return_if_fail(display != NULL);
klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
if (klass->unlock)
......@@ -1114,7 +1114,7 @@ gst_vaapi_display_sync(GstVaapiDisplay *display)
{
GstVaapiDisplayClass *klass;
g_return_if_fail(GST_VAAPI_IS_DISPLAY(display));
g_return_if_fail(display != NULL);
klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
if (klass->sync)
......@@ -1137,7 +1137,7 @@ gst_vaapi_display_flush(GstVaapiDisplay *display)
{
GstVaapiDisplayClass *klass;
g_return_if_fail(GST_VAAPI_IS_DISPLAY(display));
g_return_if_fail(display != NULL);
klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
if (klass->flush)
......@@ -1155,8 +1155,7 @@ gst_vaapi_display_flush(GstVaapiDisplay *display)
GstVaapiDisplayType
gst_vaapi_display_get_display_type(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display),
GST_VAAPI_DISPLAY_TYPE_ANY);
g_return_val_if_fail(display != NULL, GST_VAAPI_DISPLAY_TYPE_ANY);
return GST_VAAPI_DISPLAY_GET_PRIVATE(display)->display_type;
}
......@@ -1172,7 +1171,7 @@ gst_vaapi_display_get_display_type(GstVaapiDisplay *display)
VADisplay
gst_vaapi_display_get_display(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return GST_VAAPI_DISPLAY_GET_PRIVATE(display)->display;
}
......@@ -1188,7 +1187,7 @@ gst_vaapi_display_get_display(GstVaapiDisplay *display)
guint
gst_vaapi_display_get_width(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), 0);
g_return_val_if_fail(display != NULL, 0);
return GST_VAAPI_DISPLAY_GET_PRIVATE(display)->width;
}
......@@ -1204,7 +1203,7 @@ gst_vaapi_display_get_width(GstVaapiDisplay *display)
guint
gst_vaapi_display_get_height(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), 0);
g_return_val_if_fail(display != NULL, 0);
return GST_VAAPI_DISPLAY_GET_PRIVATE(display)->height;
}
......@@ -1244,7 +1243,7 @@ gst_vaapi_display_get_pixel_aspect_ratio(
guint *par_d
)
{
g_return_if_fail(GST_VAAPI_IS_DISPLAY(display));
g_return_if_fail(display != NULL);
if (par_n)
*par_n = GST_VAAPI_DISPLAY_GET_PRIVATE(display)->par_n;
......@@ -1264,7 +1263,7 @@ gst_vaapi_display_get_pixel_aspect_ratio(
GstCaps *
gst_vaapi_display_get_decode_caps(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return get_profile_caps(GST_VAAPI_DISPLAY_GET_PRIVATE(display)->decoders);
}
......@@ -1287,7 +1286,7 @@ gst_vaapi_display_has_decoder(
GstVaapiEntrypoint entrypoint
)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
return find_config(
GST_VAAPI_DISPLAY_GET_PRIVATE(display)->decoders, profile, entrypoint);
......@@ -1304,7 +1303,7 @@ gst_vaapi_display_has_decoder(
GstCaps *
gst_vaapi_display_get_encode_caps(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return get_profile_caps(GST_VAAPI_DISPLAY_GET_PRIVATE(display)->encoders);
}
......@@ -1327,7 +1326,7 @@ gst_vaapi_display_has_encoder(
GstVaapiEntrypoint entrypoint
)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
return find_config(
GST_VAAPI_DISPLAY_GET_PRIVATE(display)->encoders, profile, entrypoint);
......@@ -1352,7 +1351,7 @@ gst_vaapi_display_has_encoder(
GstCaps *
gst_vaapi_display_get_image_caps(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return get_format_caps(
GST_VAAPI_DISPLAY_GET_PRIVATE(display)->image_formats);
......@@ -1373,7 +1372,7 @@ gst_vaapi_display_has_image_format(
GstVaapiImageFormat format
)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
g_return_val_if_fail(format, FALSE);
if (find_format(
......@@ -1404,7 +1403,7 @@ gst_vaapi_display_has_image_format(
GstCaps *
gst_vaapi_display_get_subpicture_caps(GstVaapiDisplay *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return get_format_caps(
GST_VAAPI_DISPLAY_GET_PRIVATE(display)->subpicture_formats);
......@@ -1430,7 +1429,7 @@ gst_vaapi_display_has_subpicture_format(
{
const GstVaapiFormatInfo *fip;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
g_return_val_if_fail(format, FALSE);
fip = find_format_info(
......@@ -1458,7 +1457,7 @@ gst_vaapi_display_has_subpicture_format(
gboolean
gst_vaapi_display_has_property(GstVaapiDisplay *display, const gchar *name)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
g_return_val_if_fail(name, FALSE);
return find_property(
......@@ -1471,7 +1470,7 @@ gst_vaapi_display_get_property(GstVaapiDisplay *display, const gchar *name,
{
const GstVaapiProperty *prop;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
g_return_val_if_fail(name != NULL, FALSE);
g_return_val_if_fail(out_value != NULL, FALSE);
......@@ -1520,7 +1519,7 @@ gst_vaapi_display_set_property(GstVaapiDisplay *display, const gchar *name,
{
const GstVaapiProperty *prop;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
g_return_val_if_fail(name != NULL, FALSE);
g_return_val_if_fail(value != NULL, FALSE);
......@@ -1686,7 +1685,7 @@ gst_vaapi_display_get_render_mode(
GstVaapiRenderMode *pmode
)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
/* Try with render-mode attribute */
if (get_render_mode_VADisplayAttribRenderMode(display, pmode))
......@@ -1720,7 +1719,7 @@ gst_vaapi_display_set_render_mode(
{
gint modes, devices;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
if (!get_attribute(display, VADisplayAttribRenderDevice, &devices))
return FALSE;
......@@ -1762,7 +1761,7 @@ gst_vaapi_display_get_rotation(GstVaapiDisplay *display)
{
gint value;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), DEFAULT_ROTATION);
g_return_val_if_fail(display != NULL, DEFAULT_ROTATION);
if (!get_attribute(display, VADisplayAttribRotation, &value))
value = VA_ROTATION_NONE;
......@@ -1790,7 +1789,7 @@ gst_vaapi_display_set_rotation(
{
guint value;
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY(display), FALSE);
g_return_val_if_fail(display != NULL, FALSE);
value = from_GstVaapiRotation(rotation);
if (!set_attribute(display, VADisplayAttribRotation, value))
......
......@@ -34,9 +34,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY(obj) \
((GstVaapiDisplay *)(obj))
#define GST_VAAPI_IS_DISPLAY(obj) \
((obj) != NULL)
typedef struct _GstVaapiDisplayInfo GstVaapiDisplayInfo;
typedef struct _GstVaapiDisplay GstVaapiDisplay;
......
......@@ -417,7 +417,7 @@ gst_vaapi_display_drm_new_with_device(gint device)
gint
gst_vaapi_display_drm_get_device(GstVaapiDisplayDRM *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_DRM(display), -1);
g_return_val_if_fail(display != NULL, -1);
return GST_VAAPI_DISPLAY_DRM_DEVICE(display);
}
......@@ -438,7 +438,7 @@ gst_vaapi_display_drm_get_device(GstVaapiDisplayDRM *display)
const gchar *
gst_vaapi_display_drm_get_device_path(GstVaapiDisplayDRM *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_DRM(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return get_device_path(GST_VAAPI_DISPLAY_CAST(display));
}
......@@ -29,9 +29,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_DRM(obj) \
((GstVaapiDisplayDRM *)(obj))
#define GST_VAAPI_IS_DISPLAY_DRM(obj) \
((obj) != NULL)
typedef struct _GstVaapiDisplayDRM GstVaapiDisplayDRM;
GstVaapiDisplay *
......
......@@ -32,9 +32,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_GLX(obj) \
((GstVaapiDisplayGLX *)(obj))
#define GST_VAAPI_IS_DISPLAY_GLX(obj) \
((obj) != NULL)
typedef struct _GstVaapiDisplayGLX GstVaapiDisplayGLX;
GstVaapiDisplay *
......
......@@ -451,7 +451,7 @@ gst_vaapi_display_wayland_new_with_display(struct wl_display *wl_display)
struct wl_display *
gst_vaapi_display_wayland_get_display(GstVaapiDisplayWayland *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_WAYLAND(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return GST_VAAPI_DISPLAY_WL_DISPLAY(display);
}
......@@ -30,9 +30,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_WAYLAND(obj) \
((GstVaapiDisplayWayland *)(obj))
#define GST_VAAPI_IS_DISPLAY_WAYLAND(obj) \
((obj) != NULL)
typedef struct _GstVaapiDisplayWayland GstVaapiDisplayWayland;
GstVaapiDisplay *
......
......@@ -452,7 +452,7 @@ gst_vaapi_display_x11_new_with_display(Display *x11_display)
Display *
gst_vaapi_display_x11_get_display(GstVaapiDisplayX11 *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
g_return_val_if_fail(display != NULL, NULL);
return GST_VAAPI_DISPLAY_XDISPLAY(display);
}
......@@ -470,7 +470,7 @@ gst_vaapi_display_x11_get_display(GstVaapiDisplayX11 *display)
int
gst_vaapi_display_x11_get_screen(GstVaapiDisplayX11 *display)
{
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), -1);
g_return_val_if_fail(display != NULL, -1);
return GST_VAAPI_DISPLAY_XSCREEN(display);
}
......@@ -490,7 +490,7 @@ void
gst_vaapi_display_x11_set_synchronous(GstVaapiDisplayX11 *display,
gboolean synchronous)
{
g_return_if_fail(GST_VAAPI_IS_DISPLAY_X11(display));
g_return_if_fail(display != NULL);
set_synchronous(display, synchronous);
}
......@@ -31,9 +31,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_DISPLAY_X11(obj) \
((GstVaapiDisplayX11 *)(obj))
#define GST_VAAPI_IS_DISPLAY_X11(obj) \
((obj) != NULL)
typedef struct _GstVaapiDisplayX11 GstVaapiDisplayX11;
GstVaapiDisplay *
......
......@@ -339,7 +339,7 @@ error:
GstVaapiID
gst_vaapi_image_get_id(GstVaapiImage *image)
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), VA_INVALID_ID);
g_return_val_if_fail(image != NULL, VA_INVALID_ID);
return GST_VAAPI_OBJECT_ID(image);
}
......@@ -356,7 +356,7 @@ gst_vaapi_image_get_id(GstVaapiImage *image)
gboolean
gst_vaapi_image_get_image(GstVaapiImage *image, VAImage *va_image)
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), FALSE);
g_return_val_if_fail(image != NULL, FALSE);
if (va_image)
*va_image = image->image;
......@@ -441,7 +441,7 @@ _gst_vaapi_image_set_image(GstVaapiImage *image, const VAImage *va_image)
GstVaapiImageFormat
gst_vaapi_image_get_format(GstVaapiImage *image)
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), 0);
g_return_val_if_fail(image != NULL, 0);
return image->format;
}
......@@ -457,7 +457,7 @@ gst_vaapi_image_get_format(GstVaapiImage *image)
guint
gst_vaapi_image_get_width(GstVaapiImage *image)
{