encoder: clean-ups.

Drop obsolete and unused macros. Add a few doc comments. Slightly
improve indentation of a few leftovers.
This commit is contained in:
Gwenole Beauchesne 2014-01-12 21:57:20 +01:00
parent 850a637d0f
commit 4a6fbddad6
3 changed files with 23 additions and 24 deletions

View file

@ -27,10 +27,10 @@
G_BEGIN_DECLS
typedef struct _GstVaapiEncoder GstVaapiEncoder;
#define GST_VAAPI_ENCODER(encoder) \
((GstVaapiEncoder *) (encoder))
#define GST_VAAPI_ENCODER(encoder) \
((GstVaapiEncoder *)(encoder))
typedef struct _GstVaapiEncoder GstVaapiEncoder;
/**
* GstVaapiEncoderStatus:

View file

@ -32,8 +32,8 @@
#include "gstvaapidebug.h"
#define GET_ENCODER(obj) GST_VAAPI_ENCODER_CAST((obj)->parent_instance.codec)
#define GET_VA_DISPLAY(obj) GST_VAAPI_ENCODER_VA_DISPLAY(GET_ENCODER(obj))
#define GET_VA_CONTEXT(obj) GST_VAAPI_ENCODER_VA_CONTEXT(GET_ENCODER(obj))
#define GET_VA_DISPLAY(obj) GET_ENCODER(obj)->va_display
#define GET_VA_CONTEXT(obj) GET_ENCODER(obj)->va_context
/* ------------------------------------------------------------------------- */
/* --- Encoder Packed Header --- */

View file

@ -40,21 +40,27 @@ G_BEGIN_DECLS
#define GST_VAAPI_ENCODER_GET_CLASS(obj) \
GST_VAAPI_ENCODER_CLASS(GST_VAAPI_MINI_OBJECT_GET_CLASS(obj))
/* Get GstVaapiDisplay* */
/**
* GST_VAAPI_ENCODER_DISPLAY:
* @encoder: a #GstVaapiEncoder
*
* Macro that evaluates to the #GstVaapiDisplay of @encoder.
* This is an internal macro that does not do any run-time type check.
*/
#undef GST_VAAPI_ENCODER_DISPLAY
#define GST_VAAPI_ENCODER_DISPLAY(encoder) \
(GST_VAAPI_ENCODER_CAST(encoder)->display)
GST_VAAPI_ENCODER_CAST(encoder)->display
/* Get VADisplay */
#define GST_VAAPI_ENCODER_VA_DISPLAY(encoder) \
(GST_VAAPI_ENCODER_CAST(encoder)->va_display)
/* Get GstVaapiContext* */
/**
* GST_VAAPI_ENCODER_CONTEXT:
* @encoder: a #GstVaapiEncoder
*
* Macro that evaluates to the #GstVaapiContext of @encoder.
* This is an internal macro that does not do any run-time type check.
*/
#undef GST_VAAPI_ENCODER_CONTEXT
#define GST_VAAPI_ENCODER_CONTEXT(encoder) \
(GST_VAAPI_ENCODER_CAST(encoder)->context)
/* Get VAContext */
#define GST_VAAPI_ENCODER_VA_CONTEXT(encoder) \
(GST_VAAPI_ENCODER_CAST(encoder)->va_context)
GST_VAAPI_ENCODER_CAST(encoder)->context
/**
* GST_VAAPI_ENCODER_VIDEO_INFO:
@ -133,13 +139,6 @@ G_BEGIN_DECLS
#define GST_VAAPI_ENCODER_KEYFRAME_PERIOD(encoder) \
(GST_VAAPI_ENCODER_CAST (encoder)->keyframe_period)
#define GST_VAAPI_ENCODER_CHECK_STATUS(exp, err_num, err_reason, ...) \
if (!(exp)) { \
ret = err_num; \
GST_VAAPI_ENCODER_LOG_ERROR(err_reason, ## __VA_ARGS__); \
goto end; \
}
typedef struct _GstVaapiEncoderClass GstVaapiEncoderClass;
typedef struct _GstVaapiEncoderClassData GstVaapiEncoderClassData;