bool graph::ops::is_port_transition_complete (
    const OMX_HANDLETYPE handle, const OMX_U32 port_id,
    const OMX_COMMANDTYPE disable_or_enable)
{
  bool rc = false;
  TIZ_PRINTF_DBG_RED ("expected_port_transitions_lst_ size [%d]\n", expected_port_transitions_lst_.size ());
  assert (std::find (handles_.begin (), handles_.end (), handle)
          != handles_.end ());
  assert (!expected_port_transitions_lst_.empty ());

  if (!handles_.empty () && !expected_port_transitions_lst_.empty ())
  {
    omx_event_info_lst_t::iterator it = std::find (
        expected_port_transitions_lst_.begin (),
        expected_port_transitions_lst_.end (),
        omx_event_info (handle, port_id, disable_or_enable, OMX_ErrorNone));
    assert (expected_port_transitions_lst_.end () != it);

    if (expected_port_transitions_lst_.end () != it)
    {
      expected_port_transitions_lst_.erase (it);
      // TODO: Assert that the port is disabled/enabled
      // assert (util::verify_port_transition (handle, port_id,
      // disable_or_enable));
      if (expected_port_transitions_lst_.empty ())
      {
        rc = true;
      }
    }
  }
  TIZ_PRINTF_DBG_RED ("expected_port_transitions_lst_ size [%d]\n", expected_port_transitions_lst_.size ());
  return rc;
}
Beispiel #2
0
static bool
connection_lost (OMX_PTR ap_arg)
{
  dirble_prc_t * p_prc = ap_arg;
  assert (p_prc);
  TIZ_PRINTF_DBG_RED ("connection_lost\n");

  if (p_prc->auto_detect_on_)
    {
      /* Oops... unable to connect to the station */

      /* Make sure this url will not get processed again... */
      p_prc->remove_current_url_ = true;

      /* Get ready to auto-detect another stream */
      set_auto_detect_on_port (p_prc);
      prepare_for_port_auto_detection (p_prc);

      /* Signal the client */
      tiz_srv_issue_err_event ((OMX_PTR) p_prc, OMX_ErrorFormatNotDetected);
    }
  /* Return false to indicate that there is no need to start the automatic
     reconnection procedure */
  return false;
}
Beispiel #3
0
static bool
connection_lost (OMX_PTR ap_arg)
{
  scloud_prc_t * p_prc = ap_arg;
  assert (p_prc);
  TIZ_PRINTF_DBG_RED ("connection_lost - bytes_before_eos_ [%d]\n",
                      p_prc->bytes_before_eos_);
  /* Return false to indicate that there is no need to start the automatic
     reconnection procedure */
  return false;
}
  bool is_valid_options_combination (
      std::vector< std::string > &valid_options,
      const std::vector< std::string > &given_options)
  {
    bool outcome = true;

    sort_option_list (valid_options);

    std::vector< std::string > diff;
    diff_option_lists (given_options, valid_options, diff);

    if (!diff.empty ())
    {
      outcome = false;
    }
    TIZ_PRINTF_DBG_RED ("outcome = [%s]\n",
                          outcome ? "SUCCESS" : "FAILURE");
    return outcome;
  }