当前位置: 首页>>代码示例>>C++>>正文


C++ TIZ_TRACE函数代码示例

本文整理汇总了C++中TIZ_TRACE函数的典型用法代码示例。如果您正苦于以下问题:C++ TIZ_TRACE函数的具体用法?C++ TIZ_TRACE怎么用?C++ TIZ_TRACE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TIZ_TRACE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: read_page_first_pass

static int
read_page_first_pass (OGGZ * ap_oggz, const ogg_page * ap_og, long a_serialno,
                      void * ap_user_data)
{
  int rc = OGGZ_CONTINUE;
  oggdmux_prc_t * p_prc = ap_user_data;
  assert (p_prc);
  assert (ap_oggz);

  if (oggz_get_bos (ap_oggz, a_serialno) > 0)
    {
      TIZ_TRACE (handleOf (p_prc), "serialno = [%d]", a_serialno);
      if (!oggz_table_insert (
            p_prc->p_tracks_, a_serialno,
            &read_page_first_pass)) /* NULL makes it barf, needs
                                                                                                 * something */
        {
          TIZ_ERROR (handleOf (p_prc),
                     "serialno = [%d] - "
                     "Could not insert serialno in oggz table",
                     a_serialno);
          rc = OGGZ_STOP_ERR;
        }
    }

  if (oggz_get_bos (ap_oggz, ALL_OGG_STREAMS) == 0)
    {
      TIZ_TRACE (handleOf (p_prc), "Number of tracks [%d]",
                 oggz_get_numtracks (ap_oggz));
      return OGGZ_STOP_OK;
    }

  return rc;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:34,代码来源:oggdmuxprc.c

示例2: httpr_mp3port_SetParameter

static OMX_ERRORTYPE httpr_mp3port_SetParameter (const void *ap_obj,
                                                 OMX_HANDLETYPE ap_hdl,
                                                 OMX_INDEXTYPE a_index,
                                                 OMX_PTR ap_struct)
{
  httpr_mp3port_t *p_obj = (httpr_mp3port_t *)ap_obj;
  OMX_ERRORTYPE rc = OMX_ErrorNone;

  TIZ_TRACE (ap_hdl, "[%s]...", tiz_idx_to_str (a_index));

  assert (NULL != p_obj);

  if (OMX_TizoniaIndexParamIcecastMountpoint == a_index)
    {
      memcpy (&(p_obj->mountpoint_), ap_struct,
              sizeof(OMX_TIZONIA_ICECASTMOUNTPOINTTYPE));
      p_obj->mountpoint_.cStationName[OMX_MAX_STRINGNAME_SIZE - 1] = '\000';
      p_obj->mountpoint_.cStationDescription[OMX_MAX_STRINGNAME_SIZE - 1]
          = '\000';
      p_obj->mountpoint_.cStationGenre[OMX_MAX_STRINGNAME_SIZE - 1] = '\000';
      p_obj->mountpoint_.cStationUrl[OMX_MAX_STRINGNAME_SIZE - 1] = '\000';
      TIZ_TRACE (ap_hdl, "Station Name [%s]...",
                 p_obj->mountpoint_.cStationName);
    }
  else
    {
      /* Try the parent's indexes */
      rc = super_SetParameter (typeOf (ap_obj, "httprmp3port"), ap_obj, ap_hdl,
                               a_index, ap_struct);
    }

  return rc;
}
开发者ID:commshare,项目名称:tizonia-openmax-il,代码行数:33,代码来源:httprmp3port.c

示例3: buffer_emptied

static void
buffer_emptied (OMX_BUFFERHEADERTYPE * ap_hdr, void * ap_arg)
{
  httpr_prc_t * p_prc = ap_arg;

  assert (p_prc);
  assert (ap_hdr);
  assert (p_prc->p_inhdr_ == ap_hdr);
  assert (ap_hdr->nFilledLen == 0);

  ap_hdr->nOffset = 0;
  TIZ_TRACE (handleOf (p_prc), "HEADER [%p]", ap_hdr);

  if ((ap_hdr->nFlags & OMX_BUFFERFLAG_EOS) != 0)
    {
      TIZ_TRACE (handleOf (p_prc), "OMX_BUFFERFLAG_EOS in HEADER [%p]", ap_hdr);
      tiz_srv_issue_event ((OMX_PTR) p_prc, OMX_EventBufferFlag,
                           ARATELIA_HTTP_RENDERER_PORT_INDEX, ap_hdr->nFlags,
                           NULL);
    }

  tiz_krn_release_buffer (tiz_get_krn (handleOf (p_prc)),
                          ARATELIA_HTTP_RENDERER_PORT_INDEX, ap_hdr);
  p_prc->p_inhdr_ = NULL;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:25,代码来源:httprprc.c

示例4: read_packet

static int
read_packet (OGGZ * ap_oggz, oggz_packet * ap_zp, long serialno,
             void * ap_user_data, const OMX_U32 a_pid)
{
  oggdmux_prc_t * p_prc = ap_user_data;
  OMX_U32 op_offset = 0;
  bool * p_eos = NULL;
  ogg_packet * p_op = NULL;
  int rc = OGGZ_CONTINUE;

  assert (ap_oggz);
  assert (ap_zp);
  assert (p_prc);
  assert (a_pid <= ARATELIA_OGG_DEMUXER_VIDEO_PORT_BASE_INDEX);

  p_op = &(ap_zp->op);
  p_eos = get_eos_ptr (p_prc, a_pid);

  TIZ_TRACE (handleOf (p_prc), "%010lu: pid [%d] reading bytes [%d]", serialno,
             a_pid, p_op->bytes);

#ifdef _DEBUG
  if (a_pid == ARATELIA_OGG_DEMUXER_AUDIO_PORT_BASE_INDEX)
    {
      g_total_read += p_op->bytes;
      g_last_read = p_op->bytes;
    }
#endif

  if (oggz_get_eos (ap_oggz, serialno) == 1)
    {
      TIZ_TRACE (handleOf (p_prc), "%010lu: This is EOS\n", serialno);
      *p_eos = true;
    }

  /* Try to empty the ogg packet out to an omx buffer */
  op_offset = flush_ogg_packet (p_prc, a_pid, p_op->packet, p_op->bytes);

  if (0 == op_offset)
    {
      if (*p_eos || !get_header (p_prc, a_pid)
          || (*get_store_offset_ptr (p_prc, a_pid)) > 0)
        {
          rc = OGGZ_STOP_OK;
        }
      else
        {
          rc = OGGZ_CONTINUE;
        }
    }
  else /* (op_offset != 0) */
    {
      rc = OGGZ_STOP_ERR;
    }

  TIZ_TRACE (handleOf (p_prc), "%010lu: rc [%d] op_offset [%d]", serialno, rc,
             op_offset);

  return rc;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:60,代码来源:oggdmuxprc.c

示例5: obtain_audio_encoding_from_headers

static void
obtain_audio_encoding_from_headers (scloud_prc_t * ap_prc,
                                    const char * ap_header, const size_t a_size)
{
  assert (ap_prc);
  assert (ap_header);
  {
    const char * p_end = ap_header + a_size;
    const char * p_value = (const char *) memchr (ap_header, ':', a_size);
    char name[64];

    if (p_value && (size_t) (p_value - ap_header) < sizeof (name))
      {
        memcpy (name, ap_header, p_value - ap_header);
        name[p_value - ap_header] = 0;

        /* skip the colon */
        ++p_value;

        /* strip the value */
        while (p_value < p_end && !is_valid_character (*p_value))
          {
            ++p_value;
          }

        while (p_end > p_value && !is_valid_character (p_end[-1]))
          {
            --p_end;
          }

        {
          char * p_info = tiz_mem_calloc (1, (p_end - p_value) + 1);
          memcpy (p_info, p_value, p_end - p_value);
          p_info[(p_end - p_value)] = '\0';
          TIZ_TRACE (handleOf (ap_prc), "header name  : [%s]", name);
          TIZ_TRACE (handleOf (ap_prc), "header value : [%s]", p_info);

          if (strncasecmp (name, "Content-Type", 12) == 0)
            {
              obtain_coding_type (ap_prc, p_info);
              /* Now set the new coding type value on the output port */
              (void) set_audio_coding_on_port (ap_prc);
            }
          else if (strncasecmp (name, "Content-Length", 14) == 0)
            {
              obtain_content_length (ap_prc, p_info);
            }
          tiz_mem_free (p_info);
        }
      }
  }
}
开发者ID:tizonia,项目名称:tizonia-openmax-il,代码行数:52,代码来源:scloudprc.c

示例6: httpr_mp3port_SetConfig

static OMX_ERRORTYPE httpr_mp3port_SetConfig (const void *ap_obj,
                                              OMX_HANDLETYPE ap_hdl,
                                              OMX_INDEXTYPE a_index,
                                              OMX_PTR ap_struct)
{
  httpr_mp3port_t *p_obj = (httpr_mp3port_t *)ap_obj;
  OMX_ERRORTYPE rc = OMX_ErrorNone;

  TIZ_TRACE (ap_hdl, "[%s]...", tiz_idx_to_str (a_index));

  assert (NULL != p_obj);

  if (OMX_TizoniaIndexConfigIcecastMetadata == a_index)
    {
      OMX_TIZONIA_ICECASTMETADATATYPE *p_metadata
          = (OMX_TIZONIA_ICECASTMETADATATYPE *)ap_struct;
      OMX_U32 stream_title_len
          = strnlen ((char *)p_metadata->cStreamTitle,
                     OMX_TIZONIA_MAX_SHOUTCAST_METADATA_SIZE + 1);
      if (stream_title_len > OMX_TIZONIA_MAX_SHOUTCAST_METADATA_SIZE)
        {
          rc = OMX_ErrorBadParameter;
        }
      else
        {
          TIZ_TRACE (ap_hdl, "stream_title_len [%d] Stream title [%s]...",
                     stream_title_len, p_metadata->cStreamTitle);

          tiz_mem_free (p_obj->p_stream_title_);
          p_obj->p_stream_title_ = tiz_mem_calloc (1, stream_title_len + 1);
          if (NULL != p_obj->p_stream_title_)
            {
              strncpy (p_obj->p_stream_title_, (char *)p_metadata->cStreamTitle,
                       stream_title_len);
              p_obj->p_stream_title_[stream_title_len] = '\000';
            }

          TIZ_TRACE (ap_hdl, "stream_title_len [%d] Stream title [%s]...",
                     stream_title_len, p_obj->p_stream_title_);
        }
    }
  else
    {
      /* Delegate to the base port */
      rc = super_SetConfig (typeOf (ap_obj, "httprmp3port"), ap_obj, ap_hdl,
                            a_index, ap_struct);
    }

  return rc;
}
开发者ID:commshare,项目名称:tizonia-openmax-il,代码行数:50,代码来源:httprmp3port.c

示例7: sdlivr_proc_prepare_to_transfer

static OMX_ERRORTYPE
sdlivr_proc_prepare_to_transfer (void *ap_obj, OMX_U32 a_pid)
{
  sdlivr_prc_t *p_prc = ap_obj;
  OMX_ERRORTYPE rc = OMX_ErrorNone;
  OMX_PARAM_PORTDEFINITIONTYPE portdef;
  TIZ_INIT_OMX_PORT_STRUCT (portdef, ARATELIA_YUV_RENDERER_PORT_INDEX);

  TIZ_TRACE (handleOf (p_prc), "pid [%d]", a_pid);

  assert (NULL != p_prc);

  /* Retrieve port def from port */
  if (OMX_ErrorNone != (rc = tiz_api_GetParameter
                        (tiz_get_krn (handleOf (p_prc)),
                         handleOf (p_prc),
                         OMX_IndexParamPortDefinition, &portdef)))
    {
      TIZ_ERROR (handleOf (p_prc),
                 "[%s] : retrieving the port definition", tiz_err_to_str (rc));
      return rc;
    }

  p_prc->vportdef_ = portdef.format.video;

  TIZ_TRACE (handleOf (p_prc),
            "nFrameWidth = [%d] nFrameHeight = [%d] ",
            /*            "nStride = [%d] nSliceHeight = [%d] nBitrate = [%d] " */
            /*            "xFramerate = [%s] eCompressionFormat = [%d] eColorFormat = [%d]", */
            p_prc->vportdef_.nFrameWidth, p_prc->vportdef_.nFrameHeight);
  /*            p_prc->vportdef_.nStride, */
  /*            p_prc->vportdef_.nSliceHeight, */
  /*            p_prc->vportdef_.nBitrate, */
  /*            p_prc->vportdef_.xFramerate, */
  /*            p_prc->vportdef_.eCompressionFormat, */
  /*            p_prc->vportdef_.eColorFormat); */

  SDL_WM_SetCaption ("Tizonia OpenMAX IL YUV renderer", "YUV");


  p_prc->p_surface = SDL_SetVideoMode
    (p_prc->vportdef_.nFrameWidth, p_prc->vportdef_.nFrameHeight, 0,
     SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_RESIZABLE);

  p_prc->p_overlay = SDL_CreateYUVOverlay
    (p_prc->vportdef_.nFrameWidth, p_prc->vportdef_.nFrameHeight,
     SDL_YV12_OVERLAY, p_prc->p_surface);
  return OMX_ErrorNone;
}
开发者ID:commshare,项目名称:tizonia-openmax-il,代码行数:49,代码来源:sdlivrprc.c

示例8: store_data

static int
store_data (oggdmux_prc_t * ap_prc, const OMX_U32 a_pid, const OMX_U8 * ap_data,
            OMX_U32 a_nbytes)
{
  OMX_U8 ** pp_store = NULL;
  OMX_U32 * p_offset = NULL;
  OMX_U32 * p_size = NULL;
  OMX_U32 nbytes_to_copy = 0;
  OMX_U32 nbytes_avail = 0;

  assert (ap_prc);
  assert (a_pid <= ARATELIA_OGG_DEMUXER_VIDEO_PORT_BASE_INDEX);
  assert (ap_data);

  pp_store = get_store_ptr (ap_prc, a_pid);
  p_size = get_store_size_ptr (ap_prc, a_pid);
  p_offset = get_store_offset_ptr (ap_prc, a_pid);

  assert (pp_store && *pp_store);
  assert (p_size);
  assert (p_offset);

  nbytes_avail = *p_size - *p_offset;

  if (a_nbytes > nbytes_avail)
    {
      /* need to re-alloc */
      OMX_U8 * p_new_store = NULL;
      p_new_store = tiz_mem_realloc (*pp_store, *p_offset + a_nbytes);
      if (p_new_store)
        {
          *pp_store = p_new_store;
          *p_size = *p_offset + a_nbytes;
          nbytes_avail = *p_size - *p_offset;
          TIZ_TRACE (handleOf (ap_prc),
                     "pid [%d] : Realloc'd data store "
                     "to new size [%d]",
                     a_pid, *p_size);
        }
    }
  nbytes_to_copy = MIN (nbytes_avail, a_nbytes);
  memcpy (*pp_store + *p_offset, ap_data, nbytes_to_copy);
  *p_offset += nbytes_to_copy;

  TIZ_TRACE (handleOf (ap_prc), "pid [%d]: bytes currently stored [%d]", a_pid,
             *p_offset);

  return a_nbytes - nbytes_to_copy;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:49,代码来源:oggdmuxprc.c

示例9: flush_ogg_packet

static int
flush_ogg_packet (oggdmux_prc_t * ap_prc, const OMX_U32 a_pid,
                  const OMX_U8 * ap_ogg_data, const OMX_U32 nbytes)
{
  OMX_BUFFERHEADERTYPE * p_hdr = NULL;
  OMX_U32 nbytes_remaining = nbytes;
  OMX_U32 nbytes_copied = 0;
  OMX_U32 op_offset = 0;

  while ((p_hdr = get_header (ap_prc, a_pid)))
    {
      nbytes_copied = dump_ogg_data (ap_prc, a_pid, ap_ogg_data + op_offset,
                                     nbytes_remaining, p_hdr);
      nbytes_remaining -= nbytes_copied;
      op_offset += nbytes_copied;
#ifdef _DEBUG
      if (a_pid == ARATELIA_OGG_DEMUXER_AUDIO_PORT_BASE_INDEX)
        {
          g_total_released += p_hdr->nFilledLen;
          OMX_U32 * p_offset = get_store_offset_ptr (ap_prc, a_pid);
          TIZ_TRACE (handleOf (ap_prc),
                     "total released [%d] "
                     "total read [%d] store [%d] last read [%d] "
                     "remaining [%d] diff [%d]",
                     g_total_released, g_total_read, *p_offset, g_last_read,
                     nbytes_remaining,
                     g_total_read - (g_total_released + nbytes_remaining));
        }
#endif
      release_header (ap_prc, a_pid);
      p_hdr = 0;
      if (0 == nbytes_remaining)
        {
          break;
        }
    }

  if (nbytes_remaining > 0)
    {
      /* Need_more_buffers. Temporarily store the data until an omx buffer is
       * available */
      TIZ_TRACE (handleOf (ap_prc), "Need to store [%d] bytes - pid [%d]",
                 nbytes_remaining, a_pid);
      nbytes_remaining
        = store_data (ap_prc, a_pid, ap_ogg_data + op_offset, nbytes_remaining);
    }

  return nbytes_remaining;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:49,代码来源:oggdmuxprc.c

示例10: ivrport_check_tunnel_compat

static bool
ivrport_check_tunnel_compat (const void * ap_obj,
                             OMX_PARAM_PORTDEFINITIONTYPE * ap_this_def,
                             OMX_PARAM_PORTDEFINITIONTYPE * ap_other_def)
{
  tiz_port_t * p_obj = (tiz_port_t *) ap_obj;

  assert (ap_this_def);
  assert (ap_other_def);

  if (ap_other_def->eDomain != ap_this_def->eDomain)
    {
      TIZ_ERROR (
        handleOf (ap_obj),
        "PORT [%d] : Video domain not found, instead found domain [%d]",
        p_obj->pid_, ap_other_def->eDomain);
      return false;
    }

  /* TODO : Review these compatibility checks */

  TIZ_TRACE (handleOf (ap_obj), "PORT [%d] check_tunnel_compat [OK]",
             p_obj->pid_);

  return true;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:26,代码来源:tizivrport.c

示例11: buffer_needed

static OMX_BUFFERHEADERTYPE *
buffer_needed (void * ap_arg)
{
  httpr_prc_t * p_prc = ap_arg;
  OMX_BUFFERHEADERTYPE * p_hdr = NULL;
  assert (p_prc);

  if (!p_prc->port_disabled_)
    {
      if (!p_prc->p_inhdr_)
        {
          (void) tiz_krn_claim_buffer (tiz_get_krn (handleOf (p_prc)),
                                       ARATELIA_HTTP_RENDERER_PORT_INDEX, 0,
                                       &p_prc->p_inhdr_);
          if (p_prc->p_inhdr_)
            {
              TIZ_TRACE (handleOf (p_prc),
                         "Claimed HEADER [%p]...nFilledLen [%d]",
                         p_prc->p_inhdr_, p_prc->p_inhdr_->nFilledLen);
            }
        }
      p_hdr = p_prc->p_inhdr_;
    }

  /*   p_prc->awaiting_buffers_ = p_hdr ? false : true; */
  return p_hdr;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:27,代码来源:httprprc.c

示例12: oggdmux_prc_buffers_ready

static OMX_ERRORTYPE
oggdmux_prc_buffers_ready (const void * ap_obj)
{
  oggdmux_prc_t * p_prc = (oggdmux_prc_t *) ap_obj;
  OMX_ERRORTYPE rc = OMX_ErrorNone;
  assert (p_prc);
  TIZ_TRACE (handleOf (p_prc),
             "awaiting_buffers [%s] aud eos [%s] "
             "vid eos [%s]",
             p_prc->awaiting_buffers_ ? "YES" : "NO",
             p_prc->aud_eos_ ? "YES" : "NO", p_prc->vid_eos_ ? "YES" : "NO");

  if (p_prc->awaiting_buffers_ && (!p_prc->aud_eos_ || !p_prc->vid_eos_))
    {
      /* Make sure we have flushed the temp buffers before reading any more
       * data from file */
      if (flush_stores (p_prc) == 0)
        {
          p_prc->awaiting_buffers_ = true;
          rc = demux_file (p_prc);
        }
    }

  return rc;
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:25,代码来源:oggdmuxprc.c

示例13: oggdmux_prc_port_disable

static OMX_ERRORTYPE
oggdmux_prc_port_disable (const void * ap_obj, OMX_U32 a_pid)
{
  oggdmux_prc_t * p_prc = (oggdmux_prc_t *) ap_obj;
  bool * p_port_disabled = NULL;
  assert (p_prc);
  assert (a_pid <= ARATELIA_OGG_DEMUXER_VIDEO_PORT_BASE_INDEX);

  if (OMX_ALL == a_pid)
    {
      p_port_disabled = get_port_disabled_ptr (
        p_prc, ARATELIA_OGG_DEMUXER_AUDIO_PORT_BASE_INDEX);
      *p_port_disabled = true;
      p_port_disabled = get_port_disabled_ptr (
        p_prc, ARATELIA_OGG_DEMUXER_VIDEO_PORT_BASE_INDEX);
      *p_port_disabled = true;
    }
  else
    {
      p_port_disabled = get_port_disabled_ptr (p_prc, a_pid);
      *p_port_disabled = true;
    }

  /* Release any buffers held  */
  TIZ_TRACE (handleOf (p_prc), "port_disable");
  return release_all_buffers (p_prc, a_pid);
}
开发者ID:juanrubio,项目名称:tizonia-openmax-il,代码行数:27,代码来源:oggdmuxprc.c

示例14: sdlivr_proc_buffers_ready

static OMX_ERRORTYPE
sdlivr_proc_buffers_ready (const void *ap_obj)
{
  OMX_BUFFERHEADERTYPE *p_hdr = NULL;

  if (OMX_ErrorNone == tiz_krn_claim_buffer
      (tiz_get_krn (handleOf (ap_obj)), 0, 0, &p_hdr))
    {
      if (NULL != p_hdr)
        {
          tiz_check_omx_err (sdlivr_proc_render_buffer (ap_obj, p_hdr));
          if (p_hdr->nFlags & OMX_BUFFERFLAG_EOS)
            {
              TIZ_TRACE (handleOf (ap_obj),
                         "OMX_BUFFERFLAG_EOS in HEADER [%p]", p_hdr);
              tiz_srv_issue_event ((OMX_PTR) ap_obj,
                                   OMX_EventBufferFlag,
                                   0, p_hdr->nFlags, NULL);
            }
          tiz_check_omx_err
            (tiz_krn_release_buffer (tiz_get_krn (handleOf (ap_obj)), 0, p_hdr));
        }
    }

  return OMX_ErrorNone;
}
开发者ID:commshare,项目名称:tizonia-openmax-il,代码行数:26,代码来源:sdlivrprc.c

示例15: mp4_write_cback

static int
mp4_write_cback (void * handle, const void * buffer, int64_t size, int64_t * nout,
           int64_t maxChunkSize)
{
  TIZ_TRACE(handleOf(gp_prc), "");
  return 0;
}
开发者ID:tizonia,项目名称:tizonia-openmax-il,代码行数:7,代码来源:mp4dmuxfltprc.c


注:本文中的TIZ_TRACE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。