libs: re-indent all GstVaapiObject related source code.

Re-indent and provide additional minor cosmetical changes to the
GstVaapiMiniObject and GstVaapiObject source files.
This commit is contained in:
Gwenole Beauchesne 2014-12-02 14:15:49 +01:00
parent bee7460f35
commit c2afdb4650
5 changed files with 210 additions and 198 deletions

View file

@ -1,7 +1,7 @@
/*
* gstvaapiminiobject.c - A lightweight reference counted object
*
* Copyright (C) 2012-2013 Intel Corporation
* Copyright (C) 2012-2014 Intel Corporation
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
*
* This library is free software; you can redistribute it and/or

View file

@ -1,7 +1,7 @@
/*
* gstvaapiminiobject.h - A lightweight reference counted object
*
* Copyright (C) 2012-2013 Intel Corporation
* Copyright (C) 2012-2014 Intel Corporation
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
*
* This library is free software; you can redistribute it and/or
@ -40,6 +40,15 @@ typedef struct _GstVaapiMiniObjectClass GstVaapiMiniObjectClass;
#define GST_VAAPI_MINI_OBJECT(object) \
((GstVaapiMiniObject *) (object))
/**
* GST_VAAPI_MINI_OBJECT_PTR:
* @object_ptr: a pointer #GstVaapiMiniObject
*
* Casts the @object_ptr to a pointer to #GstVaapiMiniObject
*/
#define GST_VAAPI_MINI_OBJECT_PTR(object_ptr) \
((GstVaapiMiniObject **) (object_ptr))
/**
* GST_VAAPI_MINI_OBJECT_CLASS:
* @klass: a #GstVaapiMiniObjectClass
@ -108,7 +117,8 @@ typedef struct _GstVaapiMiniObjectClass GstVaapiMiniObjectClass;
* A #GstVaapiMiniObject represents a minimal reference counted data
* structure that can hold a set of flags and user-provided data.
*/
struct _GstVaapiMiniObject {
struct _GstVaapiMiniObject
{
/*< private >*/
gconstpointer object_class;
volatile gint ref_count;
@ -125,7 +135,9 @@ struct _GstVaapiMiniObject {
* defines the size of the #GstVaapiMiniObject and utility function to
* dispose child objects
*/
struct _GstVaapiMiniObjectClass {
struct _GstVaapiMiniObjectClass
{
/*< protected >*/
guint size;
GDestroyNotify finalize;
};

View file

@ -44,8 +44,7 @@
static void
gst_vaapi_object_finalize (GstVaapiObject * object)
{
const GstVaapiObjectClass * const klass =
GST_VAAPI_OBJECT_GET_CLASS(object);
const GstVaapiObjectClass *const klass = GST_VAAPI_OBJECT_GET_CLASS (object);
if (klass->finalize)
klass->finalize (object);
@ -77,7 +76,8 @@ gst_vaapi_object_class_init(GstVaapiObjectClass *klass, guint size)
* Returns: The newly allocated #GstVaapiObject
*/
gpointer
gst_vaapi_object_new(const GstVaapiObjectClass *klass, GstVaapiDisplay *display)
gst_vaapi_object_new (const GstVaapiObjectClass * klass,
GstVaapiDisplay * display)
{
const GstVaapiMiniObjectClass *const object_class =
GST_VAAPI_MINI_OBJECT_CLASS (klass);

View file

@ -33,10 +33,8 @@ G_BEGIN_DECLS
#define GST_VAAPI_OBJECT_CLASS(klass) \
((GstVaapiObjectClass *) (klass))
#define GST_VAAPI_IS_OBJECT_CLASS(klass) \
((klass) != NULL)
#define GST_VAAPI_OBJECT_GET_CLASS(object) \
GST_VAAPI_OBJECT_CLASS (GST_VAAPI_MINI_OBJECT_GET_CLASS (object))
@ -66,17 +64,6 @@ G_PASTE(t_n,_class)(void) \
#define GST_VAAPI_OBJECT_DEFINE_CLASS(TN, t_n) \
GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE (TN, t_n, /**/)
/**
* GST_VAAPI_OBJECT_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
* This is an internal macro that does not do any run-time type check.
*/
#undef GST_VAAPI_OBJECT_DISPLAY
#define GST_VAAPI_OBJECT_DISPLAY(object) \
GST_VAAPI_OBJECT(object)->display
/**
* GST_VAAPI_OBJECT_ID:
* @object: a #GstVaapiObject
@ -86,7 +73,18 @@ G_PASTE(t_n,_class)(void) \
*/
#undef GST_VAAPI_OBJECT_ID
#define GST_VAAPI_OBJECT_ID(object) \
GST_VAAPI_OBJECT(object)->object_id
(GST_VAAPI_OBJECT (object)->object_id)
/**
* GST_VAAPI_OBJECT_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
* This is an internal macro that does not do any run-time type check.
*/
#undef GST_VAAPI_OBJECT_DISPLAY
#define GST_VAAPI_OBJECT_DISPLAY(object) \
(GST_VAAPI_OBJECT (object)->display)
/**
* GST_VAAPI_OBJECT_DISPLAY_X11:
@ -190,7 +188,8 @@ G_PASTE(t_n,_class)(void) \
*
* VA object base.
*/
struct _GstVaapiObject {
struct _GstVaapiObject
{
/*< private >*/
GstVaapiMiniObject parent_instance;
@ -203,7 +202,8 @@ struct _GstVaapiObject {
*
* VA object base class.
*/
struct _GstVaapiObjectClass {
struct _GstVaapiObjectClass
{
/*< private >*/
GstVaapiMiniObjectClass parent_class;