本文整理汇总了C++中DDLCLIENT_STATE_IS函数的典型用法代码示例。如果您正苦于以下问题:C++ DDLCLIENT_STATE_IS函数的具体用法?C++ DDLCLIENT_STATE_IS怎么用?C++ DDLCLIENT_STATE_IS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DDLCLIENT_STATE_IS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ddl_eos_frame_done_callback
static u32 ddl_eos_frame_done_callback(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
struct ddl_decoder_data *decoder = &(ddl->codec_data.decoder);
struct vidc_720p_dec_disp_info *dec_disp_info =
&(decoder->dec_disp_info);
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_EOS_DONE)) {
VIDC_LOGERR_STRING("STATE-CRITICAL-EOSFRMRUN");
ddl_client_fatal_cb(ddl_context);
return true;
}
VIDC_LOG_STRING("EOS_FRM_RUN_DONE");
ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
vidc_720p_decode_display_info(dec_disp_info);
ddl_decode_dynamic_property(ddl, false);
if (dec_disp_info->disp_status == VIDC_720P_DISPLAY_ONLY) {
if (ddl_decoder_output_done_callback(ddl, false)
!= VCD_S_SUCCESS)
return true;
} else
VIDC_LOG_STRING("STATE-CRITICAL-WRONG-DISP-STATUS");
ddl_decoder_dpb_transact(decoder, NULL, DDL_DPB_OP_SET_MASK);
ddl_move_command_state(ddl_context, DDL_CMD_EOS);
vidc_720p_submit_command(ddl->channel_id,
VIDC_720P_CMD_FRAMERUN);
return false;
}
示例2: ddl_handle_seqhdr_fail_error
u32 ddl_handle_seqhdr_fail_error(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
struct ddl_decoder_data *decoder = &ddl->codec_data.decoder;
u32 status = false;
if (ddl_context->cmd_state == DDL_CMD_HEADER_PARSE &&
DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_INITCODECDONE)) {
switch (ddl_context->cmd_err_status) {
case UNSUPPORTED_FEATURE_IN_PROFILE:
case HEADER_NOT_FOUND:
case INVALID_SPS_ID:
case INVALID_PPS_ID:
case RESOLUTION_NOT_SUPPORTED:
ERR("SEQ-HDR-FAILED!!!");
if ((ddl_context->cmd_err_status ==
RESOLUTION_NOT_SUPPORTED) &&
(decoder->codec.codec == VCD_CODEC_H264 ||
decoder->codec.codec == VCD_CODEC_H263 ||
decoder->codec.codec == VCD_CODEC_MPEG4 ||
decoder->codec.codec == VCD_CODEC_VC1_RCV ||
decoder->codec.codec == VCD_CODEC_VC1)) {
ddl_client_fatal_cb(ddl_context);
status = true;
break;
}
if (decoder->header_in_start) {
decoder->header_in_start = false;
ddl_context->ddl_callback(VCD_EVT_RESP_START,
VCD_ERR_SEQHDR_PARSE_FAIL,
NULL, 0, (void *)ddl,
ddl_context->client_data);
} else {
if (ddl->input_frame.vcd_frm.flags &
VCD_FRAME_FLAG_EOS)
ddl->input_frame.frm_trans_end = false;
else
ddl->input_frame.frm_trans_end = true;
ddl_decode_dynamic_property(ddl, false);
ddl_context->ddl_callback(
VCD_EVT_RESP_INPUT_DONE,
VCD_ERR_SEQHDR_PARSE_FAIL,
&ddl->input_frame,
sizeof(struct ddl_frame_data_tag),
(void *)ddl, ddl_context->client_data);
if (ddl->input_frame.vcd_frm.flags &
VCD_FRAME_FLAG_EOS)
ddl_context->ddl_callback(
VCD_EVT_RESP_EOS_DONE,
VCD_S_SUCCESS, NULL,
0, (void *)ddl,
ddl_context->client_data);
}
ddl_move_client_state(ddl,
DDL_CLIENT_WAIT_FOR_INITCODEC);
DDL_IDLE(ddl_context);
status = true;
}
}
return status;
}
示例3: ddl_eos_frame_done_callback
static u32 ddl_eos_frame_done_callback(
struct ddl_client_context *ddl)
{
struct ddl_context *ddl_context = ddl->ddl_context;
struct ddl_decoder_data *decoder = &ddl->codec_data.decoder;
struct ddl_mask *dpb_mask = &decoder->dpb_mask;
u32 ret_status = true, rsl_chg;
enum vidc_1080p_display_status disp_status;
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_EOS_DONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-EOSFRMRUN");
ddl_client_fatal_cb(ddl);
} else {
DDL_MSG_LOW("EOS_FRM_RUN_DONE");
ddl->cmd_state = DDL_CMD_INVALID;
get_dec_status(&ddl->codec_data.decoder.dec_disp_info,
ddl->codec_data.decoder.output_order,
&disp_status, &rsl_chg);
ddl_vidc_decode_dynamic_property(ddl, false);
if (disp_status ==
VIDC_1080P_DISPLAY_STATUS_DPB_EMPTY) {
ddl_decoder_eos_done_callback(ddl);
} else {
struct vidc_1080p_dec_frame_start_param dec_param;
ret_status = false;
if (disp_status ==
VIDC_1080P_DISPLAY_STATUS_DISPLAY_ONLY) {
if (ddl_decoder_output_done_callback(
ddl, false))
ret_status = true;
} else if (disp_status !=
VIDC_1080P_DISPLAY_STATUS_NOOP)
DDL_MSG_ERROR("EOS-STATE-CRITICAL-"
"WRONG-DISP-STATUS");
if (!ret_status) {
ddl_decoder_dpb_transact(decoder, NULL,
DDL_DPB_OP_SET_MASK);
ddl->cmd_state = DDL_CMD_EOS;
memset(&dec_param, 0, sizeof(dec_param));
dec_param.cmd_seq_num =
++ddl_context->cmd_seq_num;
dec_param.inst_id = ddl->instance_id;
dec_param.shared_mem_addr_offset =
DDL_ADDR_OFFSET(
ddl_context->dram_base_a,
ddl->shared_mem[ddl->command_channel]);
dec_param.release_dpb_bit_mask =
dpb_mask->hw_mask;
dec_param.decode =
VIDC_1080P_DEC_TYPE_LAST_FRAME_DATA;
ddl_context->vidc_decode_frame_start[ddl->\
command_channel](&dec_param);
}
}
}
return ret_status;
}
示例4: ddl_encoder_seq_done_callback
static u32 ddl_encoder_seq_done_callback(struct ddl_context_type *p_ddl_context,
struct ddl_client_context_type *p_ddl)
{
struct ddl_encoder_data_type *p_encoder;
DDL_MSG_MED("ddl_encoder_seq_done_callback");
if (!DDLCLIENT_STATE_IS(p_ddl, DDL_CLIENT_WAIT_FOR_INITCODECDONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-INITCODEC");
ddl_client_fatal_cb(p_ddl);
return TRUE;
}
p_ddl->e_cmd_state = DDL_CMD_INVALID;
DDL_MSG_LOW("ddl_state_transition: %s ~~> DDL_CLIENT_WAIT_FOR_FRAME",
ddl_get_state_string(p_ddl->e_client_state));
p_ddl->e_client_state = DDL_CLIENT_WAIT_FOR_FRAME;
DDL_MSG_LOW("INIT_CODEC_DONE");
p_encoder = &p_ddl->codec_data.encoder;
vidc_1080p_get_encoder_sequence_header_size(
&p_encoder->n_seq_header_length);
p_ddl_context->ddl_callback(VCD_EVT_RESP_START, VCD_S_SUCCESS,
NULL, 0, (u32 *) p_ddl, p_ddl->p_client_data);
ddl_release_command_channel(p_ddl_context,
p_ddl->n_command_channel);
return TRUE;
}
示例5: ddl_channel_end_callback
static void ddl_channel_end_callback(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl;
DDL_MSG_MED("ddl_channel_end_callback");
ddl = ddl_get_current_ddl_client_for_command(ddl_context,
DDL_CMD_CHANNEL_END);
if (ddl) {
ddl->cmd_state = DDL_CMD_INVALID;
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_CHEND)) {
DDL_MSG_LOW("STATE-CRITICAL-CHEND");
} else {
DDL_MSG_LOW("CH_END_DONE");
ddl_release_client_internal_buffers(ddl);
ddl_context->ddl_callback(VCD_EVT_RESP_STOP,
VCD_S_SUCCESS, NULL, 0, (u32 *)ddl,
ddl->client_data);
DDL_MSG_LOW("ddl_state_transition: %s ~~>"
"DDL_CLIENT_OPEN",
ddl_get_state_string(ddl->client_state));
ddl->client_state = DDL_CLIENT_OPEN;
}
ddl_release_command_channel(ddl_context,
ddl->command_channel);
}
}
示例6: ddl_encoder_eos_done
static void ddl_encoder_eos_done(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl;
u32 channel_inst_id;
vidc_1080p_get_returned_channel_inst_id(&channel_inst_id);
vidc_1080p_clear_returned_channel_inst_id();
ddl = ddl_get_current_ddl_client_for_channel_id(ddl_context,
ddl_context->response_cmd_ch_id);
if (!ddl || (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_EOS_DONE))) {
DDL_MSG_ERROR("STATE-CRITICAL-EOSFRMDONE");
ddl_client_fatal_cb(ddl);
} else {
struct ddl_encoder_data *encoder = &(ddl->codec_data.encoder);
vidc_1080p_get_encode_frame_info(&encoder->enc_frame_info);
ddl_handle_enc_frame_done(ddl);
DDL_MSG_LOW("encoder_eos_done");
ddl->cmd_state = DDL_CMD_INVALID;
DDL_MSG_LOW("ddl_state_transition: %s ~~>"
"DDL_CLIENT_WAIT_FOR_FRAME",
ddl_get_state_string(ddl->client_state));
ddl->client_state = DDL_CLIENT_WAIT_FOR_FRAME;
DDL_MSG_LOW("eos_done");
ddl_context->ddl_callback(VCD_EVT_RESP_EOS_DONE,
VCD_S_SUCCESS, NULL, 0,
(u32 *)ddl, ddl->client_data);
ddl_release_command_channel(ddl_context,
ddl->command_channel);
}
}
示例7: ddl_dpb_buffers_set_done_callback
static u32 ddl_dpb_buffers_set_done_callback(
struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl;
u32 channel_inst_id, ret_status = true;
DDL_MSG_MED("ddl_dpb_buffers_set_done_callback");
vidc_1080p_get_returned_channel_inst_id(&channel_inst_id);
vidc_1080p_clear_returned_channel_inst_id();
ddl = ddl_get_current_ddl_client_for_command(ddl_context,
DDL_CMD_DECODE_SET_DPB);
if (ddl) {
ddl->cmd_state = DDL_CMD_INVALID;
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_DPBDONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-DPBDONE");
ddl_client_fatal_cb(ddl);
} else {
DDL_MSG_LOW("INTR_DPBDONE");
DDL_MSG_LOW("ddl_state_transition: %s ~~>"
"DDL_CLIENT_WAIT_FOR_FRAME",
ddl_get_state_string(ddl->client_state));
if (vidc_msg_timing) {
ddl_calc_core_proc_time(__func__, DEC_OP_TIME);
ddl_reset_core_time_variables(DEC_OP_TIME);
}
ddl->client_state = DDL_CLIENT_WAIT_FOR_FRAME;
ddl_vidc_decode_frame_run(ddl);
ret_status = false;
}
}
return ret_status;
}
示例8: ddl_encoder_seq_done_callback
static u32 ddl_encoder_seq_done_callback(struct ddl_context *ddl_context,
struct ddl_client_context *ddl)
{
struct ddl_encoder_data *encoder;
DDL_MSG_MED("ddl_encoder_seq_done_callback");
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_INITCODECDONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-INITCODEC");
ddl_client_fatal_cb(ddl);
return true;
}
if (vidc_msg_timing)
ddl_calc_core_proc_time(__func__, ENC_OP_TIME);
ddl->cmd_state = DDL_CMD_INVALID;
DDL_MSG_LOW("ddl_state_transition: %s ~~> DDL_CLIENT_WAIT_FOR_FRAME",
ddl_get_state_string(ddl->client_state));
ddl->client_state = DDL_CLIENT_WAIT_FOR_FRAME;
DDL_MSG_LOW("INIT_CODEC_DONE");
encoder = &ddl->codec_data.encoder;
vidc_1080p_get_encoder_sequence_header_size(
&encoder->seq_header_length);
if ((encoder->codec.codec == VCD_CODEC_H264) &&
(encoder->profile.profile == VCD_PROFILE_H264_BASELINE))
if ((encoder->seq_header.align_virtual_addr) &&
(encoder->seq_header_length > 6))
encoder->seq_header.align_virtual_addr[6] = 0xC0;
ddl_context->ddl_callback(VCD_EVT_RESP_START, VCD_S_SUCCESS,
NULL, 0, (u32 *) ddl, ddl->client_data);
ddl_release_command_channel(ddl_context,
ddl->command_channel);
return true;
}
示例9: ddl_channel_set_callback
static u32 ddl_channel_set_callback(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
u32 return_status = false;
ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
VIDC_DEBUG_REGISTER_LOG;
if (!ddl ||
!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_CHDONE)
) {
VIDC_LOG_STRING("STATE-CRITICAL-CHSET");
DDL_IDLE(ddl_context);
return return_status;
}
VIDC_LOG_STRING("Channel-set");
ddl_move_client_state(ddl, DDL_CLIENT_WAIT_FOR_INITCODEC);
if (ddl->decoding) {
if (ddl->codec_data.decoder.header_in_start) {
ddl_decode_init_codec(ddl);
} else {
ddl_context->ddl_callback(VCD_EVT_RESP_START,
VCD_S_SUCCESS, NULL,
0, (u32 *) ddl,
ddl_context->client_data);
DDL_IDLE(ddl_context);
return_status = true;
}
} else {
ddl_encode_init_codec(ddl);
}
return return_status;
}
示例10: ddl_init_codec_done_callback
static void ddl_init_codec_done_callback(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
struct ddl_encoder_data *encoder;
if (!ddl ||
ddl->decoding ||
!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_INITCODECDONE)
) {
VIDC_LOG_STRING("STATE-CRITICAL-INITCODEC");
ddl_client_fatal_cb(ddl_context);
return;
}
ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
ddl_move_client_state(ddl, DDL_CLIENT_WAIT_FOR_FRAME);
VIDC_LOG_STRING("INIT_CODEC_DONE");
encoder = &ddl->codec_data.encoder;
if (encoder->seq_header.virtual_base_addr) {
vidc_720p_encode_get_header(&encoder->seq_header.
buffer_size);
}
ddl_context->ddl_callback(VCD_EVT_RESP_START, VCD_S_SUCCESS, NULL,
0, (u32 *) ddl, ddl_context->client_data);
DDL_IDLE(ddl_context);
}
示例11: ddl_encode_start
u32 ddl_encode_start(u32 *ddl_handle, void *client_data)
{
struct ddl_client_context *ddl =
(struct ddl_client_context *) ddl_handle;
struct ddl_context *ddl_context;
struct ddl_encoder_data *encoder;
void *ptr;
u32 status = VCD_S_SUCCESS;
DDL_MSG_HIGH("ddl_encode_start");
#ifdef DDL_PROFILE
if (first_time < 2) {
ddl_reset_time_variables(1);
first_time++;
}
ddl_get_core_start_time(1);
#endif
ddl_context = ddl_get_context();
if (!DDL_IS_INITIALIZED(ddl_context)) {
DDL_MSG_ERROR("ddl_enc_start:Not_inited");
return VCD_ERR_ILLEGAL_OP;
}
if (DDL_IS_BUSY(ddl_context)) {
DDL_MSG_ERROR("ddl_enc_start:Ddl_busy");
return VCD_ERR_BUSY;
}
if (!ddl || ddl->decoding) {
DDL_MSG_ERROR("ddl_enc_start:Bad_handle");
return VCD_ERR_BAD_HANDLE;
}
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_OPEN)) {
DDL_MSG_ERROR("ddl_enc_start:Not_opened");
return VCD_ERR_ILLEGAL_OP;
}
if (!ddl_encoder_ready_to_start(ddl)) {
DDL_MSG_ERROR("ddl_enc_start:Err_param_settings");
return VCD_ERR_ILLEGAL_OP;
}
encoder = &ddl->codec_data.encoder;
status = ddl_allocate_enc_hw_buffers(ddl);
if (status)
return status;
#ifdef DDL_BUF_LOG
ddl_list_buffers(ddl);
#endif
ptr = ddl_pmem_alloc(&encoder->seq_header,
DDL_ENC_SEQHEADER_SIZE, DDL_LINEAR_BUFFER_ALIGN_BYTES);
if (!ptr) {
ddl_free_enc_hw_buffers(ddl);
DDL_MSG_ERROR("ddl_enc_start:Seq_hdr_alloc_failed");
return VCD_ERR_ALLOC_FAIL;
}
if (!ddl_take_command_channel(ddl_context, ddl, client_data))
return VCD_ERR_BUSY;
ddl_vidc_channel_set(ddl);
return status;
}
示例12: ddl_encoder_frame_run_callback
static void ddl_encoder_frame_run_callback(struct ddl_context
*ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
struct ddl_encoder_data *encoder = &(ddl->codec_data.encoder);
u32 eos_present = false;
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_FRAME_DONE)
) {
VIDC_LOG_STRING("STATE-CRITICAL-ENCFRMRUN");
ddl_client_fatal_cb(ddl_context);
return;
}
VIDC_LOG_STRING("ENC_FRM_RUN_DONE");
ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
vidc_720p_enc_frame_info(&encoder->enc_frame_info);
ddl->output_frame.vcd_frm.ip_frm_tag =
ddl->input_frame.vcd_frm.ip_frm_tag;
ddl->output_frame.vcd_frm.data_len =
encoder->enc_frame_info.enc_size;
ddl->output_frame.vcd_frm.flags |= VCD_FRAME_FLAG_ENDOFFRAME;
ddl_get_frame
(&(ddl->output_frame.vcd_frm),
encoder->enc_frame_info.frame);
ddl_process_encoder_metadata(ddl);
ddl_encode_dynamic_property(ddl, false);
ddl->input_frame.frm_trans_end = false;
ddl_context->ddl_callback(VCD_EVT_RESP_INPUT_DONE, VCD_S_SUCCESS,
&(ddl->input_frame), sizeof(struct ddl_frame_data_tag),
(u32 *) ddl, ddl_context->client_data);
if (vidc_msg_timing)
ddl_calc_core_proc_time(__func__, ENC_OP_TIME);
/* check the presence of EOS */
eos_present =
((VCD_FRAME_FLAG_EOS & ddl->input_frame.vcd_frm.flags));
ddl->output_frame.frm_trans_end = !eos_present;
ddl_context->ddl_callback(VCD_EVT_RESP_OUTPUT_DONE, VCD_S_SUCCESS,
&(ddl->output_frame), sizeof(struct ddl_frame_data_tag),
(u32 *) ddl, ddl_context->client_data);
if (eos_present) {
VIDC_LOG_STRING("ENC-EOS_DONE");
ddl_context->ddl_callback(VCD_EVT_RESP_EOS_DONE,
VCD_S_SUCCESS, NULL, 0, (u32 *)ddl,
ddl_context->client_data);
}
ddl_move_client_state(ddl, DDL_CLIENT_WAIT_FOR_FRAME);
DDL_IDLE(ddl_context);
}
示例13: ddl_channel_set_callback
static u32 ddl_channel_set_callback(struct ddl_context *ddl_context,
u32 instance_id)
{
struct ddl_client_context *ddl;
u32 ret = false;
DDL_MSG_MED("ddl_channel_open_callback");
ddl = ddl_get_current_ddl_client_for_command(ddl_context,
DDL_CMD_CHANNEL_SET);
if (ddl) {
ddl->cmd_state = DDL_CMD_INVALID;
if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_CHDONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-CHSET");
ddl_release_command_channel(ddl_context,
ddl->command_channel);
} else {
DDL_MSG_LOW("CH_SET_DONE");
DDL_MSG_LOW("ddl_state_transition: %s ~~>"
"DDL_CLIENT_WAIT_FOR_INITCODEC",
ddl_get_state_string(ddl->client_state));
ddl->client_state = DDL_CLIENT_WAIT_FOR_INITCODEC;
ddl->instance_id = instance_id;
if (ddl->decoding) {
if (vidc_msg_timing)
ddl_calc_core_proc_time(__func__,
DEC_OP_TIME);
if (ddl->codec_data.decoder.header_in_start)
ddl_vidc_decode_init_codec(ddl);
else {
ddl_context->ddl_callback(
VCD_EVT_RESP_START,
VCD_S_SUCCESS, NULL, 0,
(u32 *)ddl,
ddl->client_data);
ddl_release_command_channel(
ddl_context,
ddl->command_channel);
ret = true;
}
} else
ddl_vidc_encode_init_codec(ddl);
}
}
return ret;
}
示例14: ddl_eos_done_callback
static u32 ddl_eos_done_callback(struct ddl_context *ddl_context)
{
struct ddl_client_context *ddl = ddl_context->current_ddl;
u32 displaystatus, resl_change;
if (!DDLCOMMAND_STATE_IS(ddl_context, DDL_CMD_EOS)) {
VIDC_LOGERR_STRING("UNKWN_EOSDONE");
ddl_client_fatal_cb(ddl_context);
return true;
}
if (!ddl ||
!ddl->decoding ||
!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_WAIT_FOR_EOS_DONE)
) {
VIDC_LOG_STRING("STATE-CRITICAL-EOSDONE");
ddl_client_fatal_cb(ddl_context);
return true;
}
ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
vidc_720p_eos_info(&displaystatus, &resl_change);
if ((enum vidc_720p_display_status)displaystatus
!= VIDC_720P_EMPTY_BUFFER) {
VIDC_LOG_STRING("EOSDONE-EMPTYBUF-ISSUE");
}
ddl_decode_dynamic_property(ddl, false);
if (resl_change == 0x1) {
ddl->codec_data.decoder.header_in_start = false;
ddl->codec_data.decoder.decode_config.sequence_header =
ddl->input_frame.vcd_frm.physical;
ddl->codec_data.decoder.decode_config.sequence_header_len =
ddl->input_frame.vcd_frm.data_len;
ddl_decode_init_codec(ddl);
return false;
}
ddl_move_client_state(ddl, DDL_CLIENT_WAIT_FOR_FRAME);
VIDC_LOG_STRING("EOS_DONE");
ddl_context->ddl_callback(VCD_EVT_RESP_EOS_DONE, VCD_S_SUCCESS,
NULL, 0, (u32 *) ddl, ddl_context->client_data);
DDL_IDLE(ddl_context);
return true;
}
示例15: ddl_channel_set_callback
static u32 ddl_channel_set_callback(struct ddl_context_type *p_ddl_context,
u32 n_instance_id)
{
struct ddl_client_context_type *p_ddl;
u32 b_ret = FALSE;
DDL_MSG_MED("ddl_channel_open_callback");
p_ddl = ddl_get_current_ddl_client_for_command(p_ddl_context,
DDL_CMD_CHANNEL_SET);
if (p_ddl) {
p_ddl->e_cmd_state = DDL_CMD_INVALID;
if (!DDLCLIENT_STATE_IS(p_ddl, DDL_CLIENT_WAIT_FOR_CHDONE)) {
DDL_MSG_ERROR("STATE-CRITICAL-CHSET");
ddl_release_command_channel(p_ddl_context,
p_ddl->n_command_channel);
} else {
DDL_MSG_LOW("CH_SET_DONE");
DDL_MSG_LOW("ddl_state_transition: %s ~~>\
DDL_CLIENT_WAIT_FOR_INITCODEC",
ddl_get_state_string(p_ddl->e_client_state));
p_ddl->e_client_state = DDL_CLIENT_WAIT_FOR_INITCODEC;
p_ddl->n_channel_id = n_instance_id;
if (p_ddl->b_decoding) {
if (p_ddl->codec_data.decoder.b_header_in_start)
ddl_vidc_decode_init_codec(p_ddl);
else {
p_ddl_context->ddl_callback(
VCD_EVT_RESP_START,
VCD_S_SUCCESS, NULL, 0,
(u32 *)p_ddl,
p_ddl->p_client_data);
ddl_release_command_channel(
p_ddl_context,
p_ddl->n_command_channel);
b_ret = TRUE;
}
} else
ddl_vidc_encode_init_codec(p_ddl);
}
}
return b_ret;
}