本文整理汇总了C++中DDL_IS_INITIALIZED函数的典型用法代码示例。如果您正苦于以下问题:C++ DDL_IS_INITIALIZED函数的具体用法?C++ DDL_IS_INITIALIZED怎么用?C++ DDL_IS_INITIALIZED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DDL_IS_INITIALIZED函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ddl_set_property
u32 ddl_set_property(u32 *ddl_handle,
struct vcd_property_hdr *property_hdr, void *property_value)
{
struct ddl_context *ddl_context;
struct ddl_client_context *ddl =
(struct ddl_client_context *) ddl_handle;
u32 vcd_status;
DDL_MSG_HIGH("ddl_set_property");
if (!property_hdr || !property_value) {
DDL_MSG_ERROR("ddl_set_prop:Bad_argument");
return VCD_ERR_ILLEGAL_PARM;
}
ddl_context = ddl_get_context();
if (!DDL_IS_INITIALIZED(ddl_context)) {
DDL_MSG_ERROR("ddl_set_prop:Not_inited");
return VCD_ERR_ILLEGAL_OP;
}
if (!ddl) {
DDL_MSG_ERROR("ddl_set_prop:Bad_handle");
return VCD_ERR_BAD_HANDLE;
}
if (ddl->decoding)
vcd_status = ddl_set_dec_property(ddl, property_hdr,
property_value);
else
vcd_status = ddl_set_enc_property(ddl, property_hdr,
property_value);
if (vcd_status)
DDL_MSG_ERROR("ddl_set_prop:FAILED");
return vcd_status;
}
示例2: 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;
}
示例3: ddl_get_property
u32 ddl_get_property(u32 *ddl_handle,
struct vcd_property_hdr *property_hdr, void *property_value)
{
struct ddl_context *ddl_context;
struct ddl_client_context *ddl =
(struct ddl_client_context *) ddl_handle;
u32 vcd_status = VCD_ERR_ILLEGAL_PARM;
DDL_MSG_HIGH("ddl_get_property");
if (!property_hdr || !property_value)
return VCD_ERR_ILLEGAL_PARM;
if (property_hdr->prop_id == DDL_I_CAPABILITY) {
if (sizeof(struct ddl_property_capability) ==
property_hdr->sz) {
struct ddl_property_capability *ddl_capability =
(struct ddl_property_capability *)
property_value;
ddl_capability->max_num_client = VCD_MAX_NO_CLIENT;
ddl_capability->exclusive = VCD_COMMAND_EXCLUSIVE;
ddl_capability->frame_command_depth =
VCD_FRAME_COMMAND_DEPTH;
ddl_capability->general_command_depth =
VCD_GENEVIDC_COMMAND_DEPTH;
ddl_capability->ddl_time_out_in_ms =
DDL_HW_TIMEOUT_IN_MS;
vcd_status = VCD_S_SUCCESS;
}
return vcd_status;
}
ddl_context = ddl_get_context();
if (!DDL_IS_INITIALIZED(ddl_context))
return VCD_ERR_ILLEGAL_OP;
if (!ddl)
return VCD_ERR_BAD_HANDLE;
if (ddl->decoding)
vcd_status = ddl_get_dec_property(ddl, property_hdr,
property_value);
else
vcd_status = ddl_get_enc_property(ddl, property_hdr,
property_value);
if (vcd_status)
DDL_MSG_ERROR("ddl_get_prop:FAILED");
else
DDL_MSG_ERROR("ddl_get_prop:SUCCESS");
return vcd_status;
}
示例4: 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");
if (vidc_msg_timing) {
if (first_time < 2) {
ddl_reset_core_time_variables(ENC_OP_TIME);
first_time++;
}
ddl_set_core_start_time(__func__, ENC_OP_TIME);
}
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
if ((encoder->codec.codec == VCD_CODEC_MPEG4 &&
!encoder->short_header.short_header) ||
encoder->codec.codec == VCD_CODEC_H264) {
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;
}
} else {
encoder->seq_header.buffer_size = 0;
encoder->seq_header.virtual_base_addr = 0;
encoder->seq_header.align_physical_addr = 0;
encoder->seq_header.align_virtual_addr = 0;
}
if (!ddl_take_command_channel(ddl_context, ddl, client_data))
return VCD_ERR_BUSY;
ddl_vidc_channel_set(ddl);
return status;
}