blob: 7af7dea43b79796dfc139e87bb571e7b69ed019c [file] [log] [blame]
/*
* # Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstionallocator.h"
#include "gstglbox.h"
#include "gstglsvgoverlay.h"
#define CORAL_LICENSE GST_LICENSE_UNKNOWN /* Apache not supported */
#define ORIGIN "https://coral.ai"
#define PACKAGE "GstCoral"
static gboolean
plugin_init (GstPlugin * plugin)
{
GstAllocator *ion;
ion = (GstAllocator *) g_object_new (GST_TYPE_ALLOCATOR_ION, NULL);
gst_object_ref_sink (ion);
if (gst_allocator_ion_init_check (GST_ALLOCATOR_ION (ion))) {
gst_allocator_register (GST_ALLOCATOR_ION_NAME, ion);
} else {
/* ION allocator not supported. */
gst_object_unref (ion);
}
if (!gst_element_register (plugin, "glbox",
GST_RANK_NONE, gst_gl_box_get_type ())) {
return FALSE;
}
if (!gst_element_register (plugin, "glsvgoverlay",
GST_RANK_NONE, gst_gl_svg_overlay_get_type ())) {
return FALSE;
}
return TRUE;
}
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
coral,
"Coral plugin",
plugin_init,
G_STRINGIFY (CORAL_VERSION),
CORAL_LICENSE,
PACKAGE,
ORIGIN);