directshow: Add since marker
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / directshow / plugin.cpp
1 /* GStreamer
2  * Copyright (C) 2022 Seungha Yang <seungha@centricular.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 /**
21  * plugin-directshow:
22  *
23  * Since: 1.22
24  */
25
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29
30 #include <gst/gst.h>
31
32 #include "dshowvideosink.h"
33 #include "gstdshowaudiodec.h"
34 #include "gstdshowvideodec.h"
35 #include "gstdshowaudiosrc.h"
36 #include "gstdshowvideosrc.h"
37 #include "dshowdeviceprovider.h"
38
39 GST_DEBUG_CATEGORY (dshowdec_debug);
40 GST_DEBUG_CATEGORY (dshowsrcwrapper_debug);
41 GST_DEBUG_CATEGORY (dshowvideosrc_debug);
42
43 static gboolean
44 plugin_init (GstPlugin * plugin)
45 {
46   GST_DEBUG_CATEGORY_INIT (dshowdec_debug, "dshowdec", 0, "DirectShow decoder");
47   GST_DEBUG_CATEGORY_INIT (dshowsrcwrapper_debug, "dshowsrcwrapper", 0,
48       "DirectShow source wrapper");
49   GST_DEBUG_CATEGORY_INIT (dshowvideosrc_debug, "dshowvideosrc", 0,
50       "Directshow video source");
51
52   dshow_adec_register (plugin);
53   dshow_vdec_register (plugin);
54
55   gst_element_register (plugin, "dshowvideosink",
56       GST_RANK_MARGINAL, GST_TYPE_DSHOWVIDEOSINK);
57   gst_element_register (plugin, "dshowaudiosrc",
58       GST_RANK_NONE, GST_TYPE_DSHOWAUDIOSRC);
59   gst_element_register (plugin, "dshowvideosrc",
60       GST_RANK_NONE, GST_TYPE_DSHOWVIDEOSRC);
61
62   gst_device_provider_register (plugin, "dshowdeviceprovider",
63       GST_RANK_MARGINAL, GST_TYPE_DSHOW_DEVICE_PROVIDER);
64
65   return TRUE;
66 }
67
68 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
69     GST_VERSION_MINOR,
70     directshow,
71     "DirectShow plugin",
72     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)