mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-18 00:13:49 +00:00
video: Add gst_video_info_is_equal
This commit is contained in:
parent
0a7d047b1f
commit
a22545134d
2 changed files with 38 additions and 1 deletions
|
@ -1530,6 +1530,42 @@ no_endianess:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_video_info_is_equal:
|
||||||
|
* @info: a #GstVideoInfo
|
||||||
|
* @other: a #GstVideoInfo
|
||||||
|
*
|
||||||
|
* Compares two #GstVideoInfo and returns whether they are equal or not
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if @info and @other are equal, else %FALSE.
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
|
||||||
|
{
|
||||||
|
if (GST_VIDEO_INFO_FORMAT (info) != GST_VIDEO_INFO_FORMAT (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_INTERLACE_MODE (info) !=
|
||||||
|
GST_VIDEO_INFO_INTERLACE_MODE (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_FLAGS (info) != GST_VIDEO_INFO_FLAGS (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_WIDTH (info) != GST_VIDEO_INFO_WIDTH (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_HEIGHT (info) != GST_VIDEO_INFO_HEIGHT (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_SIZE (info) != GST_VIDEO_INFO_SIZE (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_PAR_N (info) != GST_VIDEO_INFO_PAR_N (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_PAR_D (info) != GST_VIDEO_INFO_PAR_D (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_FPS_N (info) != GST_VIDEO_INFO_FPS_N (other))
|
||||||
|
return FALSE;
|
||||||
|
if (GST_VIDEO_INFO_FPS_D (info) != GST_VIDEO_INFO_FPS_D (other))
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_video_info_to_caps:
|
* gst_video_info_to_caps:
|
||||||
* @info: a #GstVideoInfo
|
* @info: a #GstVideoInfo
|
||||||
|
|
|
@ -895,7 +895,8 @@ gboolean gst_video_info_convert (GstVideoInfo *info,
|
||||||
gint64 src_value,
|
gint64 src_value,
|
||||||
GstFormat dest_format,
|
GstFormat dest_format,
|
||||||
gint64 *dest_value);
|
gint64 *dest_value);
|
||||||
|
gboolean gst_video_info_is_equal (const GstVideoInfo *info,
|
||||||
|
const GstVideoInfo *other);
|
||||||
/* functions */
|
/* functions */
|
||||||
|
|
||||||
const GValue * gst_video_frame_rate (GstPad * pad);
|
const GValue * gst_video_frame_rate (GstPad * pad);
|
||||||
|
|
Loading…
Reference in a new issue