gstreamer/subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscaleplugin.c
Thibault Saunier d11f13f476 Introduce the videocolorscale element
Now that videoconvert and videoscale's are both based on
GstVideoConverter and are using the exact same code, it makes much more
sense to have one element doing the two operation, and it can be
more efficient in some cases (one single path for both operations).

This removes the `videoscale` and `videoconvert` plugins but keeps the element
but makes them also do both operations (adding some APIs to each element).

There is a small change in API for the `videoscale:dither` property which
was previously a totally unused boolean, it is now an enum and is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/898>
2022-04-20 17:03:21 -04:00

51 lines
1.5 KiB
C

/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/**
* plugin-videoconvertscale:
*
* Since: 1.22
*/
#include "gstvideoscale.h"
#include "gstvideoconvert.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!GST_ELEMENT_REGISTER (videoscale, plugin))
return FALSE;
if (!GST_ELEMENT_REGISTER (videoconvert, plugin))
return FALSE;
if (!GST_ELEMENT_REGISTER (videoconvertscale, plugin))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
videoconvertscale,
"Convert video colorspaces and resizes video frames",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)