vaapisink: Expose the overlay capability for compatibility with dvbsuboverlay.
[platform/upstream/gstreamer.git] / gst / vaapi / gstvaapi.c
1 /*
2  *  gstvaapi.c - VA-API element registration
3  *
4  *  Copyright (C) 2011-2013 Intel Corporation
5  *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
6  *  Copyright (C) 2011 Collabora Ltd.
7  *    Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
8  *
9  *  This library is free software; you can redistribute it and/or
10  *  modify it under the terms of the GNU Lesser General Public License
11  *  as published by the Free Software Foundation; either version 2.1
12  *  of the License, or (at your option) any later version.
13  *
14  *  This library is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  *  Lesser General Public License for more details.
18  *
19  *  You should have received a copy of the GNU Lesser General Public
20  *  License along with this library; if not, write to the Free
21  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  *  Boston, MA 02110-1301 USA
23  */
24
25 #include "gstcompat.h"
26 #include <gst/gst.h>
27 #include "gstvaapidecode.h"
28 #include "gstvaapipostproc.h"
29 #include "gstvaapisink.h"
30 #include "gstvaapidecodebin.h"
31
32 #if USE_ENCODERS
33 #include "gstvaapiencode_h264.h"
34 #include "gstvaapiencode_mpeg2.h"
35 #endif
36
37 #if USE_JPEG_ENCODER
38 #include "gstvaapiencode_jpeg.h"
39 #endif
40
41 #if USE_VP8_ENCODER
42 #include "gstvaapiencode_vp8.h"
43 #endif
44
45 #if USE_H265_ENCODER
46 #include "gstvaapiencode_h265.h"
47 #endif
48
49 #define PLUGIN_NAME     "vaapi"
50 #define PLUGIN_DESC     "VA-API based elements"
51 #define PLUGIN_LICENSE  "LGPL"
52
53 static gboolean
54 plugin_init (GstPlugin *plugin)
55 {
56     gst_element_register(plugin, "vaapidecode",
57                          GST_RANK_PRIMARY + 1,
58                          GST_TYPE_VAAPIDECODE);
59     gst_element_register(plugin, "vaapipostproc",
60                          GST_RANK_PRIMARY,
61                          GST_TYPE_VAAPIPOSTPROC);
62     gst_element_register(plugin, "vaapisink",
63                          GST_RANK_PRIMARY,
64                          GST_TYPE_VAAPISINK);
65 #if USE_ENCODERS
66     gst_element_register(plugin, "vaapiencode_h264",
67                          GST_RANK_PRIMARY,
68                          GST_TYPE_VAAPIENCODE_H264);
69     gst_element_register(plugin, "vaapiencode_mpeg2",
70                          GST_RANK_PRIMARY,
71                          GST_TYPE_VAAPIENCODE_MPEG2);
72 #endif
73 #if USE_JPEG_ENCODER
74     gst_element_register(plugin, "vaapiencode_jpeg",
75                          GST_RANK_PRIMARY,
76                          GST_TYPE_VAAPIENCODE_JPEG);
77 #endif
78 #if USE_VP8_ENCODER
79     gst_element_register(plugin, "vaapiencode_vp8",
80                          GST_RANK_PRIMARY,
81                          GST_TYPE_VAAPIENCODE_VP8);
82 #endif
83
84 #if USE_H265_ENCODER
85     gst_element_register(plugin, "vaapiencode_h265",
86                          GST_RANK_PRIMARY,
87                          GST_TYPE_VAAPIENCODE_H265);
88 #endif
89
90 #if GST_CHECK_VERSION(1,4,0)
91     gst_element_register(plugin, "vaapidecodebin",
92                          GST_RANK_PRIMARY + 2,
93                          GST_TYPE_VAAPI_DECODE_BIN);
94 #endif
95     return TRUE;
96 }
97
98 GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR,
99                   vaapi, PLUGIN_DESC, plugin_init,
100                   PACKAGE_VERSION, PLUGIN_LICENSE, PACKAGE, PACKAGE_BUGREPORT)