Beispiel #1
0
static OMX_ERRORTYPE
pause_SetParameter (const void *ap_obj,
                    OMX_HANDLETYPE ap_hdl,
                    OMX_INDEXTYPE a_index, OMX_PTR a_struct)
{
  const void *p_krn = tiz_get_krn (ap_hdl);
  OMX_PTR p_port = NULL;
  OMX_ERRORTYPE rc = OMX_ErrorNone;

  /* TODO: Optimization: find_managing_port is called twice, first time here,
   * then in the SetParameter implementation of the kernel object. */
  if (OMX_ErrorNone
      != (rc =
          tiz_krn_find_managing_port (p_krn, a_index, a_struct, &p_port)))
    {
      TIZ_LOG (TIZ_TRACE, "Cannot retrieve managing port (%s)...",
               tiz_err_to_str (rc));
      return rc;
    }

  assert (p_port);

  if (TIZ_PORT_IS_CONFIG_PORT (p_port)
      || (!TIZ_PORT_IS_CONFIG_PORT (p_port) && TIZ_PORT_IS_ENABLED (p_port)))
    {
      TIZ_LOG (TIZ_TRACE, "Incorrect state op "
               "(SetParameter received in Pause state)...");
      return OMX_ErrorIncorrectStateOperation;
    }

  return tiz_api_SetParameter (p_krn, ap_hdl, a_index, a_struct);

}
static OMX_ERRORTYPE
waitforresources_SetParameter (const void *ap_obj,
                               OMX_HANDLETYPE ap_hdl,
                               OMX_INDEXTYPE a_index, OMX_PTR a_struct)
{
  const void *p_krn = tiz_get_krn (ap_hdl);

  return tiz_api_SetParameter (p_krn, ap_hdl, a_index, a_struct);
}
Beispiel #3
0
static OMX_ERRORTYPE
binaryport_SetParameter (const void * ap_obj, OMX_HANDLETYPE ap_hdl,
                         OMX_INDEXTYPE a_index, OMX_PTR ap_struct)
{
  tiz_binaryport_t * p_obj = (tiz_binaryport_t *) ap_obj;
  OMX_ERRORTYPE rc = OMX_ErrorNone;

  TIZ_TRACE (ap_hdl, "PORT [%d] SetParameter [%s]...", tiz_port_index (ap_obj),
             tiz_idx_to_str (a_index));
  assert (p_obj);

  switch (a_index)
    {
      case OMX_IndexParamAudioPortFormat:
      case OMX_IndexParamVideoPortFormat:
      case OMX_IndexParamImagePortFormat:
      case OMX_IndexParamOtherPortFormat:
        {
          /* Delegate to the domain-specific port */
          if (OMX_ErrorUnsupportedIndex
              != (rc = tiz_api_SetParameter (p_obj->p_port_, ap_hdl, a_index,
                                             ap_struct)))
            {
              return rc;
            }
        }

      /* NOTE: Fall through if GetParameter returned
       * OMX_ErrorUnsupportedIndex. So that we delegate to the parent */
      /*@fallthrough@*/
      default:
        {
          /* Delegate to the base port */
          rc = super_SetParameter (typeOf (ap_obj, "tizbinaryport"), ap_obj,
                                   ap_hdl, a_index, ap_struct);
        }
    };

  return rc;
}