gst_omx_video_dec_change_state (GstElement * element,
GstStateChange transition);
+static gboolean gst_omx_video_dec_open (GstVideoDecoder * decoder);
+static gboolean gst_omx_video_dec_close (GstVideoDecoder * decoder);
static gboolean gst_omx_video_dec_start (GstVideoDecoder * decoder);
static gboolean gst_omx_video_dec_stop (GstVideoDecoder * decoder);
static gboolean gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
element_class->change_state =
GST_DEBUG_FUNCPTR (gst_omx_video_dec_change_state);
+ video_decoder_class->open = GST_DEBUG_FUNCPTR (gst_omx_video_dec_open);
+ video_decoder_class->close = GST_DEBUG_FUNCPTR (gst_omx_video_dec_close);
video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_omx_video_dec_start);
video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_omx_video_dec_stop);
video_decoder_class->reset = GST_DEBUG_FUNCPTR (gst_omx_video_dec_reset);
}
static gboolean
-gst_omx_video_dec_open (GstOMXVideoDec * self)
+gst_omx_video_dec_open (GstVideoDecoder * decoder)
{
+ GstOMXVideoDec *self = GST_OMX_VIDEO_DEC (decoder);
GstOMXVideoDecClass *klass = GST_OMX_VIDEO_DEC_GET_CLASS (self);
GST_DEBUG_OBJECT (self, "Opening decoder");
}
static gboolean
-gst_omx_video_dec_close (GstOMXVideoDec * self)
+gst_omx_video_dec_close (GstVideoDecoder * decoder)
{
+ GstOMXVideoDec *self = GST_OMX_VIDEO_DEC (decoder);
+
GST_DEBUG_OBJECT (self, "Closing decoder");
if (!gst_omx_video_dec_shutdown (self))
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
- if (!gst_omx_video_dec_open (self))
- ret = GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
if (self->in_port)
ret = GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
- if (!gst_omx_video_dec_close (self))
- ret = GST_STATE_CHANGE_FAILURE;
break;
default:
break;
if (klass->cdata.hacks & GST_OMX_HACK_NO_COMPONENT_RECONFIGURE) {
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
gst_omx_video_dec_stop (GST_VIDEO_DECODER (self));
- gst_omx_video_dec_close (self);
+ gst_omx_video_dec_close (GST_VIDEO_DECODER (self));
GST_VIDEO_DECODER_STREAM_LOCK (self);
- if (!gst_omx_video_dec_open (self))
+ if (!gst_omx_video_dec_open (GST_VIDEO_DECODER (self)))
return FALSE;
needs_disable = FALSE;
} else {
gst_omx_video_enc_change_state (GstElement * element,
GstStateChange transition);
+static gboolean gst_omx_video_enc_open (GstVideoEncoder * encoder);
+static gboolean gst_omx_video_enc_close (GstVideoEncoder * encoder);
static gboolean gst_omx_video_enc_start (GstVideoEncoder * encoder);
static gboolean gst_omx_video_enc_stop (GstVideoEncoder * encoder);
static gboolean gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
element_class->change_state =
GST_DEBUG_FUNCPTR (gst_omx_video_enc_change_state);
+ video_encoder_class->open = GST_DEBUG_FUNCPTR (gst_omx_video_enc_open);
+ video_encoder_class->close = GST_DEBUG_FUNCPTR (gst_omx_video_enc_close);
video_encoder_class->start = GST_DEBUG_FUNCPTR (gst_omx_video_enc_start);
video_encoder_class->stop = GST_DEBUG_FUNCPTR (gst_omx_video_enc_stop);
video_encoder_class->reset = GST_DEBUG_FUNCPTR (gst_omx_video_enc_reset);
}
static gboolean
-gst_omx_video_enc_open (GstOMXVideoEnc * self)
+gst_omx_video_enc_open (GstVideoEncoder * encoder)
{
+ GstOMXVideoEnc *self = GST_OMX_VIDEO_ENC (encoder);
GstOMXVideoEncClass *klass = GST_OMX_VIDEO_ENC_GET_CLASS (self);
self->component =
}
static gboolean
-gst_omx_video_enc_close (GstOMXVideoEnc * self)
+gst_omx_video_enc_close (GstVideoEncoder * encoder)
{
+ GstOMXVideoEnc *self = GST_OMX_VIDEO_ENC (encoder);
+
GST_DEBUG_OBJECT (self, "Closing encoder");
if (!gst_omx_video_enc_shutdown (self))
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
- if (!gst_omx_video_enc_open (self))
- ret = GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
if (self->in_port)
ret = GST_STATE_CHANGE_FAILURE;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
- if (!gst_omx_video_enc_close (self))
- ret = GST_STATE_CHANGE_FAILURE;
break;
default:
break;