omx: Return the OMX_ERRORTYPE from gst_omx_port_update_port_definition

This commit is contained in:
Sebastian Dröge 2013-02-28 15:48:53 +01:00
parent dc0385d762
commit aeec430261
9 changed files with 16 additions and 12 deletions

View file

@ -1149,7 +1149,7 @@ gst_omx_port_get_port_definition (GstOMXPort * port,
port_def->nBufferCountMin = port->min_buffer_count;
}
gboolean
OMX_ERRORTYPE
gst_omx_port_update_port_definition (GstOMXPort * port,
OMX_PARAM_PORTDEFINITIONTYPE * port_def)
{
@ -1173,7 +1173,7 @@ gst_omx_port_update_port_definition (GstOMXPort * port,
GST_DEBUG_OBJECT (comp->parent, "Updated port %u definition: %s (0x%08x)",
port->index, gst_omx_error_to_string (err), err);
return (err == OMX_ErrorNone);
return err;
}
/* NOTE: Uses comp->lock and comp->messages_lock */

View file

@ -297,7 +297,7 @@ OMX_ERRORTYPE gst_omx_component_close_tunnel (GstOMXComponent * comp1, GstOM
void gst_omx_port_get_port_definition (GstOMXPort * port, OMX_PARAM_PORTDEFINITIONTYPE * port_def);
gboolean gst_omx_port_update_port_definition (GstOMXPort *port, OMX_PARAM_PORTDEFINITIONTYPE *port_definition);
OMX_ERRORTYPE gst_omx_port_update_port_definition (GstOMXPort *port, OMX_PARAM_PORTDEFINITIONTYPE *port_definition);
GstOMXAcquireBufferReturn gst_omx_port_acquire_buffer (GstOMXPort *port, GstOMXBuffer **buf);
OMX_ERRORTYPE gst_omx_port_release_buffer (GstOMXPort *port, GstOMXBuffer *buf);

View file

@ -650,11 +650,13 @@ gst_omx_audio_enc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
port_def.format.audio.eEncoding = OMX_AUDIO_CodingPCM;
GST_DEBUG_OBJECT (self, "Setting inport port definition");
if (!gst_omx_port_update_port_definition (self->enc_in_port, &port_def))
if (gst_omx_port_update_port_definition (self->enc_in_port,
&port_def) != OMX_ErrorNone)
return FALSE;
GST_DEBUG_OBJECT (self, "Setting outport port definition");
if (!gst_omx_port_update_port_definition (self->enc_out_port, NULL))
if (gst_omx_port_update_port_definition (self->enc_out_port,
NULL) != OMX_ErrorNone)
return FALSE;
GST_OMX_INIT_STRUCT (&pcm_param);

View file

@ -92,7 +92,7 @@ gst_omx_h263_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
gst_omx_port_get_port_definition (port, &port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingH263;
ret = gst_omx_port_update_port_definition (port, &port_def);
ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
return ret;
}

View file

@ -93,7 +93,7 @@ gst_omx_h264_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
gst_omx_port_get_port_definition (port, &port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC;
ret = gst_omx_port_update_port_definition (port, &port_def);
ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
return ret;
}

View file

@ -93,7 +93,7 @@ gst_omx_mpeg2_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
gst_omx_port_get_port_definition (port, &port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingMPEG2;
ret = gst_omx_port_update_port_definition (port, &port_def);
ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
return ret;
}

View file

@ -95,7 +95,7 @@ gst_omx_mpeg4_video_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
gst_omx_port_get_port_definition (port, &port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingMPEG4;
ret = gst_omx_port_update_port_definition (port, &port_def);
ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
return ret;
}

View file

@ -1171,11 +1171,13 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
GST_DEBUG_OBJECT (self, "Setting inport port definition");
if (!gst_omx_port_update_port_definition (self->dec_in_port, &port_def))
if (gst_omx_port_update_port_definition (self->dec_in_port,
&port_def) != OMX_ErrorNone)
return FALSE;
GST_DEBUG_OBJECT (self, "Setting outport port definition");
if (!gst_omx_port_update_port_definition (self->dec_out_port, NULL))
if (gst_omx_port_update_port_definition (self->dec_out_port,
NULL) != OMX_ErrorNone)
return FALSE;
if (klass->set_format) {

View file

@ -92,7 +92,7 @@ gst_omx_wmv_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port,
gst_omx_port_get_port_definition (port, &port_def);
port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingWMV;
ret = gst_omx_port_update_port_definition (port, &port_def);
ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone;
return ret;
}