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 * 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> * Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or

View file

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

View file

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

View file

@ -33,10 +33,8 @@ G_BEGIN_DECLS
#define GST_VAAPI_OBJECT_CLASS(klass) \ #define GST_VAAPI_OBJECT_CLASS(klass) \
((GstVaapiObjectClass *) (klass)) ((GstVaapiObjectClass *) (klass))
#define GST_VAAPI_IS_OBJECT_CLASS(klass) \ #define GST_VAAPI_IS_OBJECT_CLASS(klass) \
((klass) != NULL) ((klass) != NULL)
#define GST_VAAPI_OBJECT_GET_CLASS(object) \ #define GST_VAAPI_OBJECT_GET_CLASS(object) \
GST_VAAPI_OBJECT_CLASS (GST_VAAPI_MINI_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) \ #define GST_VAAPI_OBJECT_DEFINE_CLASS(TN, t_n) \
GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE (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: * GST_VAAPI_OBJECT_ID:
* @object: a #GstVaapiObject * @object: a #GstVaapiObject
@ -86,7 +73,18 @@ G_PASTE(t_n,_class)(void) \
*/ */
#undef GST_VAAPI_OBJECT_ID #undef GST_VAAPI_OBJECT_ID
#define GST_VAAPI_OBJECT_ID(object) \ #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: * GST_VAAPI_OBJECT_DISPLAY_X11:
@ -190,7 +188,8 @@ G_PASTE(t_n,_class)(void) \
* *
* VA object base. * VA object base.
*/ */
struct _GstVaapiObject { struct _GstVaapiObject
{
/*< private >*/ /*< private >*/
GstVaapiMiniObject parent_instance; GstVaapiMiniObject parent_instance;
@ -203,7 +202,8 @@ struct _GstVaapiObject {
* *
* VA object base class. * VA object base class.
*/ */
struct _GstVaapiObjectClass { struct _GstVaapiObjectClass
{
/*< private >*/ /*< private >*/
GstVaapiMiniObjectClass parent_class; GstVaapiMiniObjectClass parent_class;