Ejemplo n.º 1
0
static bool
claim_input (const void *ap_obj)
{
  const tiz_srv_t *p_parent = ap_obj;
  struct webpdprc *p_obj = (struct webpdprc *) ap_obj;
  tiz_pd_set_t ports;
  void *p_krn = tiz_get_krn (p_parent->p_hdl_);

  TIZ_PD_ZERO (&ports);
  tiz_check_omx_err (tiz_krn_select (p_krn, 2, &ports));

  /* We need one input buffers */
  if (TIZ_PD_ISSET (0, &ports))
    {
      tiz_check_omx_err (tiz_krn_claim_buffer
                         (p_krn, 0, 0, &p_obj->pinhdr_));
      TIZ_LOG_CNAME (TIZ_TRACE, TIZ_CNAME (p_parent->p_hdl_),
                     TIZ_CBUF (p_parent->p_hdl_),
                     "Claimed INPUT HEADER [%p]...", p_obj->pinhdr_);
      return true;
    }

  TIZ_LOG_CNAME (TIZ_TRACE,
                 TIZ_CNAME (p_parent->p_hdl_),
                 TIZ_CBUF (p_parent->p_hdl_),
                 "COULD NOT CLAIM AN INPUT HEADER...");

  return false;
}
Ejemplo n.º 2
0
static bool
claim_output (const void *ap_obj)
{
  const tiz_srv_t *p_parent = ap_obj;
  struct webpdprc *p_obj = (struct webpdprc *) ap_obj;
  tiz_pd_set_t ports;
  void *p_krn = tiz_get_krn (p_parent->p_hdl_);

  TIZ_PD_ZERO (&ports);
  tiz_check_omx_err (tiz_krn_select (p_krn, 2, &ports));

  /* We need one output buffers */
  if (TIZ_PD_ISSET (1, &ports))
    {
      tiz_check_omx_err (tiz_krn_claim_buffer
                         (p_krn, 1, 0, &p_obj->pouthdr_));
      TIZ_LOG_CNAME (TIZ_TRACE, TIZ_CNAME (p_parent->p_hdl_),
                     TIZ_CBUF (p_parent->p_hdl_),
                     "Claimed OUTPUT HEADER [%p] BUFFER [%p] "
                     "nFilledLen [%d]...", p_obj->pouthdr_,
                     p_obj->pouthdr_->pBuffer, p_obj->pouthdr_->nFilledLen);
      return true;
    }

  return false;
}
Ejemplo n.º 3
0
static OMX_ERRORTYPE
fr_proc_buffers_ready (const void *ap_obj)
{
  const fr_prc_t *p_obj = ap_obj;
  const tiz_srv_t *p_parent = ap_obj;
  tiz_pd_set_t ports;
  void *p_krn = tiz_get_krn (p_parent->p_hdl_);
  OMX_BUFFERHEADERTYPE *p_hdr = NULL;

  if (p_obj->eos_ == false)
    {
      TIZ_PD_ZERO (&ports);

      tiz_check_omx_err (tiz_krn_select (p_krn, 1, &ports));

      if (TIZ_PD_ISSET (0, &ports))
        {
          tiz_check_omx_err (tiz_krn_claim_buffer (p_krn, 0, 0, &p_hdr));
          TIZ_LOG (TIZ_TRACE, "Claimed HEADER [%p]...", p_hdr);
          tiz_check_omx_err (fr_proc_read_buffer (ap_obj, p_hdr));
          tiz_krn_release_buffer (p_krn, 0, p_hdr);
        }
    }

  return OMX_ErrorNone;
}
Ejemplo n.º 4
0
static OMX_ERRORTYPE
tiztc_proc_buffers_ready (const void *ap_obj)
{
  const tiz_srv_t *p_parent = ap_obj;
  tiz_pd_set_t ports;
  void *p_ker = tiz_get_krn (p_parent->p_hdl_);
  OMX_BUFFERHEADERTYPE *p_hdr = NULL;

  TIZ_LOG (TIZ_TRACE, "Buffers ready...");

  TIZ_PD_ZERO (&ports);

  tiz_check_omx_err (tiz_krn_select (p_ker, 1, &ports));

  if (TIZ_PD_ISSET (0, &ports))
    {
      tiz_check_omx_err (tiz_krn_claim_buffer (p_ker, 0, 0, &p_hdr));
      tiz_check_omx_err (tiztc_proc_render_buffer (p_hdr));
      (void) tiz_krn_release_buffer (p_ker, 0, p_hdr);
    }

  return OMX_ErrorNone;
}