當前位置: 首頁>>代碼示例>>C++>>正文


C++ DDL_IS_INITIALIZED函數代碼示例

本文整理匯總了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;
}
開發者ID:325116067,項目名稱:semc-qsd8x50,代碼行數:32,代碼來源:vcd_ddl_properties.c

示例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;
}
開發者ID:LeeDroid-,項目名稱:Shooter-2.6.35-MR,代碼行數:58,代碼來源:vcd_ddl.c

示例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;
}
開發者ID:325116067,項目名稱:semc-qsd8x50,代碼行數:47,代碼來源:vcd_ddl_properties.c

示例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;
}
開發者ID:Kra1o5,項目名稱:android_kernel_huawei_u8815-gb,代碼行數:65,代碼來源:vcd_ddl.c


注:本文中的DDL_IS_INITIALIZED函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。