本文整理汇总了C++中TIZ_LOG函数的典型用法代码示例。如果您正苦于以下问题:C++ TIZ_LOG函数的具体用法?C++ TIZ_LOG怎么用?C++ TIZ_LOG使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TIZ_LOG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tiz_rcfile_destroy
void tiz_rcfile_destroy (tiz_rcfile_t *p_rc)
{
keyval_t *p_kv_lst = NULL;
keyval_t *p_kvt = NULL;
value_t *p_val_lst = NULL;
if (NULL == p_rc)
{
return;
}
p_kv_lst = p_rc->p_keyvals;
while (p_kv_lst)
{
value_t *p_vt = NULL;
TIZ_LOG (TIZ_PRIORITY_TRACE, "Deleting Key [%s]", p_kv_lst->p_key);
tiz_mem_free (p_kv_lst->p_key);
p_val_lst = p_kv_lst->p_value_list;
while (p_val_lst)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Deleting Val [%s]", p_val_lst->p_value);
p_vt = p_val_lst;
p_val_lst = p_val_lst->p_next;
tiz_mem_free (p_vt->p_value);
tiz_mem_free (p_vt);
}
p_kvt = p_kv_lst;
p_kv_lst = p_kv_lst->p_next;
tiz_mem_free (p_kvt);
}
tiz_mem_free (p_rc);
}
示例2: START_TEST
END_TEST
START_TEST (test_ilcore_init_and_deinit_get_hdl_free_hdl)
{
OMX_ERRORTYPE error = OMX_ErrorNone;
OMX_HANDLETYPE p_hdl = NULL;
OMX_U32 appData;
OMX_CALLBACKTYPE callBacks;
error = OMX_Init ();
fail_if (error != OMX_ErrorNone);
error = OMX_GetHandle (&p_hdl,
TIZ_CORE_TEST_COMPONENT_NAME,
(OMX_PTR *) (&appData), &callBacks);
TIZ_LOG (TIZ_PRIORITY_TRACE, "OMX_GetHandle error [%s]", tiz_err_to_str (error));
fail_if (error != OMX_ErrorNone);
TIZ_LOG (TIZ_PRIORITY_TRACE, "p_hdl [%p]", p_hdl);
error = OMX_FreeHandle (p_hdl);
fail_if (error != OMX_ErrorNone);
error = OMX_Deinit ();
fail_if (error != OMX_ErrorNone);
}
示例3: TIZ_LOG
OMX_ERRORTYPE
graph::gmusicops::set_channels_and_rate_on_decoder (
const OMX_U32 channels, const OMX_U32 sampling_rate)
{
const OMX_HANDLETYPE handle = handles_[1]; // decoder's handle
const OMX_U32 port_id = 0; // decoder's input port
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
// Retrieve the mp3 settings from the decoder component
TIZ_INIT_OMX_PORT_STRUCT (decoder_mp3type_, port_id);
tiz_check_omx (
OMX_GetParameter (handle, OMX_IndexParamAudioMp3, &decoder_mp3type_));
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
// Now assign the actual settings to the pcmtype structure
decoder_mp3type_.nChannels = channels;
decoder_mp3type_.nSampleRate = sampling_rate;
// Set the new mp3 settings
tiz_check_omx (
OMX_SetParameter (handle, OMX_IndexParamAudioMp3, &decoder_mp3type_));
TIZ_LOG (TIZ_PRIORITY_TRACE, "channels = [%d] sampling_rate = [%d]", channels,
sampling_rate);
return OMX_ErrorNone;
}
示例4: START_TEST
END_TEST
START_TEST (test_vector_push_back_vector)
{
OMX_U32 i = 0;
OMX_ERRORTYPE error = OMX_ErrorNone;
int *p_item = NULL;
tiz_vector_t *p_vector = NULL;
tiz_vector_t *p_vector2 = NULL;
TIZ_LOG (TIZ_PRIORITY_TRACE, "test_vector_push_back_vector");
error = tiz_vector_init (&p_vector, sizeof(int*));
error = tiz_vector_init (&p_vector2, sizeof(tiz_vector_t*));
fail_if (error != OMX_ErrorNone);
for (i = 0; i < 10; i++)
{
p_item = (int *) tiz_mem_alloc (sizeof (int));
fail_if (p_item == NULL);
*p_item = i;
error = tiz_vector_push_back (p_vector, &p_item);
fail_if (error != OMX_ErrorNone);
p_item = *(int **) tiz_vector_back (p_vector);
fail_if (*p_item != i);
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "vector length %d",
tiz_vector_length (p_vector));
fail_if (10 != tiz_vector_length (p_vector));
TIZ_LOG (TIZ_PRIORITY_TRACE, "pushing vector [%p] [%p]", p_vector, &p_vector);
tiz_vector_push_back (p_vector2, &p_vector);
p_vector = *(tiz_vector_t **) tiz_vector_back (p_vector2);
TIZ_LOG (TIZ_PRIORITY_TRACE, "received vector [%p] [%p] [%p]",
p_vector, &p_vector, *(tiz_vector_t **) p_vector);
for (i = 0; i < 10; i++)
{
fail_if (10 - i != tiz_vector_length (p_vector));
p_item = * (int **) tiz_vector_back (p_vector);
fail_if (*p_item != 10 - i - 1);
TIZ_LOG (TIZ_PRIORITY_TRACE, "received int [%d]", *p_item);
tiz_vector_pop_back (p_vector);
tiz_mem_free(p_item);
}
fail_if (0 != tiz_vector_length (p_vector));
tiz_vector_destroy (p_vector);
}
示例5: TIZ_LOG
void tiz::playlist::skip (const int jump)
{
const int list_size = uri_list_.size ();
TIZ_LOG (TIZ_PRIORITY_TRACE,
"jump [%d] current_index_ [%d]"
" loop_playback [%s]",
jump, current_index_, loop_playback_ ? "YES" : "NO");
current_index_ += jump;
if (loop_playback ())
{
if (current_index_ < 0)
{
current_index_ = list_size - abs (current_index_);
}
else if (current_index_ >= list_size)
{
current_index_ %= list_size;
}
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "jump [%d] new index [%d]... [%s]", jump,
current_index_, current_index_ < list_size && current_index_ >= 0
? uri_list_[current_index_].c_str ()
: "");
}
示例6: if
OMX_ERRORTYPE
graph::youtubeops::add_demuxer_to_component_list (
omx_comp_name_lst_t &comp_list, omx_comp_role_lst_t &role_list)
{
OMX_ERRORTYPE rc = OMX_ErrorFormatNotDetected;
if (OMX_AUDIO_CodingWEBM == container_)
{
comp_list.push_back ("OMX.Aratelia.container_demuxer.webm");
role_list.push_back ("container_demuxer.filter.webm");
rc = OMX_ErrorNone;
}
else if (OMX_AUDIO_CodingMP4 == container_)
{
// TODO
TIZ_LOG (TIZ_PRIORITY_ERROR,
"[OMX_ErrorFormatNotDetected] : Unhandled container format "
"[OMX_AUDIO_CodingMP4].");
}
else if (OMX_AUDIO_CodingOGA == container_)
{
// TODO
TIZ_LOG (TIZ_PRIORITY_ERROR,
"[OMX_ErrorFormatNotDetected] : Unhandled container format "
"[OMX_AUDIO_CodingOGA].");
}
else
{
TIZ_LOG (
TIZ_PRIORITY_ERROR,
"[OMX_ErrorFormatNotDetected] : Unhandled container format [%d]...",
container_);
}
return rc;
}
示例7: TIZ_LOG
bool tizrmdb::comp_provisioned_with_resid (const std::string &cname,
const unsigned int &rid) const
{
bool ret_val = false;
int rc = SQLITE_OK;
char query[255];
TIZ_LOG (TIZ_PRIORITY_TRACE,
"tizrmdb::comp_provisioned_with_resid : "
"'%s' : Checking component provisioning for "
"resource id [%d]",
cname.c_str (), rid);
snprintf (query, sizeof(query),
"select * from components where cname='%s' and resid=%d",
cname.c_str (), rid);
rc = run_query (query);
if (SQLITE_OK == rc && !vdata_.empty ())
{
ret_val = true;
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "'%s' : is [%s] with resource id [%d]",
cname.c_str (),
(true == ret_val ? "PROVISIONED" : "NOT PROVISIONED"), rid);
return ret_val;
}
示例8: open
tiz_rm_error_t tizrmdb::connect ()
{
tiz_rm_error_t ret_val = TIZ_RM_SUCCESS;
if (!dbname_.empty ())
{
int rc = open (dbname_.c_str ());
TIZ_LOG (TIZ_PRIORITY_TRACE, "Opening db [%s]", dbname_.c_str ());
if (rc != SQLITE_OK)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Could not open db [%s]",
dbname_.c_str ());
ret_val = TIZ_RM_DATABASE_OPEN_ERROR;
}
else
{
rc = reset_alloc_table ();
if (rc != SQLITE_OK)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Could not init db [%s]",
dbname_.c_str ());
ret_val = TIZ_RM_DATABASE_INIT_ERROR;
}
}
}
else
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Empty db name");
ret_val = TIZ_RM_DATABASE_OPEN_ERROR;
}
return ret_val;
}
示例9: sqlite3_exec
int tizrmdb::reset_alloc_table ()
{
int rc = SQLITE_OK;
char *p_errmsg;
// Drop allocation table
if (pdb_)
{
rc = sqlite3_exec (pdb_, TIZ_RM_DB_DROP_ALLOC_TABLE, NULL, NULL, &p_errmsg);
TIZ_LOG (TIZ_PRIORITY_TRACE, "Dropping allocation table...");
if (rc != SQLITE_OK)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Could not drop allocation table [%s]",
p_errmsg);
}
rc = sqlite3_exec (pdb_, TIZ_RM_DB_CREATE_ALLOC_TABLE, NULL, NULL,
&p_errmsg);
if (rc != SQLITE_OK)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Could not create allocation table [%s]",
p_errmsg);
return rc;
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "Created allocation table succesfully");
}
return rc;
}
示例10: ComponentRoleEnum
static OMX_ERRORTYPE
ComponentRoleEnum (OMX_HANDLETYPE ap_hdl, OMX_U8 * a_role, OMX_U32 a_index)
{
OMX_ERRORTYPE ret_val = OMX_ErrorNone;
TIZ_LOG (TIZ_PRIORITY_TRACE, "ComponentRoleEnum : a_index [%d]", a_index);
if (!a_role)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "ComponentRoleEnum: "
"NULL a_role pointer found.");
return OMX_ErrorBadParameter;
}
if (0 == a_index)
{
strcpy ((char *) a_role, TIZ_CORE_TEST_COMPONENT_ROLE);
ret_val = OMX_ErrorNone;
}
else
{
ret_val = OMX_ErrorNoMore;
}
return ret_val;
}
示例11: assert
static keyval_t *find_node (const tiz_rcfile_t *ap_rc, const char *key)
{
keyval_t *p_kvs = NULL;
assert (NULL != ap_rc);
assert (NULL != key);
p_kvs = ap_rc->p_keyvals;
TIZ_LOG (TIZ_PRIORITY_TRACE, "Looking for Key [%s]", key);
while (p_kvs && p_kvs->p_key)
{
/* TODO: strncmp here */
if (0 == strcmp (p_kvs->p_key, key))
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "Found Key [%s]", p_kvs->p_key);
return p_kvs;
}
p_kvs = p_kvs->p_next;
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "Key not found [%s] [%p]", key, p_kvs);
return NULL;
}
示例12: assert
bool graph::oggopusdecoder::dispatch_cmd (const tiz::graph::cmd *p_cmd)
{
assert (NULL != p_cmd);
if (!p_cmd->kill_thread ())
{
if (p_cmd->evt ().type () == typeid(tiz::graph::load_evt))
{
// Time to start the FSM
TIZ_LOG (TIZ_PRIORITY_NOTICE, "Starting [%s] fsm...",
get_graph_name ().c_str ());
fsm_.start ();
}
p_cmd->inject< fsm >(fsm_, tiz::graph::pstate);
// Check for internal errors produced during the processing of the last
// event. If any, inject an "internal" error event. This is fatal and shall
// terminate the state machine.
if (OMX_ErrorNone != p_ops_->internal_error ())
{
fsm_.process_event (tiz::graph::err_evt (p_ops_->internal_error (),
p_ops_->internal_error_msg ()));
}
if (fsm_.terminated_)
{
TIZ_LOG (TIZ_PRIORITY_NOTICE, "[%s] fsm terminated...",
get_graph_name ().c_str ());
}
}
return p_cmd->kill_thread ();
}
示例13: switch
OMX_ERRORTYPE
graph::youtubeops::get_channels_and_rate_from_decoder (
OMX_U32 &channels, OMX_U32 &sampling_rate, std::string &encoding_str) const
{
OMX_ERRORTYPE rc = OMX_ErrorNone;
const OMX_HANDLETYPE handle = handles_[2]; // decoder's handle
const OMX_U32 port_id = 1; // decoder's output port
switch (encoding_)
{
case OMX_AUDIO_CodingMP3:
{
encoding_str = "mp3";
}
break;
case OMX_AUDIO_CodingAAC:
{
encoding_str = "aac";
}
break;
case OMX_AUDIO_CodingVORBIS:
{
encoding_str = "vorbis";
}
break;
default:
{
if (OMX_AUDIO_CodingOPUS == encoding_)
{
encoding_str = "opus";
}
else if (OMX_AUDIO_CodingFLAC == encoding_)
{
encoding_str = "flac";
}
else
{
TIZ_LOG (
TIZ_PRIORITY_ERROR,
"[OMX_ErrorFormatNotDetected] : Unhandled encoding type [%d]...",
encoding_);
rc = OMX_ErrorFormatNotDetected;
}
}
break;
};
if (OMX_ErrorNone == rc)
{
rc = tiz::graph::util::
get_channels_and_rate_from_audio_port_v2< OMX_AUDIO_PARAM_PCMMODETYPE > (
handle, port_id, OMX_IndexParamAudioPcm, channels, sampling_rate);
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "outcome = [%s]", tiz_err_to_str (rc));
return rc;
}
示例14: refresh_rm_db
static bool
refresh_rm_db (void)
{
bool rv = false;
const char *p_rmdb_path = NULL;
const char *p_sqlite_path = NULL;
const char *p_init_path = NULL;
const char *p_rmd_path = NULL;
p_rmdb_path = tiz_rcfile_get_value("resource-management", "rmdb");
p_sqlite_path = tiz_rcfile_get_value("resource-management",
"rmdb.sqlite_script");
p_init_path = tiz_rcfile_get_value("resource-management",
"rmdb.init_script");
p_rmd_path = tiz_rcfile_get_value("resource-management", "rmd.path");
if (!p_rmdb_path || !p_sqlite_path || !p_init_path || !p_rmd_path)
{
TIZ_LOG(TIZ_PRIORITY_TRACE, "Test data not available...");
}
else
{
pg_rmd_path = strndup (p_rmd_path, PATH_MAX);
TIZ_LOG(TIZ_PRIORITY_TRACE, "RM daemon [%s] ...", pg_rmd_path);
/* Re-fresh the rm db */
size_t total_len = strlen (p_init_path)
+ strlen (p_sqlite_path)
+ strlen (p_rmdb_path) + 4;
char *p_cmd = tiz_mem_calloc (1, total_len);
if (p_cmd)
{
snprintf(p_cmd, total_len -1, "%s %s %s",
p_init_path, p_sqlite_path, p_rmdb_path);
if (-1 != system (p_cmd))
{
TIZ_LOG(TIZ_PRIORITY_TRACE, "Successfully run [%s] script...", p_cmd);
rv = true;
}
else
{
TIZ_LOG(TIZ_PRIORITY_TRACE,
"Error while executing db init shell script...");
}
tiz_mem_free (p_cmd);
}
}
return rv;
}
示例15: on_entry
void on_entry (Event const &evt, FSM &fsm)
{
TIZ_LOG (TIZ_PRIORITY_TRACE, "ack unload");
if (!fsm.terminated_)
{
if (fsm.pp_ops_ && *(fsm.pp_ops_))
{
(*(fsm.pp_ops_))->do_ack_unloaded ();
}
TIZ_LOG (TIZ_PRIORITY_TRACE, "terminating");
fsm.terminated_ = true;
}
}