本文整理汇总了C++中CLIENT_STATE_EVENT_NUMBER函数的典型用法代码示例。如果您正苦于以下问题:C++ CLIENT_STATE_EVENT_NUMBER函数的具体用法?C++ CLIENT_STATE_EVENT_NUMBER怎么用?C++ CLIENT_STATE_EVENT_NUMBER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CLIENT_STATE_EVENT_NUMBER函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: vcd_pause_in_run
static u32 vcd_pause_in_run(struct vcd_clnt_ctxt_type_t *p_cctxt)
{
u32 rc = VCD_S_SUCCESS;
VCD_MSG_LOW("vcd_pause_in_run:");
if (p_cctxt->b_sched_clnt_valid) {
rc = vcd_map_sched_status(sched_suspend_resume_client
(p_cctxt->p_dev_ctxt->sched_hdl,
p_cctxt->sched_clnt_hdl, FALSE));
}
VCD_FAILED_RETURN(rc, "Failed: sched_suspend_resume_client");
if (p_cctxt->status.n_frame_submitted > 0) {
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_PAUSING,
CLIENT_STATE_EVENT_NUMBER
(pf_pause));
} else {
VCD_MSG_HIGH("No client frames are currently being processed");
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_PAUSED,
CLIENT_STATE_EVENT_NUMBER
(pf_pause));
p_cctxt->callback(VCD_EVT_RESP_PAUSE,
VCD_S_SUCCESS,
NULL, 0, p_cctxt, p_cctxt->p_client_data);
rc = vcd_power_event(p_cctxt->p_dev_ctxt, p_cctxt,
VCD_EVT_PWR_CLNT_PAUSE);
if (VCD_FAILED(rc))
VCD_MSG_ERROR("VCD_EVT_PWR_CLNT_PAUSE_END failed");
}
return VCD_S_SUCCESS;
}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:42,代码来源:vcd_client_sm.c
示例2: vcd_resume_in_paused
static u32 vcd_resume_in_paused(struct vcd_clnt_ctxt *cctxt)
{
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
u32 rc = VCD_S_SUCCESS;
VCD_MSG_LOW("vcd_resume_in_paused:");
if (cctxt->sched_clnt_hdl) {
rc = vcd_power_event(cctxt->dev_ctxt,
cctxt, VCD_EVT_PWR_CLNT_RESUME);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR("VCD_EVT_PWR_CLNT_RESUME failed");
} else {
rc = vcd_sched_suspend_resume_clnt(cctxt, true);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("rc = 0x%x. Failed: "
"vcd_sched_suspend_resume_clnt",
rc);
}
}
if (!VCD_FAILED(rc)) {
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(resume));
vcd_try_submit_frame(dev_ctxt);
}
} else {
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(resume));
}
return rc;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:40,代码来源:vcd_client_sm.c
示例3: vcd_stop_cmn
static u32 vcd_stop_cmn(struct vcd_clnt_ctxt *cctxt)
{
struct vcd_dev_ctxt *dev_ctxt = cctxt->dev_ctxt;
u32 rc = VCD_S_SUCCESS;
struct vcd_transc *transc;
VCD_MSG_LOW("vcd_stop_cmn in %d:", cctxt->clnt_state.state);
rc = vcd_flush_buffers(cctxt, VCD_FLUSH_ALL);
VCD_FAILED_RETURN(rc, "Failed: vcd_flush_buffers");
if (!cctxt->status.frame_submitted) {
if (vcd_get_command_channel(dev_ctxt, &transc)) {
rc = vcd_power_event(dev_ctxt, cctxt,
VCD_EVT_PWR_CLNT_CMD_BEGIN);
if (!VCD_FAILED(rc)) {
transc->type = VCD_CMD_CODEC_STOP;
transc->cctxt = cctxt;
rc = vcd_submit_cmd_sess_end(transc);
} else {
VCD_MSG_ERROR("Failed:"
" VCD_EVT_PWR_CLNT_CMD_BEGIN");
}
if (VCD_FAILED(rc)) {
vcd_release_command_channel(dev_ctxt,
transc);
}
} else {
vcd_client_cmd_flush_and_en_q(cctxt,
VCD_CMD_CODEC_STOP);
}
}
if (VCD_FAILED(rc)) {
(void)vcd_power_event(dev_ctxt, cctxt,
VCD_EVT_PWR_CLNT_CMD_FAIL);
} else {
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_STOPPING,
CLIENT_STATE_EVENT_NUMBER
(stop));
}
return rc;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:51,代码来源:vcd_client_sm.c
示例4: vcd_encode_start_in_open
static u32 vcd_encode_start_in_open(struct vcd_clnt_ctxt_type_t *p_cctxt)
{
u32 rc = VCD_S_SUCCESS;
struct vcd_property_hdr_type prop_hdr;
struct vcd_property_vop_timing_type timing;
VCD_MSG_LOW("vcd_encode_start_in_open:");
if (p_cctxt->b_decoding) {
VCD_MSG_ERROR("vcd_encode_init for decoder client");
return VCD_ERR_ILLEGAL_OP;
}
if (!p_cctxt->in_buf_pool.a_entries ||
!p_cctxt->out_buf_pool.a_entries ||
p_cctxt->in_buf_pool.n_validated != p_cctxt->in_buf_pool.n_count ||
p_cctxt->out_buf_pool.n_validated !=
p_cctxt->out_buf_pool.n_count) {
VCD_MSG_ERROR("Buffer pool is not completely setup yet");
return VCD_ERR_BAD_STATE;
}
rc = vcd_sched_add_client(p_cctxt);
VCD_FAILED_RETURN(rc, "Failed: vcd_sched_add_client");
prop_hdr.prop_id = VCD_I_VOP_TIMING;
prop_hdr.n_size = sizeof(struct vcd_property_vop_timing_type);
rc = ddl_get_property(p_cctxt->ddl_handle, &prop_hdr, &timing);
VCD_FAILED_RETURN(rc, "Failed: Get VCD_I_VOP_TIMING");
if (!timing.n_vop_time_resolution) {
VCD_MSG_ERROR("Vop_time_resolution value is zero");
return VCD_ERR_FAIL;
}
p_cctxt->n_time_resoln = timing.n_vop_time_resolution;
rc = vcd_process_cmd_sess_start(p_cctxt);
if (!VCD_FAILED(rc)) {
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_STARTING,
CLIENT_STATE_EVENT_NUMBER
(pf_encode_start));
}
return rc;
}
开发者ID:Anteus,项目名称:kernel_u8800,代码行数:50,代码来源:vcd_client_sm.c
示例5: vcd_encode_start_in_open
static u32 vcd_encode_start_in_open(struct vcd_clnt_ctxt *cctxt)
{
u32 rc = VCD_S_SUCCESS;
struct vcd_property_hdr prop_hdr;
struct vcd_property_vop_timing timing;
VCD_MSG_LOW("vcd_encode_start_in_open:");
if (cctxt->decoding) {
VCD_MSG_ERROR("vcd_encode_init for decoder client");
return VCD_ERR_ILLEGAL_OP;
}
if ((!cctxt->meta_mode && !cctxt->in_buf_pool.entries) ||
!cctxt->out_buf_pool.entries ||
(!cctxt->meta_mode &&
cctxt->in_buf_pool.validated != cctxt->in_buf_pool.count) ||
cctxt->out_buf_pool.validated !=
cctxt->out_buf_pool.count) {
VCD_MSG_HIGH("%s: Buffer pool is not completely setup yet",
__func__);
}
rc = vcd_sched_add_client(cctxt);
VCD_FAILED_RETURN(rc, "Failed: vcd_sched_add_client");
prop_hdr.prop_id = VCD_I_VOP_TIMING;
prop_hdr.sz = sizeof(struct vcd_property_vop_timing);
rc = ddl_get_property(cctxt->ddl_handle, &prop_hdr, &timing);
VCD_FAILED_RETURN(rc, "Failed: Get VCD_I_VOP_TIMING");
if (!timing.vop_time_resolution) {
VCD_MSG_ERROR("Vop_time_resolution value is zero");
return VCD_ERR_FAIL;
}
cctxt->time_resoln = timing.vop_time_resolution;
rc = vcd_process_cmd_sess_start(cctxt);
if (!VCD_FAILED(rc)) {
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_STARTING,
CLIENT_STATE_EVENT_NUMBER
(encode_start));
}
return rc;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:49,代码来源:vcd_client_sm.c
示例6: VCD_MSG_LOW
static u32 vcd_fill_output_buffer_in_eos
(struct vcd_clnt_ctxt_type_t *p_cctxt,
struct vcd_frame_data_type *p_buffer)
{
u32 rc = VCD_S_SUCCESS;
struct vcd_buffer_entry_type *p_buf_entry;
VCD_MSG_LOW("vcd_fill_output_buffer_in_eos:");
p_buf_entry = vcd_check_fill_output_buffer(p_cctxt, p_buffer);
if (!p_buf_entry)
return VCD_ERR_BAD_POINTER;
if (p_cctxt->status.b_eos_wait_for_op_buf) {
VCD_MSG_HIGH("Got an output buffer we were waiting for");
p_buf_entry->frame = *p_buffer;
p_buf_entry->frame.n_data_len = 0;
p_buf_entry->frame.n_flags |= VCD_FRAME_FLAG_EOS;
p_buf_entry->frame.n_ip_frm_tag =
p_cctxt->status.eos_trig_ip_frm.n_ip_frm_tag;
p_buf_entry->frame.time_stamp =
p_cctxt->status.eos_trig_ip_frm.time_stamp;
p_cctxt->callback(VCD_EVT_RESP_OUTPUT_DONE,
VCD_S_SUCCESS,
&p_buf_entry->frame,
sizeof(struct vcd_frame_data_type),
p_cctxt, p_cctxt->p_client_data);
p_cctxt->status.b_eos_wait_for_op_buf = FALSE;
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(pf_fill_output_buffer));
} else {
rc = vcd_fill_output_buffer_cmn(p_cctxt, p_buffer);
}
return rc;
}
开发者ID:Anteus,项目名称:kernel_u8800,代码行数:44,代码来源:vcd_client_sm.c
示例7: VCD_MSG_LOW
static u32 vcd_fill_output_buffer_in_eos
(struct vcd_clnt_ctxt *cctxt,
struct vcd_frame_data *buffer)
{
u32 rc = VCD_S_SUCCESS;
struct vcd_buffer_entry *buf_entry;
VCD_MSG_LOW("vcd_fill_output_buffer_in_eos:");
buf_entry = vcd_check_fill_output_buffer(cctxt, buffer);
if (!buf_entry)
return VCD_ERR_BAD_POINTER;
if (cctxt->status.mask & VCD_EOS_WAIT_OP_BUF) {
VCD_MSG_HIGH("Got an output buffer we were waiting for");
buf_entry->frame = *buffer;
buf_entry->frame.data_len = 0;
buf_entry->frame.flags |= VCD_FRAME_FLAG_EOS;
buf_entry->frame.ip_frm_tag =
cctxt->status.eos_trig_ip_frm.ip_frm_tag;
buf_entry->frame.time_stamp =
cctxt->status.eos_trig_ip_frm.time_stamp;
cctxt->callback(VCD_EVT_RESP_OUTPUT_DONE,
VCD_S_SUCCESS,
&buf_entry->frame,
sizeof(struct vcd_frame_data),
cctxt, cctxt->client_data);
cctxt->status.mask &= ~VCD_EOS_WAIT_OP_BUF;
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(fill_output_buffer));
} else {
rc = vcd_fill_output_buffer_cmn(cctxt, buffer);
}
return rc;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:44,代码来源:vcd_client_sm.c
示例8: vcd_resume_in_paused
static u32 vcd_resume_in_paused(struct vcd_clnt_ctxt_type_t *p_cctxt)
{
struct vcd_dev_ctxt_type *p_dev_ctxt = p_cctxt->p_dev_ctxt;
u32 rc = VCD_S_SUCCESS;
VCD_MSG_LOW("vcd_resume_in_paused:");
if (p_cctxt->b_sched_clnt_valid) {
rc = vcd_power_event(p_cctxt->p_dev_ctxt,
p_cctxt, VCD_EVT_PWR_CLNT_RESUME);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR("VCD_EVT_PWR_CLNT_RESUME failed");
} else {
rc = vcd_map_sched_status(sched_suspend_resume_client
(p_cctxt->p_dev_ctxt->
sched_hdl,
p_cctxt->sched_clnt_hdl,
TRUE));
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("rc = 0x%x. Failed: "
"sched_suspend_resume_client",
rc);
}
}
if (!VCD_FAILED(rc))
vcd_try_submit_frame(p_dev_ctxt);
}
if (!VCD_FAILED(rc)) {
vcd_do_client_state_transition(p_cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(pf_resume));
}
return rc;
}
开发者ID:lehmanju,项目名称:android_kernel_huawei_u8500,代码行数:42,代码来源:vcd_client_sm.c
示例9: 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;
}
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:23,代码来源:vcd_client_sm.c
示例10: 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;
}
开发者ID:Anteus,项目名称:kernel_u8800,代码行数:23,代码来源:vcd_client_sm.c
示例11: VCD_MSG_ERROR
static void vcd_clnt_cb_in_eos
(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;
struct vcd_transc *transc = NULL;
u32 frm_trans_end = false, rc = VCD_S_SUCCESS;
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_in_eos(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_DONE:
{
rc = vcd_handle_frame_done_in_eos(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_OUTPUT_REQ:
{
rc = vcd_handle_output_required(cctxt, payload,
status);
break;
}
case VCD_EVT_RESP_EOS_DONE:
{
transc = (struct vcd_transc *)client_data;
vcd_handle_eos_done(cctxt, transc, status);
vcd_mark_frame_channel(cctxt->dev_ctxt);
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;
vcd_do_client_state_transition(cctxt,
VCD_CLIENT_STATE_RUN,
CLIENT_STATE_EVENT_NUMBER
(clnt_cb));
VCD_MSG_LOW
("RECONFIGinEOS:Suspending Client");
rc = vcd_sched_suspend_resume_clnt(cctxt,
false);
if (VCD_FAILED(rc)) {
VCD_MSG_ERROR
("Failed: suspend_resume_clnt. rc=0x%x",
rc);
}
}
break;
}
case VCD_EVT_IND_HWERRFATAL:
{
vcd_handle_ind_hw_err_fatal(cctxt,
VCD_EVT_IND_HWERRFATAL, status);
break;
}
case VCD_EVT_IND_INFO_OUTPUT_RECONFIG:
{
vcd_handle_ind_info_output_reconfig(cctxt, 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;
}
//.........这里部分代码省略.........
开发者ID:Snuzzo,项目名称:funky_msm8960,代码行数:101,代码来源:vcd_client_sm.c
注:本文中的CLIENT_STATE_EVENT_NUMBER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论