2016-04-01 17:25:25 +00:00
|
|
|
/* GStreamer Intel MSDK plugin
|
|
|
|
* Copyright (c) 2016, Oblong Industries, Inc.
|
2018-05-16 00:32:22 +00:00
|
|
|
* Copyright (c) 2018, Intel Corporation
|
2016-04-01 17:25:25 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
|
|
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
|
|
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
|
|
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2016-11-07 20:32:38 +00:00
|
|
|
#include "gstmsdkh264dec.h"
|
2016-04-01 17:25:25 +00:00
|
|
|
#include "gstmsdkh264enc.h"
|
2016-11-29 03:14:20 +00:00
|
|
|
#include "gstmsdkh265dec.h"
|
2016-04-01 17:25:25 +00:00
|
|
|
#include "gstmsdkh265enc.h"
|
2016-11-22 21:55:00 +00:00
|
|
|
#include "gstmsdkmjpegdec.h"
|
2016-10-05 22:32:43 +00:00
|
|
|
#include "gstmsdkmjpegenc.h"
|
2018-01-10 19:40:24 +00:00
|
|
|
#include "gstmsdkmpeg2dec.h"
|
2016-04-01 17:25:25 +00:00
|
|
|
#include "gstmsdkmpeg2enc.h"
|
2017-10-30 06:06:32 +00:00
|
|
|
#include "gstmsdkvp8dec.h"
|
2016-04-01 17:25:25 +00:00
|
|
|
#include "gstmsdkvp8enc.h"
|
2018-02-13 23:40:54 +00:00
|
|
|
#include "gstmsdkvc1dec.h"
|
2018-05-16 00:33:00 +00:00
|
|
|
#ifdef USE_MSDK_VP9_DEC
|
2018-05-16 00:32:22 +00:00
|
|
|
#include "gstmsdkvp9dec.h"
|
2018-05-16 00:33:00 +00:00
|
|
|
#endif
|
2018-03-06 13:51:05 +00:00
|
|
|
#include "gstmsdkvpp.h"
|
2016-04-01 17:25:25 +00:00
|
|
|
|
2018-03-13 22:20:50 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdk_debug);
|
2016-11-07 20:32:38 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkdec_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkenc_debug);
|
2018-03-06 13:51:05 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkvpp_debug);
|
2016-11-07 20:32:38 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkh264dec_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkh264enc_debug);
|
2016-11-29 03:14:20 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkh265dec_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkh265enc_debug);
|
2016-11-22 21:55:00 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkmjpegdec_debug);
|
2016-10-05 22:32:43 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkmjpegenc_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkmpeg2enc_debug);
|
2018-01-11 03:24:07 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkmpeg2dec_debug);
|
2017-10-30 06:06:32 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkvp8dec_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkvp8enc_debug);
|
2018-02-13 23:40:54 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkvc1dec_debug);
|
2018-05-16 00:32:22 +00:00
|
|
|
GST_DEBUG_CATEGORY (gst_msdkvp9dec_debug);
|
2016-04-01 17:25:25 +00:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
plugin_init (GstPlugin * plugin)
|
|
|
|
{
|
|
|
|
gboolean ret;
|
|
|
|
|
2018-03-13 22:20:50 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdk_debug, "msdk", 0, "msdk");
|
2016-11-07 20:32:38 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkdec_debug, "msdkdec", 0, "msdkdec");
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkenc_debug, "msdkenc", 0, "msdkenc");
|
2016-11-07 20:32:38 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkh264dec_debug, "msdkh264dec", 0,
|
|
|
|
"msdkh264dec");
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkh264enc_debug, "msdkh264enc", 0,
|
|
|
|
"msdkh264enc");
|
2018-03-06 13:51:05 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkvpp_debug, "msdkvpp", 0, "msdkvpp");
|
2016-11-29 03:14:20 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkh265dec_debug, "msdkh265dec", 0,
|
|
|
|
"msdkh265dec");
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkh265enc_debug, "msdkh265enc", 0,
|
|
|
|
"msdkh265enc");
|
2016-11-22 21:55:00 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkmjpegdec_debug, "msdkmjpegdec", 0,
|
|
|
|
"msdkmjpegdec");
|
2016-10-05 22:32:43 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkmjpegenc_debug, "msdkmjpegenc", 0,
|
|
|
|
"msdkmjpegenc");
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkmpeg2enc_debug, "msdkmpeg2enc", 0,
|
|
|
|
"msdkmpeg2enc");
|
2018-01-11 03:24:07 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkmpeg2dec_debug, "msdkmpeg2dec", 0,
|
|
|
|
"msdkmpeg2dec");
|
2017-10-30 06:06:32 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkvp8dec_debug, "msdkvp8dec", 0, "msdkvp8dec");
|
2016-04-01 17:25:25 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkvp8enc_debug, "msdkvp8enc", 0, "msdkvp8enc");
|
2018-02-13 23:40:54 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkvc1dec_debug, "msdkvc1dec", 0, "msdkvc1dec");
|
2019-04-26 00:40:28 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_msdkvp9dec_debug, "msdkvp9dec", 0, "msdkvp9dec");
|
2016-04-01 17:25:25 +00:00
|
|
|
|
|
|
|
if (!msdk_is_available ())
|
|
|
|
return FALSE;
|
|
|
|
|
2016-11-07 20:32:38 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkh264dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKH264DEC);
|
|
|
|
|
2016-04-01 17:25:25 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkh264enc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKH264ENC);
|
|
|
|
|
2016-11-29 03:14:20 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkh265dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKH265DEC);
|
|
|
|
|
2016-04-01 17:25:25 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkh265enc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKH265ENC);
|
|
|
|
|
2016-11-22 21:55:00 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkmjpegdec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKMJPEGDEC);
|
|
|
|
|
2016-10-05 22:32:43 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkmjpegenc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKMJPEGENC);
|
|
|
|
|
2018-01-10 19:40:24 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkmpeg2dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKMPEG2DEC);
|
|
|
|
|
2016-04-01 17:25:25 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkmpeg2enc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKMPEG2ENC);
|
|
|
|
|
2017-10-30 06:06:32 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkvp8dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKVP8DEC);
|
|
|
|
|
2016-04-01 17:25:25 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkvp8enc", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKVP8ENC);
|
|
|
|
|
2018-02-13 23:40:54 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkvc1dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKVC1DEC);
|
2018-05-16 00:33:00 +00:00
|
|
|
#ifdef USE_MSDK_VP9_DEC
|
2018-05-16 00:32:22 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkvp9dec", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKVP9DEC);
|
2018-05-16 00:33:00 +00:00
|
|
|
#endif
|
2018-05-16 00:32:22 +00:00
|
|
|
|
2018-03-06 13:51:05 +00:00
|
|
|
ret = gst_element_register (plugin, "msdkvpp", GST_RANK_NONE,
|
|
|
|
GST_TYPE_MSDKVPP);
|
|
|
|
|
2016-04-01 17:25:25 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
msdk,
|
2018-01-11 10:29:38 +00:00
|
|
|
"Intel Media SDK based elements",
|
2019-03-14 08:37:13 +00:00
|
|
|
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|