mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
omx: Return the OMX_ERRORTYPE from gst_omx_port_update_port_definition
This commit is contained in:
parent
dc0385d762
commit
aeec430261
9 changed files with 16 additions and 12 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue