mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Move GST_VAAPI_DISPLAY_VADISPLAY() and GST_VAAPI_DISPLAY_{LOCK,UNLOCK}() to gstvaapidisplay_priv.h.
This commit is contained in:
parent
702f844a7e
commit
6b56ca0068
15 changed files with 125 additions and 55 deletions
|
@ -50,8 +50,10 @@ libgstvaapi_source_h = \
|
||||||
libgstvaapi_source_priv_h = \
|
libgstvaapi_source_priv_h = \
|
||||||
gstvaapicompat.h \
|
gstvaapicompat.h \
|
||||||
gstvaapidebug.h \
|
gstvaapidebug.h \
|
||||||
|
gstvaapidisplay_priv.h \
|
||||||
gstvaapiobject_priv.h \
|
gstvaapiobject_priv.h \
|
||||||
gstvaapiutils.h \
|
gstvaapiutils.h \
|
||||||
|
gstvaapi_priv.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_x11_source_c = \
|
libgstvaapi_x11_source_c = \
|
||||||
|
|
27
gst-libs/gst/vaapi/gstvaapi_priv.h
Normal file
27
gst-libs/gst/vaapi/gstvaapi_priv.h
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* gstvaapi_priv.h - Helper to include all private headers
|
||||||
|
*
|
||||||
|
* gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GST_VAAPI_PRIV_H
|
||||||
|
#define GST_VAAPI_PRIV_H
|
||||||
|
|
||||||
|
#include <gst/vaapi/gstvaapiobject_priv.h>
|
||||||
|
#include <gst/vaapi/gstvaapidisplay_priv.h>
|
||||||
|
|
||||||
|
#endif /* GST_VAAPI_PRIV_H */
|
|
@ -26,6 +26,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapidisplay.h"
|
#include "gstvaapidisplay.h"
|
||||||
|
#include "gstvaapidisplay_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
@ -34,26 +35,6 @@ GST_DEBUG_CATEGORY(gst_debug_vaapi);
|
||||||
|
|
||||||
G_DEFINE_TYPE(GstVaapiDisplay, gst_vaapi_display, G_TYPE_OBJECT);
|
G_DEFINE_TYPE(GstVaapiDisplay, gst_vaapi_display, G_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GST_VAAPI_DISPLAY_GET_PRIVATE(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
|
||||||
GST_VAAPI_TYPE_DISPLAY, \
|
|
||||||
GstVaapiDisplayPrivate))
|
|
||||||
|
|
||||||
struct _GstVaapiDisplayPrivate {
|
|
||||||
GStaticMutex mutex;
|
|
||||||
VADisplay display;
|
|
||||||
guint width;
|
|
||||||
guint height;
|
|
||||||
guint width_mm;
|
|
||||||
guint height_mm;
|
|
||||||
guint par_n;
|
|
||||||
guint par_d;
|
|
||||||
GArray *profiles;
|
|
||||||
GArray *image_formats;
|
|
||||||
GArray *subpicture_formats;
|
|
||||||
guint create_display : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
|
|
|
@ -56,33 +56,6 @@ G_BEGIN_DECLS
|
||||||
GST_VAAPI_TYPE_DISPLAY, \
|
GST_VAAPI_TYPE_DISPLAY, \
|
||||||
GstVaapiDisplayClass))
|
GstVaapiDisplayClass))
|
||||||
|
|
||||||
/**
|
|
||||||
* GST_VAAPI_DISPLAY_VADISPLAY:
|
|
||||||
* @display: a #GstVaapiDisplay
|
|
||||||
*
|
|
||||||
* Macro that evaluates to the #VADisplay bound to @display
|
|
||||||
*/
|
|
||||||
#define GST_VAAPI_DISPLAY_VADISPLAY(display) \
|
|
||||||
gst_vaapi_display_get_display(display)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GST_VAAPI_DISPLAY_LOCK:
|
|
||||||
* @display: a #GstVaapiDisplay
|
|
||||||
*
|
|
||||||
* Locks @display
|
|
||||||
*/
|
|
||||||
#define GST_VAAPI_DISPLAY_LOCK(display) \
|
|
||||||
gst_vaapi_display_lock(display)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GST_VAAPI_DISPLAY_UNLOCK:
|
|
||||||
* @display: a #GstVaapiDisplay
|
|
||||||
*
|
|
||||||
* Unlocks @display
|
|
||||||
*/
|
|
||||||
#define GST_VAAPI_DISPLAY_UNLOCK(display) \
|
|
||||||
gst_vaapi_display_unlock(display)
|
|
||||||
|
|
||||||
typedef struct _GstVaapiDisplay GstVaapiDisplay;
|
typedef struct _GstVaapiDisplay GstVaapiDisplay;
|
||||||
typedef struct _GstVaapiDisplayPrivate GstVaapiDisplayPrivate;
|
typedef struct _GstVaapiDisplayPrivate GstVaapiDisplayPrivate;
|
||||||
typedef struct _GstVaapiDisplayClass GstVaapiDisplayClass;
|
typedef struct _GstVaapiDisplayClass GstVaapiDisplayClass;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "gstvaapicompat.h"
|
#include "gstvaapicompat.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapidisplay_glx.h"
|
#include "gstvaapidisplay_glx.h"
|
||||||
|
#include "gstvaapidisplay_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
85
gst-libs/gst/vaapi/gstvaapidisplay_priv.h
Normal file
85
gst-libs/gst/vaapi/gstvaapidisplay_priv.h
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
/*
|
||||||
|
* gstvaapidisplay_priv.h - Base VA display (private definitions)
|
||||||
|
*
|
||||||
|
* gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GST_VAAPI_DISPLAY_PRIV_H
|
||||||
|
#define GST_VAAPI_DISPLAY_PRIV_H
|
||||||
|
|
||||||
|
#include <gst/vaapi/gstvaapidisplay.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GST_VAAPI_DISPLAY_GET_PRIVATE(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
||||||
|
GST_VAAPI_TYPE_DISPLAY, \
|
||||||
|
GstVaapiDisplayPrivate))
|
||||||
|
|
||||||
|
#define GST_VAAPI_DISPLAY_CAST(display) ((GstVaapiDisplay *)(display))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VAAPI_DISPLAY_VADISPLAY:
|
||||||
|
* @display_: a #GstVaapiDisplay
|
||||||
|
*
|
||||||
|
* Macro that evaluates to the #VADisplay of @display.
|
||||||
|
* This is an internal macro that does not do any run-time type check.
|
||||||
|
*/
|
||||||
|
#define GST_VAAPI_DISPLAY_VADISPLAY(display_) \
|
||||||
|
GST_VAAPI_DISPLAY_CAST(display_)->priv->display
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VAAPI_DISPLAY_LOCK:
|
||||||
|
* @display: a #GstVaapiDisplay
|
||||||
|
*
|
||||||
|
* Locks @display
|
||||||
|
*/
|
||||||
|
#define GST_VAAPI_DISPLAY_LOCK(display) \
|
||||||
|
gst_vaapi_display_lock(display)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VAAPI_DISPLAY_UNLOCK:
|
||||||
|
* @display: a #GstVaapiDisplay
|
||||||
|
*
|
||||||
|
* Unlocks @display
|
||||||
|
*/
|
||||||
|
#define GST_VAAPI_DISPLAY_UNLOCK(display) \
|
||||||
|
gst_vaapi_display_unlock(display)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstVaapiDisplayPrivate:
|
||||||
|
*
|
||||||
|
* Base class for VA displays.
|
||||||
|
*/
|
||||||
|
struct _GstVaapiDisplayPrivate {
|
||||||
|
GStaticMutex mutex;
|
||||||
|
VADisplay display;
|
||||||
|
guint width;
|
||||||
|
guint height;
|
||||||
|
guint width_mm;
|
||||||
|
guint height_mm;
|
||||||
|
guint par_n;
|
||||||
|
guint par_d;
|
||||||
|
GArray *profiles;
|
||||||
|
GArray *image_formats;
|
||||||
|
GArray *subpicture_formats;
|
||||||
|
guint create_display : 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* GST_VAAPI_DISPLAY_PRIV_H */
|
|
@ -26,6 +26,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapidisplay_x11.h"
|
#include "gstvaapidisplay_x11.h"
|
||||||
|
#include "gstvaapidisplay_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "gstvaapicompat.h"
|
#include "gstvaapicompat.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapiimage.h"
|
#include "gstvaapiimage.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gstvaapiobject.h"
|
#include "gstvaapiobject.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
#include "gstvaapiparamspecs.h"
|
#include "gstvaapiparamspecs.h"
|
||||||
#include "gstvaapivalue.h"
|
#include "gstvaapivalue.h"
|
||||||
#include "gstvaapimarshal.h"
|
#include "gstvaapimarshal.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "gstvaapicompat.h"
|
#include "gstvaapicompat.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapisubpicture.h"
|
#include "gstvaapisubpicture.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapisurface.h"
|
#include "gstvaapisurface.h"
|
||||||
#include "gstvaapiimage.h"
|
#include "gstvaapiimage.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapiutils_glx.h"
|
#include "gstvaapiutils_glx.h"
|
||||||
#include "gstvaapidisplay_glx.h"
|
#include "gstvaapidisplay_glx.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "gstvaapiwindow.h"
|
#include "gstvaapiwindow.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "gstvaapidisplay_x11.h"
|
#include "gstvaapidisplay_x11.h"
|
||||||
#include "gstvaapiutils_x11.h"
|
#include "gstvaapiutils_x11.h"
|
||||||
#include "gstvaapiutils_glx.h"
|
#include "gstvaapiutils_glx.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "gstvaapidisplay_x11.h"
|
#include "gstvaapidisplay_x11.h"
|
||||||
#include "gstvaapiutils.h"
|
#include "gstvaapiutils.h"
|
||||||
#include "gstvaapiutils_x11.h"
|
#include "gstvaapiutils_x11.h"
|
||||||
#include "gstvaapiobject_priv.h"
|
#include "gstvaapi_priv.h"
|
||||||
|
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
#include "gstvaapidebug.h"
|
#include "gstvaapidebug.h"
|
||||||
|
|
Loading…
Reference in a new issue