1 /*
2 * Copyright (C) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "config.h"
16 #include "gst_surface_pool_src.h"
17 #include "gst_shmem_pool_src.h"
18
plugin_init(GstPlugin * plugin)19 static gboolean plugin_init(GstPlugin *plugin)
20 {
21 gboolean ret = FALSE;
22 if (gst_element_register(plugin, "surfacesrc", GST_RANK_PRIMARY, GST_TYPE_SURFACE_POOL_SRC)) {
23 ret = TRUE;
24 } else {
25 GST_WARNING_OBJECT(plugin, "register surfacesrc failed");
26 }
27 if (gst_element_register(plugin, "shmemsrc", GST_RANK_PRIMARY, GST_TYPE_SHMEM_POOL_SRC)) {
28 ret = TRUE;
29 } else {
30 GST_WARNING_OBJECT(plugin, "register shmemsrc failed");
31 }
32 return ret;
33 }
34
35 GST_PLUGIN_DEFINE(GST_VERSION_MAJOR,
36 GST_VERSION_MINOR,
37 _mem_src,
38 "GStreamer Codec Source",
39 plugin_init,
40 PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
41