mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
plugins: integrate GstVaapiVideoBuffer from libgstvaapi.
Move GstVaapiVideoBuffer from core libgstvaapi decoding library to the actual plugin elements. That's only useful there.
This commit is contained in:
parent
95b865968c
commit
4cf44e3ad2
11 changed files with 99 additions and 135 deletions
|
@ -171,23 +171,6 @@ GST_VAAPI_IS_IMAGE_POOL_CLASS
|
||||||
GST_VAAPI_IMAGE_POOL_GET_CLASS
|
GST_VAAPI_IMAGE_POOL_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
<FILE>gstvaapivideobuffer</FILE>
|
|
||||||
<TITLE>GstVaapiVideoBuffer</TITLE>
|
|
||||||
GstVaapiVideoBuffer
|
|
||||||
GstVaapiVideoBufferClass
|
|
||||||
gst_vaapi_video_buffer_new
|
|
||||||
gst_vaapi_video_buffer_get_meta
|
|
||||||
<SUBSECTION Standard>
|
|
||||||
GST_VAAPI_VIDEO_BUFFER
|
|
||||||
GST_VAAPI_IS_VIDEO_BUFFER
|
|
||||||
GST_VAAPI_TYPE_VIDEO_BUFFER
|
|
||||||
gst_vaapi_video_buffer_get_type
|
|
||||||
GST_VAAPI_VIDEO_BUFFER_CLASS
|
|
||||||
GST_VAAPI_IS_VIDEO_BUFFER_CLASS
|
|
||||||
GST_VAAPI_VIDEO_BUFFER_GET_CLASS
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gstvaapivideometa</FILE>
|
<FILE>gstvaapivideometa</FILE>
|
||||||
<TITLE>GstVaapiVideoMeta</TITLE>
|
<TITLE>GstVaapiVideoMeta</TITLE>
|
||||||
|
|
|
@ -7,6 +7,5 @@ gst_vaapi_object_get_type
|
||||||
gst_vaapi_subpicture_get_type
|
gst_vaapi_subpicture_get_type
|
||||||
gst_vaapi_surface_get_type
|
gst_vaapi_surface_get_type
|
||||||
gst_vaapi_surface_pool_get_type
|
gst_vaapi_surface_pool_get_type
|
||||||
gst_vaapi_video_buffer_get_type
|
|
||||||
gst_vaapi_video_pool_get_type
|
gst_vaapi_video_pool_get_type
|
||||||
gst_vaapi_window_get_type
|
gst_vaapi_window_get_type
|
||||||
|
|
|
@ -68,7 +68,6 @@ libgstvaapi_source_c = \
|
||||||
gstvaapisurfaceproxy.c \
|
gstvaapisurfaceproxy.c \
|
||||||
gstvaapiutils.c \
|
gstvaapiutils.c \
|
||||||
gstvaapivalue.c \
|
gstvaapivalue.c \
|
||||||
gstvaapivideobuffer.c \
|
|
||||||
gstvaapivideometa.c \
|
gstvaapivideometa.c \
|
||||||
gstvaapivideopool.c \
|
gstvaapivideopool.c \
|
||||||
gstvaapiwindow.c \
|
gstvaapiwindow.c \
|
||||||
|
@ -95,7 +94,6 @@ libgstvaapi_source_h = \
|
||||||
gstvaapisurfaceproxy.h \
|
gstvaapisurfaceproxy.h \
|
||||||
gstvaapitypes.h \
|
gstvaapitypes.h \
|
||||||
gstvaapivalue.h \
|
gstvaapivalue.h \
|
||||||
gstvaapivideobuffer.h \
|
|
||||||
gstvaapivideometa.h \
|
gstvaapivideometa.h \
|
||||||
gstvaapivideopool.h \
|
gstvaapivideopool.h \
|
||||||
gstvaapiwindow.h \
|
gstvaapiwindow.h \
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* gstvaapivideobuffer.h - Gstreamer/VA video buffer
|
|
||||||
*
|
|
||||||
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
|
||||||
* Copyright (C) 2011-2013 Intel Corporation
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2.1
|
|
||||||
* 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
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef GST_VAAPI_VIDEO_BUFFER_H
|
|
||||||
#define GST_VAAPI_VIDEO_BUFFER_H
|
|
||||||
|
|
||||||
#include <gst/video/gstsurfacebuffer.h>
|
|
||||||
#include <gst/vaapi/gstvaapivideometa.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_VAAPI_TYPE_VIDEO_BUFFER \
|
|
||||||
(gst_vaapi_video_buffer_get_type())
|
|
||||||
|
|
||||||
#define GST_VAAPI_VIDEO_BUFFER(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
|
||||||
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
|
||||||
GstVaapiVideoBuffer))
|
|
||||||
|
|
||||||
#define GST_VAAPI_VIDEO_BUFFER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
|
||||||
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
|
||||||
GstVaapiVideoBufferClass))
|
|
||||||
|
|
||||||
#define GST_VAAPI_IS_VIDEO_BUFFER(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_VIDEO_BUFFER))
|
|
||||||
|
|
||||||
#define GST_VAAPI_IS_VIDEO_BUFFER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_VIDEO_BUFFER))
|
|
||||||
|
|
||||||
#define GST_VAAPI_VIDEO_BUFFER_GET_CLASS(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
|
||||||
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
|
||||||
GstVaapiVideoBufferClass))
|
|
||||||
|
|
||||||
typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer;
|
|
||||||
typedef struct _GstVaapiVideoBufferClass GstVaapiVideoBufferClass;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GstVaapiVideoBuffer:
|
|
||||||
*
|
|
||||||
* A #GstBuffer holding video objects (#GstVaapiSurface and #GstVaapiImage).
|
|
||||||
*/
|
|
||||||
struct _GstVaapiVideoBuffer {
|
|
||||||
/*< private >*/
|
|
||||||
GstSurfaceBuffer parent_instance;
|
|
||||||
|
|
||||||
GstVaapiVideoMeta *meta;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GstVaapiVideoBufferClass:
|
|
||||||
*
|
|
||||||
* A #GstBuffer holding video objects
|
|
||||||
*/
|
|
||||||
struct _GstVaapiVideoBufferClass {
|
|
||||||
/*< private >*/
|
|
||||||
GstSurfaceBufferClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_vaapi_video_buffer_get_type(void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
GstBuffer *
|
|
||||||
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta);
|
|
||||||
|
|
||||||
GstVaapiVideoMeta *
|
|
||||||
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* GST_VAAPI_VIDEO_BUFFER_H */
|
|
|
@ -39,6 +39,7 @@ libgstvaapi_source_c = \
|
||||||
gstvaapisink.c \
|
gstvaapisink.c \
|
||||||
gstvaapiupload.c \
|
gstvaapiupload.c \
|
||||||
gstvaapiuploader.c \
|
gstvaapiuploader.c \
|
||||||
|
gstvaapivideobuffer.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_source_h = \
|
libgstvaapi_source_h = \
|
||||||
|
@ -50,6 +51,7 @@ libgstvaapi_source_h = \
|
||||||
gstvaapisink.h \
|
gstvaapisink.h \
|
||||||
gstvaapiupload.h \
|
gstvaapiupload.h \
|
||||||
gstvaapiuploader.h \
|
gstvaapiuploader.h \
|
||||||
|
gstvaapivideobuffer.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if USE_GLX
|
if USE_GLX
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include <gst/vaapi/gstvaapisurface.h>
|
#include <gst/vaapi/gstvaapisurface.h>
|
||||||
#include <gst/vaapi/gstvaapiimagepool.h>
|
#include <gst/vaapi/gstvaapiimagepool.h>
|
||||||
#include <gst/vaapi/gstvaapisurfacepool.h>
|
#include <gst/vaapi/gstvaapisurfacepool.h>
|
||||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
|
|
||||||
#include "gst/vaapi/sysdeps.h"
|
#include "gst/vaapi/sysdeps.h"
|
||||||
#include <gst/vaapi/gstvaapivideometa.h>
|
#include <gst/vaapi/gstvaapivideometa.h>
|
||||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
|
||||||
#if USE_GLX
|
#if USE_GLX
|
||||||
# include "gstvaapivideoconverter_glx.h"
|
# include "gstvaapivideoconverter_glx.h"
|
||||||
#endif
|
#endif
|
||||||
#include "gstvaapipluginbuffer.h"
|
#include "gstvaapipluginbuffer.h"
|
||||||
|
#include "gstvaapivideobuffer.h"
|
||||||
|
|
||||||
static GFunc
|
static GFunc
|
||||||
get_surface_converter(GstVaapiDisplay *display)
|
get_surface_converter(GstVaapiDisplay *display)
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <gst/vaapi/gstvaapidisplay.h>
|
#include <gst/vaapi/gstvaapidisplay.h>
|
||||||
#include <gst/vaapi/gstvaapisurface.h>
|
#include <gst/vaapi/gstvaapisurface.h>
|
||||||
#include <gst/vaapi/gstvaapisurfacepool.h>
|
#include <gst/vaapi/gstvaapisurfacepool.h>
|
||||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* gstvaapivideobuffer.c - Gst VA video buffer
|
* gstvaapivideobuffer.c - Gstreamer/VA video buffer
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
||||||
* Copyright (C) 2011-2013 Intel Corporation
|
* Copyright (C) 2011-2013 Intel Corporation
|
||||||
|
@ -25,11 +25,60 @@
|
||||||
* @short_description: VA video buffer for GStreamer
|
* @short_description: VA video buffer for GStreamer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sysdeps.h"
|
#include "gst/vaapi/sysdeps.h"
|
||||||
|
#include <gst/video/gstsurfacebuffer.h>
|
||||||
#include "gstvaapivideobuffer.h"
|
#include "gstvaapivideobuffer.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define GST_VAAPI_TYPE_VIDEO_BUFFER \
|
||||||
#include "gstvaapidebug.h"
|
(gst_vaapi_video_buffer_get_type())
|
||||||
|
|
||||||
|
#define GST_VAAPI_VIDEO_BUFFER(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||||
|
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
||||||
|
GstVaapiVideoBuffer))
|
||||||
|
|
||||||
|
#define GST_VAAPI_VIDEO_BUFFER_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||||
|
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
||||||
|
GstVaapiVideoBufferClass))
|
||||||
|
|
||||||
|
#define GST_VAAPI_IS_VIDEO_BUFFER(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_VAAPI_TYPE_VIDEO_BUFFER))
|
||||||
|
|
||||||
|
#define GST_VAAPI_IS_VIDEO_BUFFER_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_VAAPI_TYPE_VIDEO_BUFFER))
|
||||||
|
|
||||||
|
#define GST_VAAPI_VIDEO_BUFFER_GET_CLASS(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_CLASS((obj), \
|
||||||
|
GST_VAAPI_TYPE_VIDEO_BUFFER, \
|
||||||
|
GstVaapiVideoBufferClass))
|
||||||
|
|
||||||
|
typedef struct _GstVaapiVideoBufferClass GstVaapiVideoBufferClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstVaapiVideoBuffer:
|
||||||
|
*
|
||||||
|
* A #GstBuffer holding video objects (#GstVaapiSurface and #GstVaapiImage).
|
||||||
|
*/
|
||||||
|
struct _GstVaapiVideoBuffer {
|
||||||
|
/*< private >*/
|
||||||
|
GstSurfaceBuffer parent_instance;
|
||||||
|
|
||||||
|
GstVaapiVideoMeta *meta;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstVaapiVideoBufferClass:
|
||||||
|
*
|
||||||
|
* A #GstBuffer holding video objects
|
||||||
|
*/
|
||||||
|
struct _GstVaapiVideoBufferClass {
|
||||||
|
/*< private >*/
|
||||||
|
GstSurfaceBufferClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType
|
||||||
|
gst_vaapi_video_buffer_get_type(void) G_GNUC_CONST;
|
||||||
|
|
||||||
G_DEFINE_TYPE(GstVaapiVideoBuffer,
|
G_DEFINE_TYPE(GstVaapiVideoBuffer,
|
||||||
gst_vaapi_video_buffer,
|
gst_vaapi_video_buffer,
|
||||||
|
@ -65,14 +114,6 @@ gst_vaapi_video_buffer_init(GstVaapiVideoBuffer *buffer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_video_buffer_new:
|
|
||||||
* @meta: a #GstVaapiVideoMeta
|
|
||||||
*
|
|
||||||
* Creates a #GstBuffer that holds video @meta information.
|
|
||||||
*
|
|
||||||
* Return value: the newly allocated #GstBuffer, or %NULL or error
|
|
||||||
*/
|
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta)
|
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta)
|
||||||
{
|
{
|
||||||
|
@ -88,15 +129,6 @@ gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta)
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_video_buffer_get_meta:
|
|
||||||
* @buffer: a #GstVaapiVideoBuffer
|
|
||||||
*
|
|
||||||
* Returns the #GstVaapiVideoMeta associated to this @buffer.
|
|
||||||
*
|
|
||||||
* Return value: the #GstVaapiVideoMeta bound to the @buffer, or %NULL
|
|
||||||
* if none was found
|
|
||||||
*/
|
|
||||||
GstVaapiVideoMeta *
|
GstVaapiVideoMeta *
|
||||||
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer)
|
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer)
|
||||||
{
|
{
|
42
gst/vaapi/gstvaapivideobuffer.h
Normal file
42
gst/vaapi/gstvaapivideobuffer.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* gstvaapivideobuffer.h - Gstreamer/VA video buffer
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
||||||
|
* Copyright (C) 2011-2013 Intel Corporation
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1
|
||||||
|
* 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free
|
||||||
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GST_VAAPI_VIDEO_BUFFER_H
|
||||||
|
#define GST_VAAPI_VIDEO_BUFFER_H
|
||||||
|
|
||||||
|
#include <gst/vaapi/gstvaapivideometa.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef struct _GstVaapiVideoBuffer GstVaapiVideoBuffer;
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
GstBuffer *
|
||||||
|
gst_vaapi_video_buffer_new(GstVaapiVideoMeta *meta);
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
GstVaapiVideoMeta *
|
||||||
|
gst_vaapi_video_buffer_get_meta(GstVaapiVideoBuffer *buffer);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* GST_VAAPI_VIDEO_BUFFER_H */
|
|
@ -25,6 +25,7 @@
|
||||||
#define GST_VAAPI_VIDEO_CONVERTER_GLX_H
|
#define GST_VAAPI_VIDEO_CONVERTER_GLX_H
|
||||||
|
|
||||||
#include <gst/video/gstsurfaceconverter.h>
|
#include <gst/video/gstsurfaceconverter.h>
|
||||||
|
#include "gstvaapivideobuffer.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue