mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
vdpau: move plugin definition to a new gstvdpau.c file fix up debug categories
This commit is contained in:
parent
85158b07ea
commit
3d4a340cfa
5 changed files with 35 additions and 38 deletions
|
@ -6,7 +6,8 @@ libgstvdpau_la_SOURCES = \
|
||||||
gstvdpaumpegdecoder.c \
|
gstvdpaumpegdecoder.c \
|
||||||
mpegutil.c \
|
mpegutil.c \
|
||||||
gstvdpauvideoyuv.c \
|
gstvdpauvideoyuv.c \
|
||||||
gstvdpauvideobuffer.c
|
gstvdpauvideobuffer.c \
|
||||||
|
gstvdpau.c
|
||||||
|
|
||||||
libgstvdpau_la_CFLAGS = $(GST_CFLAGS) $(X11_CFLAGS) -Ivdpau
|
libgstvdpau_la_CFLAGS = $(GST_CFLAGS) $(X11_CFLAGS) -Ivdpau
|
||||||
libgstvdpau_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
|
libgstvdpau_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
|
||||||
|
|
25
sys/vdpau/gstvdpau.c
Normal file
25
sys/vdpau/gstvdpau.c
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
#include "gstvdpaumpegdecoder.h"
|
||||||
|
#include "gstvdpauvideoyuv.h"
|
||||||
|
static gboolean
|
||||||
|
vdpau_init (GstPlugin * vdpaumpegdecoder)
|
||||||
|
{
|
||||||
|
gst_element_register (vdpaumpegdecoder, "vdpaumpegdecoder",
|
||||||
|
GST_RANK_NONE, GST_TYPE_VDPAU_MPEG_DECODER);
|
||||||
|
gst_element_register (vdpaumpegdecoder, "vdpauvideoyuv",
|
||||||
|
GST_RANK_NONE, GST_TYPE_VDPAU_VIDEO_YUV);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
GST_VERSION_MINOR,
|
||||||
|
"vdpau",
|
||||||
|
"Various elements utilizing VDPAU",
|
||||||
|
vdpau_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/")
|
|
@ -24,6 +24,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include "gstvdpaudevice.h"
|
#include "gstvdpaudevice.h"
|
||||||
|
#include "gstvdpauvideobuffer.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,11 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
"systemstream = (boolean) false, parsed = (boolean) true")
|
"systemstream = (boolean) false, parsed = (boolean) true")
|
||||||
);
|
);
|
||||||
|
|
||||||
GST_BOILERPLATE (GstVdpauMpegDecoder, gst_vdpau_mpeg_decoder, GstVdpauDecoder,
|
#define DEBUG_INIT(bla) \
|
||||||
GST_TYPE_VDPAU_DECODER);
|
GST_DEBUG_CATEGORY_INIT (gst_vdpau_mpeg_decoder_debug, "vdpaumpegdecoder", 0, "VDPAU powered mpeg decoder");
|
||||||
|
|
||||||
|
GST_BOILERPLATE_FULL (GstVdpauMpegDecoder, gst_vdpau_mpeg_decoder,
|
||||||
|
GstVdpauDecoder, GST_TYPE_VDPAU_DECODER, DEBUG_INIT);
|
||||||
|
|
||||||
static void gst_vdpau_mpeg_decoder_finalize (GObject * object);
|
static void gst_vdpau_mpeg_decoder_finalize (GObject * object);
|
||||||
static void gst_vdpau_mpeg_decoder_set_property (GObject * object,
|
static void gst_vdpau_mpeg_decoder_set_property (GObject * object,
|
||||||
|
@ -457,36 +460,3 @@ gst_vdpau_mpeg_decoder_get_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* entry point to initialize the plug-in
|
|
||||||
* initialize the plug-in itself
|
|
||||||
* register the element factories and other features
|
|
||||||
*/
|
|
||||||
static gboolean
|
|
||||||
vdpaumpegdecoder_init (GstPlugin * vdpaumpegdecoder)
|
|
||||||
{
|
|
||||||
/* debug category for fltering log messages
|
|
||||||
*
|
|
||||||
* exchange the string 'Template vdpaumpegdecoder' with your description
|
|
||||||
*/
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_vdpau_mpeg_decoder_debug, "vdpaumpegdecoder",
|
|
||||||
0, "Template vdpaumpegdecoder");
|
|
||||||
|
|
||||||
gst_element_register (vdpaumpegdecoder, "vdpaumpegdecoder",
|
|
||||||
GST_RANK_NONE, GST_TYPE_VDPAU_MPEG_DECODER);
|
|
||||||
gst_element_register (vdpaumpegdecoder, "vdpauvideoyuv",
|
|
||||||
GST_RANK_NONE, GST_TYPE_VDPAU_VIDEO_YUV);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* gstreamer looks for this structure to register vdpaumpegdecoders
|
|
||||||
*
|
|
||||||
* exchange the string 'Template vdpaumpegdecoder' with your vdpaumpegdecoder description
|
|
||||||
*/
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
||||||
GST_VERSION_MINOR,
|
|
||||||
"vdpaumpegdecoder",
|
|
||||||
"Template vdpaumpegdecoder",
|
|
||||||
vdpaumpegdecoder_init,
|
|
||||||
VERSION, "LGPL", "GStreamer", "http://gstreamer.net/")
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
"width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]"));
|
"width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]"));
|
||||||
|
|
||||||
#define DEBUG_INIT(bla) \
|
#define DEBUG_INIT(bla) \
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_vdpau_video_yuv_debug, "vdpauvideo_yuv", 0, "vdpauvideo_yuv base class");
|
GST_DEBUG_CATEGORY_INIT (gst_vdpau_video_yuv_debug, "vdpauvideoyuv", 0, "VDPAU VdpSurface to YUV");
|
||||||
|
|
||||||
GST_BOILERPLATE_FULL (GstVdpauVideoYUV, gst_vdpau_video_yuv, GstElement,
|
GST_BOILERPLATE_FULL (GstVdpauVideoYUV, gst_vdpau_video_yuv, GstElement,
|
||||||
GST_TYPE_ELEMENT, DEBUG_INIT);
|
GST_TYPE_ELEMENT, DEBUG_INIT);
|
||||||
|
|
Loading…
Reference in a new issue