video: Rename gst_video_color_transfer_*() to gst_video_transfer_function_*() in new API

The type is called GstVideoTransferFunction so the function names should
match, otherwise gobject-introspection is keeping the functions as
global functions instead of methods on the type.

The same mistake was also made in lots of other APIs over the years, but
here we can at least fix it for 1.18 still.

Thanks to Marijn Suijten for noticing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/807>
This commit is contained in:
Sebastian Dröge 2020-09-07 12:10:16 +03:00
parent 24d939a19b
commit 91ec4e06d7
5 changed files with 18 additions and 18 deletions

View file

@ -669,7 +669,7 @@ gst_video_color_matrix_to_iso (GstVideoColorMatrix matrix)
}
/**
* gst_video_color_transfer_to_iso:
* gst_video_transfer_function_to_iso:
* @func: a #GstVideoTransferFunction
*
* Converts #GstVideoTransferFunction to the "transfer characteristics"
@ -682,7 +682,7 @@ gst_video_color_matrix_to_iso (GstVideoColorMatrix matrix)
* Since: 1.18
*/
guint
gst_video_color_transfer_to_iso (GstVideoTransferFunction func)
gst_video_transfer_function_to_iso (GstVideoTransferFunction func)
{
switch (func) {
case GST_VIDEO_TRANSFER_BT709:
@ -804,7 +804,7 @@ gst_video_color_matrix_from_iso (guint value)
}
/**
* gst_video_color_transfer_from_iso:
* gst_video_transfer_function_from_iso:
* @value: a ITU-T H.273 transfer characteristics value
*
* Converts the @value to the #GstVideoTransferFunction
@ -818,7 +818,7 @@ gst_video_color_matrix_from_iso (guint value)
* Since: 1.18
*/
GstVideoTransferFunction
gst_video_color_transfer_from_iso (guint value)
gst_video_transfer_function_from_iso (guint value)
{
switch (value) {
case 1:
@ -918,7 +918,7 @@ map_equivalent_transfer (GstVideoTransferFunction func, guint bpp)
}
/**
* gst_video_color_transfer_is_equivalent:
* gst_video_transfer_function_is_equivalent:
* @from_func: #GstVideoTransferFunction to convert from
* @from_bpp: bits per pixel to convert from
* @to_func: #GstVideoTransferFunction to convert into
@ -935,7 +935,7 @@ map_equivalent_transfer (GstVideoTransferFunction func, guint bpp)
* Since: 1.18
*/
gboolean
gst_video_color_transfer_is_equivalent (GstVideoTransferFunction from_func,
gst_video_transfer_function_is_equivalent (GstVideoTransferFunction from_func,
guint from_bpp, GstVideoTransferFunction to_func, guint to_bpp)
{
from_func = map_equivalent_transfer (from_func, from_bpp);

View file

@ -275,7 +275,7 @@ GST_VIDEO_API
guint gst_video_color_matrix_to_iso (GstVideoColorMatrix matrix);
GST_VIDEO_API
guint gst_video_color_transfer_to_iso (GstVideoTransferFunction func);
guint gst_video_transfer_function_to_iso (GstVideoTransferFunction func);
GST_VIDEO_API
guint gst_video_color_primaries_to_iso (GstVideoColorPrimaries primaries);
@ -284,16 +284,16 @@ GST_VIDEO_API
GstVideoColorMatrix gst_video_color_matrix_from_iso (guint value);
GST_VIDEO_API
GstVideoTransferFunction gst_video_color_transfer_from_iso (guint value);
GstVideoTransferFunction gst_video_transfer_function_from_iso (guint value);
GST_VIDEO_API
GstVideoColorPrimaries gst_video_color_primaries_from_iso (guint value);
GST_VIDEO_API
gboolean gst_video_color_transfer_is_equivalent (GstVideoTransferFunction from_func,
guint from_bpp,
GstVideoTransferFunction to_func,
guint to_bpp);
gboolean gst_video_transfer_function_is_equivalent (GstVideoTransferFunction from_func,
guint from_bpp,
GstVideoTransferFunction to_func,
guint to_bpp);
G_END_DECLS

View file

@ -6764,7 +6764,7 @@ video_converter_lookup_fastpath (GstVideoConverter * convert)
/* fastpaths don't do gamma */
if (CHECK_GAMMA_REMAP (convert) && (!same_size
|| !gst_video_color_transfer_is_equivalent (in_transf, in_bpp,
|| !gst_video_transfer_function_is_equivalent (in_transf, in_bpp,
out_transf, out_bpp)))
return FALSE;

View file

@ -459,9 +459,9 @@ gst_video_convert_set_info (GstVideoFilter * filter,
tmp_info = *in_info;
tmp_info.colorimetry.transfer = out_info->colorimetry.transfer;
if (gst_video_info_is_equal (&tmp_info, out_info)) {
if (gst_video_color_transfer_is_equivalent (in_info->colorimetry.transfer,
in_info->finfo->bits, out_info->colorimetry.transfer,
out_info->finfo->bits)) {
if (gst_video_transfer_function_is_equivalent (in_info->
colorimetry.transfer, in_info->finfo->bits,
out_info->colorimetry.transfer, out_info->finfo->bits)) {
gstbasetransform_class->passthrough_on_same_caps = FALSE;
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE);
return TRUE;

View file

@ -3208,7 +3208,7 @@ GST_START_TEST (test_video_color_from_to_iso)
}
for (i = 0; i <= GST_VIDEO_TRANSFER_ARIB_STD_B67; i++) {
guint transfer_val = gst_video_color_transfer_to_iso (i);
guint transfer_val = gst_video_transfer_function_to_iso (i);
/* don't know how to map below values to spec. */
if (i == GST_VIDEO_TRANSFER_GAMMA18 || i == GST_VIDEO_TRANSFER_GAMMA20
@ -3217,7 +3217,7 @@ GST_START_TEST (test_video_color_from_to_iso)
continue;
}
fail_unless_equals_int (gst_video_color_transfer_from_iso (transfer_val),
fail_unless_equals_int (gst_video_transfer_function_from_iso (transfer_val),
i);
}