[Pkg-gstreamer-commits] [gstreamer-vaapi] 106/176: encoder: clean-ups.
Vincent Cheng
vcheng at moszumanska.debian.org
Tue Jun 3 08:09:32 UTC 2014
This is an automated email from the git hooks/post-receive script.
vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.
commit 4a6fbddad64798012f623b92d40a7af84704eba9
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date: Sun Jan 12 21:57:20 2014 +0100
encoder: clean-ups.
Drop obsolete and unused macros. Add a few doc comments. Slightly
improve indentation of a few leftovers.
---
gst-libs/gst/vaapi/gstvaapiencoder.h | 6 ++---
gst-libs/gst/vaapi/gstvaapiencoder_objects.c | 4 +--
gst-libs/gst/vaapi/gstvaapiencoder_priv.h | 37 ++++++++++++++--------------
3 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.h b/gst-libs/gst/vaapi/gstvaapiencoder.h
index 1c3c86b..5df548e 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.h
@@ -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:
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_objects.c b/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
index b75bb95..b4bdbd9 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
@@ -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 --- */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
index 81549d5..78d9da0 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
@@ -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)
-
-/* Get VADisplay */
-#define GST_VAAPI_ENCODER_VA_DISPLAY(encoder) \
- (GST_VAAPI_ENCODER_CAST(encoder)->va_display)
+ GST_VAAPI_ENCODER_CAST(encoder)->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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git
More information about the Pkg-gstreamer-commits
mailing list