mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
Rename GstVaapiSinkBase to GstVaapiVideoSink.
This commit is contained in:
parent
148d104c1a
commit
f2af51eefc
5 changed files with 49 additions and 49 deletions
|
@ -5,12 +5,12 @@ libgstvaapi_source_c = \
|
|||
gstvaapiimage.c \
|
||||
gstvaapiimageformat.c \
|
||||
gstvaapiimagepool.c \
|
||||
gstvaapisinkbase.c \
|
||||
gstvaapisubpicture.c \
|
||||
gstvaapisurface.c \
|
||||
gstvaapisurfacepool.c \
|
||||
gstvaapivideobuffer.c \
|
||||
gstvaapivideopool.c \
|
||||
gstvaapivideosink.c \
|
||||
gstvaapiwindow.c \
|
||||
vaapi_utils.c \
|
||||
$(NULL)
|
||||
|
@ -20,12 +20,12 @@ libgstvaapi_source_h = \
|
|||
gstvaapiimage.h \
|
||||
gstvaapiimageformat.h \
|
||||
gstvaapiimagepool.h \
|
||||
gstvaapisinkbase.h \
|
||||
gstvaapisubpicture.h \
|
||||
gstvaapisurface.h \
|
||||
gstvaapisurfacepool.h \
|
||||
gstvaapivideobuffer.h \
|
||||
gstvaapivideopool.h \
|
||||
gstvaapivideosink.h \
|
||||
gstvaapiwindow.h \
|
||||
vaapi_debug.h \
|
||||
vaapi_utils.h \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* gstvaapisinkbase.c - VA sink interface
|
||||
* gstvaapivideosink.c - VA sink interface
|
||||
*
|
||||
* gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
|
||||
*
|
||||
|
@ -19,10 +19,10 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "gstvaapisinkbase.h"
|
||||
#include "gstvaapivideosink.h"
|
||||
|
||||
static void
|
||||
gst_vaapisink_base_base_init(gpointer g_class)
|
||||
gst_vaapi_video_sink_base_init(gpointer g_class)
|
||||
{
|
||||
static gboolean is_initialized = FALSE;
|
||||
|
||||
|
@ -32,20 +32,20 @@ gst_vaapisink_base_base_init(gpointer g_class)
|
|||
}
|
||||
|
||||
GType
|
||||
gst_vaapisink_base_get_type(void)
|
||||
gst_vaapi_video_sink_get_type(void)
|
||||
{
|
||||
static GType iface_type = 0;
|
||||
|
||||
if (G_UNLIKELY(!iface_type)) {
|
||||
static const GTypeInfo info = {
|
||||
sizeof(GstVaapiSinkBaseInterface),
|
||||
gst_vaapisink_base_base_init, /* base_init */
|
||||
sizeof(GstVaapiVideoSinkInterface),
|
||||
gst_vaapi_video_sink_base_init, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
};
|
||||
|
||||
iface_type = g_type_register_static(
|
||||
G_TYPE_INTERFACE,
|
||||
"GstVaapiSinkBase",
|
||||
"GstVaapiVideoSink",
|
||||
&info,
|
||||
0
|
||||
);
|
||||
|
@ -54,17 +54,17 @@ gst_vaapisink_base_get_type(void)
|
|||
}
|
||||
|
||||
GstVaapiDisplay *
|
||||
gst_vaapisink_base_get_display(GstVaapiSinkBase *sink)
|
||||
gst_vaapi_video_sink_get_display(GstVaapiVideoSink *sink)
|
||||
{
|
||||
g_return_val_if_fail(GST_IS_VAAPISINK_BASE(sink), NULL);
|
||||
g_return_val_if_fail(GST_VAAPI_IS_VIDEO_SINK(sink), NULL);
|
||||
|
||||
return GST_VAAPISINK_BASE_GET_INTERFACE(sink)->get_display(sink);
|
||||
return GST_VAAPI_VIDEO_SINK_GET_INTERFACE(sink)->get_display(sink);
|
||||
}
|
||||
|
||||
GstVaapiSinkBase *
|
||||
gst_vaapisink_base_lookup(GstElement *element)
|
||||
GstVaapiVideoSink *
|
||||
gst_vaapi_video_sink_lookup(GstElement *element)
|
||||
{
|
||||
GstVaapiSinkBase *sink = NULL;
|
||||
GstVaapiVideoSink *sink = NULL;
|
||||
GstPad *pad, *peer;
|
||||
|
||||
g_return_val_if_fail(GST_IS_ELEMENT(element), NULL);
|
||||
|
@ -81,8 +81,8 @@ gst_vaapisink_base_lookup(GstElement *element)
|
|||
|
||||
element = gst_pad_get_parent_element(peer);
|
||||
if (element) {
|
||||
if (GST_IS_VAAPISINK_BASE(element))
|
||||
sink = GST_VAAPISINK_BASE(element);
|
||||
if (GST_VAAPI_IS_VIDEO_SINK(element))
|
||||
sink = GST_VAAPI_VIDEO_SINK(element);
|
||||
g_object_unref(element);
|
||||
}
|
||||
g_object_unref(peer);
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* gstvaapisinkbase.h - VA sink interface
|
||||
* gstvaapivideosink.h - VA sink interface
|
||||
*
|
||||
* gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
|
||||
*
|
||||
|
@ -18,49 +18,49 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef GST_VAAPISINK_BASE_H
|
||||
#define GST_VAAPISINK_BASE_H
|
||||
#ifndef GST_VAAPI_VIDEO_SINK_H
|
||||
#define GST_VAAPI_VIDEO_SINK_H
|
||||
|
||||
#include <gst/gstelement.h>
|
||||
#include <gst/vaapi/gstvaapidisplay.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_VAAPISINK_BASE \
|
||||
(gst_vaapisink_base_get_type())
|
||||
#define GST_VAAPI_TYPE_VIDEO_SINK \
|
||||
(gst_vaapi_video_sink_get_type())
|
||||
|
||||
#define GST_VAAPISINK_BASE(obj) \
|
||||
#define GST_VAAPI_VIDEO_SINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
GST_TYPE_VAAPISINK_BASE, \
|
||||
GstVaapiSinkBase))
|
||||
GST_VAAPI_TYPE_VIDEO_SINK, \
|
||||
GstVaapiVideoSink))
|
||||
|
||||
#define GST_IS_VAAPISINK_BASE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_VAAPISINK_BASE))
|
||||
#define GST_VAAPI_IS_VIDEO_SINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_VIDEO_SINK))
|
||||
|
||||
#define GST_VAAPISINK_BASE_GET_INTERFACE(obj) \
|
||||
#define GST_VAAPI_VIDEO_SINK_GET_INTERFACE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE((obj), \
|
||||
GST_TYPE_VAAPISINK_BASE, \
|
||||
GstVaapiSinkBaseInterface))
|
||||
GST_VAAPI_TYPE_VIDEO_SINK, \
|
||||
GstVaapiVideoSinkInterface))
|
||||
|
||||
typedef struct _GstVaapiSinkBase GstVaapiSinkBase; /* dummy */
|
||||
typedef struct _GstVaapiSinkBaseInterface GstVaapiSinkBaseInterface;
|
||||
typedef struct _GstVaapiVideoSink GstVaapiVideoSink; /* dummy */
|
||||
typedef struct _GstVaapiVideoSinkInterface GstVaapiVideoSinkInterface;
|
||||
|
||||
struct _GstVaapiSinkBaseInterface {
|
||||
struct _GstVaapiVideoSinkInterface {
|
||||
/*< private >*/
|
||||
GTypeInterface g_iface;
|
||||
|
||||
GstVaapiDisplay *(*get_display)(GstVaapiSinkBase *sink);
|
||||
GstVaapiDisplay *(*get_display)(GstVaapiVideoSink *sink);
|
||||
};
|
||||
|
||||
GType
|
||||
gst_vaapisink_base_get_type(void);
|
||||
gst_vaapi_video_sink_get_type(void);
|
||||
|
||||
GstVaapiDisplay *
|
||||
gst_vaapisink_base_get_display(GstVaapiSinkBase *sink);
|
||||
gst_vaapi_video_sink_get_display(GstVaapiVideoSink *sink);
|
||||
|
||||
GstVaapiSinkBase *
|
||||
gst_vaapisink_base_lookup(GstElement *element);
|
||||
GstVaapiVideoSink *
|
||||
gst_vaapi_video_sink_lookup(GstElement *element);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPISINK_BASE_H */
|
||||
#endif /* GST_VAAPI_VIDEO_SINK_H */
|
|
@ -21,7 +21,7 @@
|
|||
#include "config.h"
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/vaapi/gstvaapisinkbase.h>
|
||||
#include <gst/vaapi/gstvaapivideosink.h>
|
||||
#include "gstvaapiconvert.h"
|
||||
|
||||
#define GST_PLUGIN_NAME "vaapiconvert"
|
||||
|
@ -206,15 +206,15 @@ gst_vaapiconvert_init(GstVaapiConvert *convert, GstVaapiConvertClass *klass)
|
|||
static gboolean gst_vaapiconvert_start(GstBaseTransform *trans)
|
||||
{
|
||||
GstVaapiConvert * const convert = GST_VAAPICONVERT(trans);
|
||||
GstVaapiSinkBase *sink;
|
||||
GstVaapiVideoSink *sink;
|
||||
GstVaapiDisplay *display;
|
||||
|
||||
/* Look for a downstream vaapisink */
|
||||
sink = gst_vaapisink_base_lookup(GST_ELEMENT(trans));
|
||||
sink = gst_vaapi_video_sink_lookup(GST_ELEMENT(trans));
|
||||
if (!sink)
|
||||
return FALSE;
|
||||
|
||||
display = gst_vaapisink_base_get_display(sink);
|
||||
display = gst_vaapi_video_sink_get_display(sink);
|
||||
if (!display)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "config.h"
|
||||
#include <gst/gst.h>
|
||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
||||
#include <gst/vaapi/gstvaapisinkbase.h>
|
||||
#include <gst/vaapi/gstvaapivideosink.h>
|
||||
#include <gst/vaapi/gstvaapidisplay_x11.h>
|
||||
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
||||
#include "gstvaapisink.h"
|
||||
|
@ -68,22 +68,22 @@ enum {
|
|||
};
|
||||
|
||||
static GstVaapiDisplay *
|
||||
gst_vaapisink_base_do_get_display(GstVaapiSinkBase *sink)
|
||||
gst_vaapi_video_sink_do_get_display(GstVaapiVideoSink *sink)
|
||||
{
|
||||
return gst_vaapisink_get_display(GST_VAAPISINK(sink));
|
||||
}
|
||||
|
||||
static void gst_vaapisink_base_iface_init(GstVaapiSinkBaseInterface *iface)
|
||||
static void gst_vaapi_video_sink_iface_init(GstVaapiVideoSinkInterface *iface)
|
||||
{
|
||||
iface->get_display = gst_vaapisink_base_do_get_display;
|
||||
iface->get_display = gst_vaapi_video_sink_do_get_display;
|
||||
}
|
||||
|
||||
static void gst_vaapisink_iface_init(GType type)
|
||||
{
|
||||
const GType g_define_type_id = type;
|
||||
|
||||
G_IMPLEMENT_INTERFACE(GST_TYPE_VAAPISINK_BASE,
|
||||
gst_vaapisink_base_iface_init);
|
||||
G_IMPLEMENT_INTERFACE(GST_VAAPI_TYPE_VIDEO_SINK,
|
||||
gst_vaapi_video_sink_iface_init);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue