diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/aom/gstav1dec.c | 8 | ||||
-rw-r--r-- | ext/aom/gstav1dec.h | 2 | ||||
-rw-r--r-- | ext/aom/gstav1enc.c | 10 | ||||
-rw-r--r-- | ext/aom/gstav1enc.h | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/ext/aom/gstav1dec.c b/ext/aom/gstav1dec.c index 17e2ec861..b2a9b51ad 100644 --- a/ext/aom/gstav1dec.c +++ b/ext/aom/gstav1dec.c @@ -153,7 +153,7 @@ gst_av1_dec_get_property (GObject * object, guint prop_id, GValue * value, static gboolean gst_av1_dec_start (GstVideoDecoder * dec) { - GstAV1Dec *av1dec = (GstAV1Dec *) dec; + GstAV1Dec *av1dec = GST_AV1_DEC_CAST (dec); av1dec->decoder_inited = FALSE; av1dec->output_state = NULL; @@ -165,7 +165,7 @@ gst_av1_dec_start (GstVideoDecoder * dec) static gboolean gst_av1_dec_stop (GstVideoDecoder * dec) { - GstAV1Dec *av1dec = (GstAV1Dec *) dec; + GstAV1Dec *av1dec = GST_AV1_DEC_CAST (dec); if (av1dec->output_state) { gst_video_codec_state_unref (av1dec->output_state); @@ -188,7 +188,7 @@ gst_av1_dec_stop (GstVideoDecoder * dec) static gboolean gst_av1_dec_set_format (GstVideoDecoder * dec, GstVideoCodecState * state) { - GstAV1Dec *av1dec = (GstAV1Dec *) dec; + GstAV1Dec *av1dec = GST_AV1_DEC_CAST (dec); if (av1dec->decoder_inited) { aom_codec_destroy (&av1dec->decoder); @@ -291,7 +291,7 @@ gst_av1_dec_image_to_buffer (GstAV1Dec * dec, const aom_image_t * img, static GstFlowReturn gst_av1_dec_handle_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame) { - GstAV1Dec *av1dec = (GstAV1Dec *) dec; + GstAV1Dec *av1dec = GST_AV1_DEC_CAST (dec); GstFlowReturn ret; GstMapInfo minfo; aom_codec_err_t status; diff --git a/ext/aom/gstav1dec.h b/ext/aom/gstav1dec.h index b793fdedb..1d91d17da 100644 --- a/ext/aom/gstav1dec.h +++ b/ext/aom/gstav1dec.h @@ -41,6 +41,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AV1_DEC)) #define GST_AV1_DEC_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AV1_DEC, GstAV1DecClass)) +#define GST_AV1_DEC_CAST(obj) \ + ((GstAV1Dec *) (obj)) typedef struct _GstAV1Dec GstAV1Dec; typedef struct _GstAV1DecClass GstAV1DecClass; diff --git a/ext/aom/gstav1enc.c b/ext/aom/gstav1enc.c index b18c4e981..d7838ab1c 100644 --- a/ext/aom/gstav1enc.c +++ b/ext/aom/gstav1enc.c @@ -147,7 +147,7 @@ gst_av1_enc_finalize (GObject * object) static void gst_av1_enc_set_latency (GstAV1Enc * encoder) { - GstAV1Enc *av1enc = GST_AV1_ENC (encoder); + GstAV1Enc *av1enc = GST_AV1_ENC_CAST (encoder); GstClockTime latency = gst_util_uint64_scale (av1enc->aom_cfg.g_lag_in_frames, 1 * GST_SECOND, 30); @@ -259,7 +259,7 @@ static gboolean gst_av1_enc_set_format (GstVideoEncoder * encoder, GstVideoCodecState * state) { GstVideoCodecState *output_state; - GstAV1Enc *av1enc = GST_AV1_ENC (encoder); + GstAV1Enc *av1enc = GST_AV1_ENC_CAST (encoder); av1enc->keyframe_dist = 30; @@ -327,7 +327,7 @@ gst_av1_enc_fill_image (GstAV1Enc * enc, GstVideoFrame * frame, static GstFlowReturn gst_av1_enc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame) { - GstAV1Enc *av1enc = GST_AV1_ENC (encoder); + GstAV1Enc *av1enc = GST_AV1_ENC_CAST (encoder); aom_image_t raw; int flags = 0; GstFlowReturn ret; @@ -373,7 +373,7 @@ static void gst_av1_enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { - GstAV1Enc *av1enc = GST_AV1_ENC (object); + GstAV1Enc *av1enc = GST_AV1_ENC_CAST (object); GST_OBJECT_LOCK (av1enc); @@ -390,7 +390,7 @@ static void gst_av1_enc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { - GstAV1Enc *av1enc = GST_AV1_ENC (object); + GstAV1Enc *av1enc = GST_AV1_ENC_CAST (object); GST_OBJECT_LOCK (av1enc); diff --git a/ext/aom/gstav1enc.h b/ext/aom/gstav1enc.h index 2493d8c44..57f38cbf0 100644 --- a/ext/aom/gstav1enc.h +++ b/ext/aom/gstav1enc.h @@ -41,6 +41,8 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AV1_ENC)) #define GST_IS_AV1_ENC_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AV1_ENC)) +#define GST_AV1_ENC_CAST(obj) \ + ((GstAV1Enc *) (obj)) typedef struct _GstAV1Enc GstAV1Enc; typedef struct _GstAV1EncClass GstAV1EncClass; |