mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
|
/* GStreamer
|
||
|
* Copyright (C) 2019 Seungha Yang <seungha.yang@navercorp.com>
|
||
|
* Copyright (C) 2020 Seungha Yang <seungha@centricular.com>
|
||
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License as published by the Free Software Foundation; either
|
||
|
* version 2 of the License, or (at your option) any later version.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public
|
||
|
* License along with this library; if not, write to the
|
||
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifdef HAVE_CONFIG_H
|
||
|
#include "config.h"
|
||
|
#endif
|
||
|
|
||
|
#include <gst/gst.h>
|
||
|
#include "gstmfvideosrc.h"
|
||
|
#include "gstmfutils.h"
|
||
|
|
||
|
GST_DEBUG_CATEGORY (gst_mf_debug);
|
||
|
GST_DEBUG_CATEGORY (gst_mf_utils_debug);
|
||
|
GST_DEBUG_CATEGORY (gst_mf_source_object_debug);
|
||
|
|
||
|
#define GST_CAT_DEFAULT gst_mf_debug
|
||
|
|
||
|
static gboolean
|
||
|
plugin_init (GstPlugin * plugin)
|
||
|
{
|
||
|
HRESULT hr;
|
||
|
|
||
|
GST_DEBUG_CATEGORY_INIT (gst_mf_debug, "mf", 0, "media foundation");
|
||
|
GST_DEBUG_CATEGORY_INIT (gst_mf_utils_debug,
|
||
|
"mfutils", 0, "media foundation utility functions");
|
||
|
GST_DEBUG_CATEGORY_INIT (gst_mf_source_object_debug,
|
||
|
"mfsourceobject", 0, "mfsourceobject");
|
||
|
|
||
|
hr = MFStartup (MF_VERSION, MFSTARTUP_NOSOCKET);
|
||
|
if (!gst_mf_result (hr)) {
|
||
|
GST_WARNING ("MFStartup failure, hr: 0x%x", hr);
|
||
|
return TRUE;
|
||
|
}
|
||
|
|
||
|
gst_element_register (plugin,
|
||
|
"mfvideosrc", GST_RANK_SECONDARY, GST_TYPE_MF_VIDEO_SRC);
|
||
|
|
||
|
return TRUE;
|
||
|
}
|
||
|
|
||
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||
|
GST_VERSION_MINOR,
|
||
|
mediafoundation,
|
||
|
"Microsoft Media Foundation plugin",
|
||
|
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|