本文整理汇总了C++中VCD_MSG_HIGH函数的典型用法代码示例。如果您正苦于以下问题:C++ VCD_MSG_HIGH函数的具体用法?C++ VCD_MSG_HIGH怎么用?C++ VCD_MSG_HIGH使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VCD_MSG_HIGH函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vcd_flush_cmn
static u32 vcd_flush_cmn(struct vcd_clnt_ctxt_type_t *p_cctxt, u32 n_mode)
{
u32 rc = VCD_S_SUCCESS;
VCD_MSG_LOW("vcd_flush_cmn in %d:", p_cctxt->clnt_state.e_state);
rc = vcd_flush_buffers(p_cctxt, n_mode);
VCD_FAILED_RETURN(rc, "Failed: vcd_flush_buffers");
if (p_cctxt->status.n_frame_submitted > 0) {
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_FLUSHING,
CLIENT_STATE_EVENT_NUMBER
(pf_flush));
} else {
VCD_MSG_HIGH("All buffers are flushed");
p_cctxt->status.n_flush_mode = n_mode;
vcd_send_flush_done(p_cctxt, VCD_S_SUCCESS);
}
return rc;
}
示例2: vcd_flush_cmn
static u32 vcd_flush_cmn(struct vcd_clnt_ctxt *cctxt, u32 mode)
{
u32 rc = VCD_S_SUCCESS;
VCD_MSG_LOW("vcd_flush_cmn in %d:", cctxt->clnt_state.state);
rc = vcd_flush_buffers(cctxt, mode);
VCD_FAILED_RETURN(rc, "Failed: vcd_flush_buffers");
if (cctxt->status.frame_submitted > 0) {
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_FLUSHING,
CLIENT_STATE_EVENT_NUMBER
(flush));
} else {
VCD_MSG_HIGH("All buffers are flushed");
cctxt->status.mask |= (mode & VCD_FLUSH_ALL);
vcd_send_flush_done(cctxt, VCD_S_SUCCESS);
}
return rc;
}
示例3: vcd_do_client_state_transition
void vcd_do_client_state_transition(struct vcd_clnt_ctxt *cctxt,
enum vcd_clnt_state_enum to_state, u32 ev_code)
{
struct vcd_clnt_state_ctxt *state_ctxt;
if (!cctxt || to_state >= VCD_CLIENT_STATE_MAX) {
VCD_MSG_ERROR("Bad parameters. cctxt=%p, to_state=%d",
cctxt, to_state);
}
if (!cctxt)
return;
state_ctxt = &cctxt->clnt_state;
if (state_ctxt->state) {
if (state_ctxt->state == to_state) {
VCD_MSG_HIGH("Client already in requested to_state=%d",
to_state);
return;
}
}
VCD_MSG_MED("vcd_do_client_state_transition: C%d -> C%d, for api %d",
(int)state_ctxt->state, (int)to_state, ev_code);
if (state_ctxt->state_table->exit)
state_ctxt->state_table->exit(cctxt, ev_code);
state_ctxt->state = to_state;
state_ctxt->state_table = vcd_clnt_state_table[to_state];
if (state_ctxt->state_table->entry)
state_ctxt->state_table->entry(cctxt, ev_code);
}
示例4: is_session_invalid
static int is_session_invalid(u32 decoding, u32 flags) {
int is_secure;
struct client_security_info sec_info;
int client_count = 0;
int secure_session_running = 0;
is_secure = (flags & VCD_CP_SESSION) ? 1:0;
client_count = vcd_get_clients_security_info(&sec_info);
secure_session_running = (sec_info.secure_enc > 0) ||
(sec_info.secure_dec > 0);
if (!decoding && is_secure) {
if ((sec_info.secure_dec > 1) ||
(sec_info.secure_enc)
) {
VCD_MSG_HIGH("SE-SE: FAILURE\n");
VCD_MSG_HIGH("S-S-SE: FAILURE\n");
return -EACCES;
}
} else if (!decoding && !is_secure) {
if (secure_session_running) {
VCD_MSG_HIGH("SD-NSE: FAILURE\n");
VCD_MSG_HIGH("SE-NSE: FAILURE\n");
return -EACCES;
}
} else if (decoding && is_secure) {
if (client_count > 0) {
VCD_MSG_HIGH("S/NS-SD: FAILURE\n");
if (sec_info.secure_enc > 0 ||
sec_info.non_secure_enc > 0) {
return -EAGAIN;
}
return -EACCES;
}
} else {
if (sec_info.secure_dec > 0) {
VCD_MSG_HIGH("SD-NSD: FAILURE\n");
return -EACCES;
}
}
return 0;
}
示例5: VCD_MSG_LOW
static void vcd_clnt_cb_in_flushing
(struct vcd_clnt_ctxt *cctxt,
u32 event,
u32 status,
void *payload, size_t sz, u32 *ddl_handle, void *const client_data) {
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
u32 rc = VCD_S_SUCCESS;
u32 frm_trans_end = false;
VCD_MSG_LOW("vcd_clnt_cb_in_flushing:");
if (cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
rc = vcd_handle_input_done(cctxt,
payload,
VCD_EVT_RESP_INPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done(cctxt,
payload,
VCD_EVT_RESP_OUTPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required_in_flushing(cctxt,
payload);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
rc = vcd_handle_ind_output_reconfig(cctxt,
payload, status);
if (!VCD_FAILED(rc)) {
frm_trans_end = true;
payload = NULL;
}
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(cctxt,
VCD_EVT_IND_HWERRFATAL, status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
dev_ctxt->command_continue = false;
break;
}
}
if (!VCD_FAILED(rc) && ((event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG))) {
if (payload &&
((struct ddl_frame_data_tag *)\
payload)->frm_trans_end) {
vcd_mark_frame_channel(cctxt->dev_ctxt);
frm_trans_end = true;
}
if (frm_trans_end && !cctxt->status.frame_submitted) {
VCD_MSG_HIGH
("All pending frames recvd from DDL");
if (cctxt->status.mask & VCD_FLUSH_INPUT)
vcd_flush_bframe_buffers(cctxt,
VCD_FLUSH_INPUT);
if (cctxt->status.mask & VCD_FLUSH_OUTPUT)
vcd_flush_output_buffers(cctxt);
vcd_send_flush_done(cctxt, VCD_S_SUCCESS);
vcd_release_interim_frame_channels(dev_ctxt);
VCD_MSG_HIGH("Flush complete");
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(clnt_cb));
}
}
}
示例6: VCD_MSG_LOW
static void vcd_dev_cb_in_initing
(struct vcd_drv_ctxt_type_t *p_drv_ctxt,
u32 event,
u32 status,
void *p_payload, u32 size, u32 *ddl_handle, void *const p_client_data)
{
struct vcd_dev_ctxt_type *p_dev_ctxt;
struct vcd_clnt_ctxt_type_t *p_client;
struct vcd_clnt_ctxt_type_t *p_tmp_client;
struct vcd_handle_container_type container;
u32 rc = VCD_S_SUCCESS;
u32 b_client_inited = FALSE;
u32 b_fail_all_open = FALSE;
VCD_MSG_LOW("vcd_dev_cb_in_initing:");
if (event != VCD_EVT_RESP_DEVICE_INIT) {
VCD_MSG_ERROR("vcd_dev_cb_in_initing: Unexpected event %d",
(int)event);
return;
}
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_ctxt->b_continue = FALSE;
if (VCD_FAILED(status)) {
vcd_handle_device_init_failed(p_drv_ctxt, status);
return;
}
vcd_do_device_state_transition(p_drv_ctxt,
VCD_DEVICE_STATE_READY,
DEVICE_STATE_EVENT_NUMBER(pf_open));
if (!p_dev_ctxt->p_cctxt_list_head) {
VCD_MSG_HIGH("All clients are closed");
p_dev_ctxt->e_pending_cmd = VCD_CMD_DEVICE_TERM;
return;
}
if (!p_dev_ctxt->n_ddl_cmd_ch_depth
|| !p_dev_ctxt->a_trans_tbl)
rc = vcd_setup_with_ddl_capabilities(p_dev_ctxt);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("rc = 0x%x: Failed vcd_setup_with_ddl_capabilities",
rc);
b_fail_all_open = TRUE;
}
p_client = p_dev_ctxt->p_cctxt_list_head;
while (p_client) {
if (!b_fail_all_open)
rc = vcd_init_client_context(p_client);
if (!VCD_FAILED(rc)) {
container.handle = (void *)p_client;
p_client->callback(VCD_EVT_RESP_OPEN,
VCD_S_SUCCESS,
&container,
sizeof(container),
container.handle,
p_client->p_client_data);
p_client = p_client->p_next;
b_client_inited = TRUE;
} else {
VCD_MSG_ERROR
("rc = 0x%x, Failed: vcd_init_client_context",
rc);
p_client->callback(VCD_EVT_RESP_OPEN,
rc,
NULL, 0, 0, p_client->p_client_data);
p_tmp_client = p_client;
p_client = p_client->p_next;
vcd_destroy_client_context(p_tmp_client);
}
}
if (!b_client_inited || b_fail_all_open) {
VCD_MSG_ERROR("All client open requests failed");
p_dev_ctxt->e_pending_cmd = VCD_CMD_DEVICE_TERM;
} else {
if (vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_DEV_INIT_END)) {
VCD_MSG_ERROR("VCD_EVT_PWR_DEV_INIT_END failed");
}
//.........这里部分代码省略.........
示例7: VCD_MSG_LOW
static void vcd_clnt_cb_in_flushing
(struct vcd_clnt_ctxt_type_t *p_cctxt,
u32 event,
u32 status,
void *p_payload, u32 size, u32 *ddl_handle, void *const p_client_data) {
struct vcd_dev_ctxt_type *p_dev_ctxt = p_cctxt->p_dev_ctxt;
u32 rc = VCD_S_SUCCESS;
u32 b_frm_trans_end = FALSE;
VCD_MSG_LOW("vcd_clnt_cb_in_flushing:");
if (p_cctxt->ddl_handle != ddl_handle) {
VCD_MSG_ERROR("ddl_handle mismatch");
return;
}
switch (event) {
case VCD_EVT_RESP_INPUT_DONE:
{
rc = vcd_handle_input_done(p_cctxt,
p_payload,
VCD_EVT_RESP_INPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done(p_cctxt,
p_payload,
VCD_EVT_RESP_OUTPUT_FLUSHED,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required_in_flushing(p_cctxt,
p_payload);
break;
}
case VCD_EVT_IND_OUTPUT_RECONFIG:
{
(void) vcd_handle_ind_output_reconfig(p_cctxt,
p_payload, status);
b_frm_trans_end = TRUE;
p_payload = NULL;
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(p_cctxt,
VCD_EVT_IND_HWERRFATAL, status);
break;
}
default:
{
VCD_MSG_ERROR
("Unexpected callback event=%d status=%d from DDL",
event, status);
p_dev_ctxt->b_continue = FALSE;
break;
}
}
if (!VCD_FAILED(rc) && ((event == VCD_EVT_RESP_INPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_DONE ||
event == VCD_EVT_RESP_OUTPUT_REQ ||
event == VCD_EVT_IND_OUTPUT_RECONFIG))) {
if (p_payload &&
((struct ddl_frame_data_type_tag *)\
p_payload)->b_frm_trans_end) {
vcd_mark_frame_channel(p_cctxt->p_dev_ctxt);
b_frm_trans_end = TRUE;
}
if (b_frm_trans_end && !p_cctxt->status.n_frame_submitted) {
VCD_MSG_HIGH
("All pending frames recvd from DDL");
if (p_cctxt->status.
n_flush_mode & VCD_FLUSH_OUTPUT) {
vcd_flush_output_buffers(p_cctxt);
vcd_release_all_clnt_frm_transc
(p_cctxt);
}
vcd_send_flush_done(p_cctxt, VCD_S_SUCCESS);
vcd_release_interim_frame_channels(p_dev_ctxt);
VCD_MSG_HIGH("Flush complete");
vcd_release_all_clnt_def_frm_transc(p_cctxt);
//.........这里部分代码省略.........
示例8: vcd_continue
void vcd_continue(void)
{
struct vcd_drv_ctxt_type_t *p_drv_ctxt;
struct vcd_dev_ctxt_type *p_dev_ctxt;
u32 b_continue;
struct vcd_transc_type *p_transc;
u32 rc;
VCD_MSG_LOW("vcd_continue:");
p_drv_ctxt = vcd_get_drv_context();
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_ctxt->b_continue = FALSE;
if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_INIT) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_INIT is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_init_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_open));
} else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_TERM) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_TERM is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_deinit_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_close));
} else if (p_dev_ctxt->e_pending_cmd == VCD_CMD_DEVICE_RESET) {
VCD_MSG_HIGH("VCD_CMD_DEVICE_RESET is pending");
p_dev_ctxt->e_pending_cmd = VCD_CMD_NONE;
(void)vcd_reset_device_context(p_drv_ctxt,
DEVICE_STATE_EVENT_NUMBER(pf_dev_cb));
} else {
if (p_dev_ctxt->b_set_perf_lvl_pending) {
rc = vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_DEV_SET_PERFLVL);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("VCD_EVT_PWR_CLNT_SET_PERFLVL failed");
VCD_MSG_HIGH
("Not running at desired perf level."
"curr=%d, reqd=%d",
p_dev_ctxt->n_curr_perf_lvl,
p_dev_ctxt->n_reqd_perf_lvl);
} else {
p_dev_ctxt->b_set_perf_lvl_pending = FALSE;
}
}
do {
b_continue = FALSE;
if (vcd_get_command_channel_in_loop
(p_dev_ctxt, &p_transc)) {
if (vcd_submit_command_in_continue(p_dev_ctxt,
p_transc))
b_continue = TRUE;
else {
VCD_MSG_MED
("No more commands to submit");
vcd_release_command_channel(p_dev_ctxt,
p_transc);
vcd_release_interim_command_channels
(p_dev_ctxt);
}
}
} while (b_continue);
do {
b_continue = FALSE;
if (vcd_get_frame_channel_in_loop
(p_dev_ctxt, &p_transc)) {
if (vcd_try_submit_frame_in_continue(p_dev_ctxt,
p_transc)) {
b_continue = TRUE;
} else {
VCD_MSG_MED("No more frames to submit");
vcd_release_frame_channel(p_dev_ctxt,
p_transc);
vcd_release_interim_frame_channels
(p_dev_ctxt);
}
}
} while (b_continue);
if (!vcd_core_is_busy(p_dev_ctxt)) {
rc = vcd_power_event(p_dev_ctxt, NULL,
VCD_EVT_PWR_CLNT_CMD_END);
if (VCD_FAILED(rc))
VCD_MSG_ERROR("Failed:"
"VCD_EVT_PWR_CLNT_CMD_END");
//.........这里部分代码省略.........
示例9: vcd_ddl_callback
void vcd_ddl_callback(u32 event, u32 status, void *p_payload,
u32 n_size, u32 *ddl_handle, void *const p_client_data)
{
struct vcd_drv_ctxt_type_t *p_drv_ctxt;
struct vcd_dev_ctxt_type *p_dev_ctxt;
struct vcd_dev_state_ctxt_type_t *p_dev_state;
struct vcd_clnt_ctxt_type_t *p_cctxt;
struct vcd_transc_type *p_transc;
VCD_MSG_LOW("vcd_ddl_callback:");
VCD_MSG_LOW("event=0x%x status=0x%x", event, status);
p_drv_ctxt = vcd_get_drv_context();
p_dev_ctxt = &p_drv_ctxt->dev_ctxt;
p_dev_state = &p_drv_ctxt->dev_state;
p_dev_ctxt->b_continue = TRUE;
vcd_device_timer_stop(p_dev_ctxt);
switch (p_dev_state->e_state) {
case VCD_DEVICE_STATE_NULL:
{
VCD_MSG_HIGH("Callback unexpected in NULL state");
break;
}
case VCD_DEVICE_STATE_NOT_INIT:
{
VCD_MSG_HIGH("Callback unexpected in NOT_INIT state");
break;
}
case VCD_DEVICE_STATE_INITING:
{
if (p_dev_state->p_state_table->ev_hdlr.pf_dev_cb) {
p_dev_state->p_state_table->ev_hdlr.
pf_dev_cb(p_drv_ctxt, event, status,
p_payload, n_size, ddl_handle,
p_client_data);
} else {
VCD_MSG_HIGH("No device handler in %d state",
p_dev_state->e_state);
}
break;
}
case VCD_DEVICE_STATE_READY:
{
p_transc = (struct vcd_transc_type *)p_client_data;
if (!p_transc || !p_transc->b_in_use
|| !p_transc->p_cctxt) {
VCD_MSG_ERROR("Invalid clientdata "
"received from DDL ");
} else {
p_cctxt = p_transc->p_cctxt;
if (p_cctxt->clnt_state.p_state_table->ev_hdlr.
pf_clnt_cb) {
p_cctxt->clnt_state.p_state_table->
ev_hdlr.pf_clnt_cb(p_cctxt,
event, status, p_payload,
n_size, ddl_handle,
p_client_data);
} else {
VCD_MSG_HIGH
("No client handler in"
" (dsm:READY, csm:%d) state",
(int)p_cctxt->clnt_state.e_state);
if (VCD_FAILED(status)) {
VCD_MSG_FATAL("DDL callback"
" returned failure 0x%x",
status);
}
}
}
break;
}
default:
{
VCD_MSG_ERROR("Unknown state");
break;
}
}
}