mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
Use gtypes.
This commit is contained in:
parent
cf432f9ec8
commit
c561cead2b
6 changed files with 21 additions and 21 deletions
|
@ -40,12 +40,12 @@ struct _GstVaapiDisplayPrivate {
|
||||||
VADisplay display;
|
VADisplay display;
|
||||||
gboolean create_display;
|
gboolean create_display;
|
||||||
VAProfile *profiles;
|
VAProfile *profiles;
|
||||||
unsigned int num_profiles;
|
guint num_profiles;
|
||||||
VAImageFormat *image_formats;
|
VAImageFormat *image_formats;
|
||||||
unsigned int num_image_formats;
|
guint num_image_formats;
|
||||||
VAImageFormat *subpicture_formats;
|
VAImageFormat *subpicture_formats;
|
||||||
unsigned int *subpicture_flags;
|
guint *subpicture_flags;
|
||||||
unsigned int num_subpicture_formats;
|
guint num_subpicture_formats;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -57,7 +57,7 @@ enum {
|
||||||
static void
|
static void
|
||||||
append_format(
|
append_format(
|
||||||
VAImageFormat **pva_formats,
|
VAImageFormat **pva_formats,
|
||||||
unsigned int *pnum_va_formats,
|
guint *pnum_va_formats,
|
||||||
GstVaapiImageFormat format
|
GstVaapiImageFormat format
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -80,9 +80,9 @@ append_format(
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
filter_formats(VAImageFormat **pva_formats, unsigned int *pnum_va_formats)
|
filter_formats(VAImageFormat **pva_formats, guint *pnum_va_formats)
|
||||||
{
|
{
|
||||||
unsigned int i = 0;
|
guint i = 0;
|
||||||
gboolean has_YV12 = FALSE;
|
gboolean has_YV12 = FALSE;
|
||||||
gboolean has_I420 = FALSE;
|
gboolean has_I420 = FALSE;
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
|
||||||
GstVaapiDisplayPrivate * const priv = display->priv;
|
GstVaapiDisplayPrivate * const priv = display->priv;
|
||||||
VAStatus status;
|
VAStatus status;
|
||||||
int major_version, minor_version;
|
int major_version, minor_version;
|
||||||
unsigned int i;
|
guint i;
|
||||||
|
|
||||||
if (!priv->display && priv->create_display) {
|
if (!priv->display && priv->create_display) {
|
||||||
GstVaapiDisplayClass *klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
|
GstVaapiDisplayClass *klass = GST_VAAPI_DISPLAY_GET_CLASS(display);
|
||||||
|
@ -266,7 +266,7 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
|
||||||
priv->subpicture_formats = g_new(VAImageFormat, priv->num_subpicture_formats);
|
priv->subpicture_formats = g_new(VAImageFormat, priv->num_subpicture_formats);
|
||||||
if (!priv->subpicture_formats)
|
if (!priv->subpicture_formats)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
priv->subpicture_flags = g_new(unsigned int, priv->num_subpicture_formats);
|
priv->subpicture_flags = g_new(guint, priv->num_subpicture_formats);
|
||||||
if (!priv->subpicture_flags)
|
if (!priv->subpicture_flags)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
status = vaQuerySubpictureFormats(
|
status = vaQuerySubpictureFormats(
|
||||||
|
@ -473,10 +473,10 @@ _gst_vaapi_display_has_format(
|
||||||
GstVaapiDisplay *display,
|
GstVaapiDisplay *display,
|
||||||
GstVaapiImageFormat format,
|
GstVaapiImageFormat format,
|
||||||
const VAImageFormat *va_formats,
|
const VAImageFormat *va_formats,
|
||||||
unsigned int num_va_formats
|
guint num_va_formats
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
guint i;
|
||||||
|
|
||||||
g_return_val_if_fail(format != 0, FALSE);
|
g_return_val_if_fail(format != 0, FALSE);
|
||||||
|
|
||||||
|
@ -490,11 +490,11 @@ static GstCaps *
|
||||||
_gst_vaapi_display_get_caps(
|
_gst_vaapi_display_get_caps(
|
||||||
GstVaapiDisplay *display,
|
GstVaapiDisplay *display,
|
||||||
const VAImageFormat *va_formats,
|
const VAImageFormat *va_formats,
|
||||||
unsigned int num_va_formats
|
guint num_va_formats
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GstCaps *out_caps;
|
GstCaps *out_caps;
|
||||||
unsigned int i;
|
guint i;
|
||||||
|
|
||||||
out_caps = gst_caps_new_empty();
|
out_caps = gst_caps_new_empty();
|
||||||
if (!out_caps)
|
if (!out_caps)
|
||||||
|
|
|
@ -58,7 +58,7 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SWAP_UINT(a, b) do { \
|
#define SWAP_UINT(a, b) do { \
|
||||||
unsigned int v = a; \
|
guint v = a; \
|
||||||
a = b; \
|
a = b; \
|
||||||
b = v; \
|
b = v; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
@ -56,7 +56,7 @@ static const int x11_event_mask = (KeyPressMask |
|
||||||
StructureNotifyMask);
|
StructureNotifyMask);
|
||||||
|
|
||||||
Window
|
Window
|
||||||
x11_create_window(Display *display, unsigned int width, unsigned int height)
|
x11_create_window(Display *display, guint width, guint height)
|
||||||
{
|
{
|
||||||
Window root_window, window;
|
Window root_window, window;
|
||||||
int screen, depth;
|
int screen, depth;
|
||||||
|
@ -110,7 +110,7 @@ x11_get_geometry(
|
||||||
{
|
{
|
||||||
Window rootwin;
|
Window rootwin;
|
||||||
int x, y;
|
int x, y;
|
||||||
unsigned int width, height, border_width, depth;
|
guint width, height, border_width, depth;
|
||||||
|
|
||||||
x11_trap_errors();
|
x11_trap_errors();
|
||||||
XGetGeometry(
|
XGetGeometry(
|
||||||
|
|
|
@ -32,7 +32,7 @@ int x11_untrap_errors(void)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
Window
|
Window
|
||||||
x11_create_window(Display *display, unsigned int width, unsigned int height)
|
x11_create_window(Display *display, guint width, guint height)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
|
@ -36,8 +36,8 @@ G_DEFINE_TYPE(GstVaapiWindowX11, gst_vaapi_window_x11, GST_VAAPI_TYPE_WINDOW);
|
||||||
struct _GstVaapiWindowX11Private {
|
struct _GstVaapiWindowX11Private {
|
||||||
GstVaapiDisplay *display;
|
GstVaapiDisplay *display;
|
||||||
Window xid;
|
Window xid;
|
||||||
unsigned int create_window : 1;
|
guint create_window : 1;
|
||||||
unsigned int is_visible : 1;
|
guint is_visible : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -169,7 +169,7 @@ gst_vaapi_window_x11_render(
|
||||||
GstVaapiDisplay *display;
|
GstVaapiDisplay *display;
|
||||||
VASurfaceID surface_id;
|
VASurfaceID surface_id;
|
||||||
VAStatus status;
|
VAStatus status;
|
||||||
unsigned int va_flags = 0;
|
guint va_flags = 0;
|
||||||
|
|
||||||
display = gst_vaapi_surface_get_display(surface);
|
display = gst_vaapi_surface_get_display(surface);
|
||||||
if (!display)
|
if (!display)
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct _GstVaapiConvert {
|
||||||
GstVaapiVideoPool *surfaces;
|
GstVaapiVideoPool *surfaces;
|
||||||
guint surface_width;
|
guint surface_width;
|
||||||
guint surface_height;
|
guint surface_height;
|
||||||
unsigned int use_inout_buffers : 1;
|
guint use_inout_buffers : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVaapiConvertClass {
|
struct _GstVaapiConvertClass {
|
||||||
|
|
Loading…
Reference in a new issue