您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vpif_dbg函数代码示例

51自学网 2021-06-03 09:48:01
  C++
这篇教程C++ vpif_dbg函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vpif_dbg函数的典型用法代码示例。如果您正苦于以下问题:C++ vpif_dbg函数的具体用法?C++ vpif_dbg怎么用?C++ vpif_dbg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vpif_dbg函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vpif_update_std_info

static int vpif_update_std_info(struct channel_obj *ch){	struct video_obj *vid_ch = &ch->video;	struct vpif_params *vpifparams = &ch->vpifparams;	struct vpif_channel_config_params *std_info = &vpifparams->std_info;	const struct vpif_channel_config_params *config;	int i;	for (i = 0; i < vpif_ch_params_count; i++) {		config = &ch_params[i];		if (config->hd_sd == 0) {			vpif_dbg(2, debug, "SD format/n");			if (config->stdid & vid_ch->stdid) {				memcpy(std_info, config, sizeof(*config));				break;			}		} else {			vpif_dbg(2, debug, "HD format/n");			if (config->dv_preset == vid_ch->dv_preset) {				memcpy(std_info, config, sizeof(*config));				break;			}		}	}	if (i == vpif_ch_params_count) {		vpif_dbg(1, debug, "Format not found/n");		return -EINVAL;	}	return 0;}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:33,


示例2: vpif_s_dv_preset

static int vpif_s_dv_preset(struct file *file, void *priv,		struct v4l2_dv_preset *preset){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	int ret = 0;	if (common->started) {		vpif_dbg(1, debug, "streaming in progress/n");		return -EBUSY;	}	if ((VPIF_CHANNEL0_VIDEO == ch->channel_id) ||	    (VPIF_CHANNEL1_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}	}	ret = v4l2_prio_check(&ch->prio, fh->prio);	if (ret)		return ret;	fh->initialized = 1;		if (mutex_lock_interruptible(&common->lock))		return -ERESTARTSYS;	ch->video.dv_preset = preset->preset;	ch->video.stdid = V4L2_STD_UNKNOWN;	memset(&ch->video.bt_timings, 0, sizeof(ch->video.bt_timings));		if (vpif_update_std_info(ch)) {		vpif_dbg(1, debug, "Error getting the standard info/n");		ret = -EINVAL;	} else {				vpif_config_format(ch);		ret = v4l2_subdev_call(vpif_obj.sd[ch->curr_sd_index],				video, s_dv_preset, preset);	}	mutex_unlock(&common->lock);	return ret;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:51,


示例3: vpif_s_std

static int vpif_s_std(struct file *file, void *priv, v4l2_std_id *std_id){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	int ret = 0;	vpif_dbg(2, debug, "vpif_s_std/n");	if (common->started) {		vpif_err("streaming in progress/n");		return -EBUSY;	}	if ((VPIF_CHANNEL0_VIDEO == ch->channel_id) ||	    (VPIF_CHANNEL1_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}	}	ret = v4l2_prio_check(&ch->prio, fh->prio);	if (0 != ret)		return ret;	fh->initialized = 1;		ch->video.stdid = *std_id;	ch->video.dv_preset = V4L2_DV_INVALID;	memset(&ch->video.bt_timings, 0, sizeof(ch->video.bt_timings));		if (vpif_update_std_info(ch)) {		vpif_err("Error getting the standard info/n");		return -EINVAL;	}		vpif_config_format(ch);		ret = v4l2_subdev_call(vpif_obj.sd[ch->curr_sd_index], core,				s_std, *std_id);	if (ret < 0)		vpif_dbg(1, debug, "Failed to set standard for sub devices/n");	return ret;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:49,


示例4: vpif_reqbufs

static int vpif_reqbufs(struct file *file, void *priv,			struct v4l2_requestbuffers *reqbuf){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common;	u8 index = 0;	vpif_dbg(2, debug, "vpif_reqbufs/n");	if ((VPIF_CHANNEL0_VIDEO == ch->channel_id)	    || (VPIF_CHANNEL1_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}	}	if (V4L2_BUF_TYPE_VIDEO_CAPTURE != reqbuf->type)		return -EINVAL;	index = VPIF_VIDEO_INDEX;	common = &ch->common[index];	if (0 != common->io_usrs)		return -EBUSY;		videobuf_queue_dma_contig_init(&common->buffer_queue,					    &video_qops, NULL,					    &common->irqlock,					    reqbuf->type,					    common->fmt.fmt.pix.field,					    sizeof(struct videobuf_buffer), fh,					    &common->lock);		fh->io_allowed[index] = 1;		common->io_usrs = 1;		common->memory = reqbuf->memory;	INIT_LIST_HEAD(&common->dma_queue);		return videobuf_reqbufs(&common->buffer_queue, reqbuf);}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:48,


示例5: vpif_update_resolution

static int vpif_update_resolution(struct channel_obj *ch){	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	struct video_obj *vid_ch = &ch->video;	struct vpif_params *vpifparams = &ch->vpifparams;	struct vpif_channel_config_params *std_info = &vpifparams->std_info;	if (!vid_ch->stdid && !vid_ch->dv_preset && !vid_ch->bt_timings.height)		return -EINVAL;	if (vid_ch->stdid || vid_ch->dv_preset) {		if (vpif_update_std_info(ch))			return -EINVAL;	}	common->fmt.fmt.pix.width = std_info->width;	common->fmt.fmt.pix.height = std_info->height;	vpif_dbg(1, debug, "Pixel details: Width = %d,Height = %d/n",			common->fmt.fmt.pix.width, common->fmt.fmt.pix.height);	/* Set height and width paramateres */	common->height = std_info->height;	common->width = std_info->width;	return 0;}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:26,


示例6: vpif_open

static int vpif_open(struct file *filep){	struct vpif_capture_config *config = vpif_dev->platform_data;	struct video_device *vdev = video_devdata(filep);	struct common_obj *common;	struct video_obj *vid_ch;	struct channel_obj *ch;	struct vpif_fh *fh;	int i;	vpif_dbg(2, debug, "vpif_open/n");	ch = video_get_drvdata(vdev);	vid_ch = &ch->video;	common = &ch->common[VPIF_VIDEO_INDEX];	if (NULL == ch->curr_subdev_info) {		for (i = 0; i < config->subdev_count; i++) {			if (vpif_obj.sd[i]) {								ch->curr_subdev_info = &config->subdev_info[i];								vid_ch->input_idx = 0;				break;			}		}		if (i == config->subdev_count) {			vpif_err("No sub device registered/n");			return -ENOENT;		}	}		fh = kzalloc(sizeof(struct vpif_fh), GFP_KERNEL);	if (NULL == fh) {		vpif_err("unable to allocate memory for file handle object/n");		return -ENOMEM;	}		filep->private_data = fh;	fh->channel = ch;	fh->initialized = 0;		if (!ch->initialized) {		fh->initialized = 1;		ch->initialized = 1;		memset(&(ch->vpifparams), 0, sizeof(struct vpif_params));	}		ch->usrs++;		fh->io_allowed[VPIF_VIDEO_INDEX] = 0;		fh->prio = V4L2_PRIORITY_UNSET;	v4l2_prio_open(&ch->prio, &fh->prio);	return 0;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:59,


示例7: vpif_s_fmt_vid_cap

static int vpif_s_fmt_vid_cap(struct file *file, void *priv,				struct v4l2_format *fmt){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	struct v4l2_pix_format *pixfmt;	int ret = 0;	vpif_dbg(2, debug, "VIDIOC_S_FMT/n");	/* If streaming is started, return error */	if (common->started) {		vpif_dbg(1, debug, "Streaming is started/n");		return -EBUSY;	}	if ((VPIF_CHANNEL0_VIDEO == ch->channel_id) ||	    (VPIF_CHANNEL1_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}	}	ret = v4l2_prio_check(&ch->prio, fh->prio);	if (0 != ret)		return ret;	fh->initialized = 1;	pixfmt = &fmt->fmt.pix;	/* Check for valid field format */	ret = vpif_check_format(ch, pixfmt, 0);	if (ret)		return ret;	/* store the format in the channel object */	if (mutex_lock_interruptible(&common->lock))		return -ERESTARTSYS;	common->fmt = *fmt;	mutex_unlock(&common->lock);	return 0;}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:46,


示例8: vpif_s_fmt_vid_out

static int vpif_s_fmt_vid_out(struct file *file, void *priv,				struct v4l2_format *fmt){	struct vpif_fh *fh = priv;	struct v4l2_pix_format *pixfmt;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	int ret = 0;	if ((VPIF_CHANNEL2_VIDEO == ch->channel_id)	    || (VPIF_CHANNEL3_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}		/* Check for the priority */		ret = v4l2_prio_check(&ch->prio, fh->prio);		if (0 != ret)			return ret;		fh->initialized = 1;	}	if (common->started) {		vpif_dbg(1, debug, "Streaming in progress/n");		return -EBUSY;	}	pixfmt = &fmt->fmt.pix;	/* Check for valid field format */	ret = vpif_check_format(ch, pixfmt);	if (ret)		return ret;	/* store the pix format in the channel object */	common->fmt.fmt.pix = *pixfmt;	/* store the format in the channel object */	if (mutex_lock_interruptible(&common->lock))		return -ERESTARTSYS;	common->fmt = *fmt;	mutex_unlock(&common->lock);	return 0;}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:45,


示例9: vpif_mmap

/* * vpif_mmap: It is used to map kernel space buffers into user spaces */static int vpif_mmap(struct file *filep, struct vm_area_struct *vma){	struct vpif_fh *fh = filep->private_data;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &(ch->common[VPIF_VIDEO_INDEX]);	vpif_dbg(2, debug, "vpif_mmap/n");	return videobuf_mmap_mapper(&common->buffer_queue, vma);}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:13,


示例10: vpif_update_std_info

static int vpif_update_std_info(struct channel_obj *ch){	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	struct vpif_params *vpifparams = &ch->vpifparams;	const struct vpif_channel_config_params *config;	struct vpif_channel_config_params *std_info = &vpifparams->std_info;	struct video_obj *vid_ch = &ch->video;	int index;	vpif_dbg(2, debug, "vpif_update_std_info/n");	for (index = 0; index < vpif_ch_params_count; index++) {		config = &ch_params[index];		if (config->hd_sd == 0) {			vpif_dbg(2, debug, "SD format/n");			if (config->stdid & vid_ch->stdid) {				memcpy(std_info, config, sizeof(*config));				break;			}		} else {			vpif_dbg(2, debug, "HD format/n");			if (config->dv_preset == vid_ch->dv_preset) {				memcpy(std_info, config, sizeof(*config));				break;			}		}	}		if (index == vpif_ch_params_count)		return -EINVAL;	common->fmt.fmt.pix.width = std_info->width;	common->width = std_info->width;	common->fmt.fmt.pix.height = std_info->height;	common->height = std_info->height;	common->fmt.fmt.pix.bytesperline = std_info->width;	vpifparams->video_params.hpitch = std_info->width;	vpifparams->video_params.storage_mode = std_info->frm_fmt;	return 0;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:42,


示例11: vpif_s_fmt_vid_cap

static int vpif_s_fmt_vid_cap(struct file *file, void *priv,				struct v4l2_format *fmt){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	struct v4l2_pix_format *pixfmt;	int ret = 0;	vpif_dbg(2, debug, "%s/n", __func__);		if (common->started) {		vpif_dbg(1, debug, "Streaming is started/n");		return -EBUSY;	}	if ((VPIF_CHANNEL0_VIDEO == ch->channel_id) ||	    (VPIF_CHANNEL1_VIDEO == ch->channel_id)) {		if (!fh->initialized) {			vpif_dbg(1, debug, "Channel Busy/n");			return -EBUSY;		}	}	ret = v4l2_prio_check(&ch->prio, fh->prio);	if (0 != ret)		return ret;	fh->initialized = 1;	pixfmt = &fmt->fmt.pix;		ret = vpif_check_format(ch, pixfmt, 0);	if (ret)		return ret;		common->fmt = *fmt;	return 0;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:41,


示例12: vpif_poll

static unsigned int vpif_poll(struct file *filep, poll_table * wait){	struct vpif_fh *fh = filep->private_data;	struct channel_obj *channel = fh->channel;	struct common_obj *common = &(channel->common[VPIF_VIDEO_INDEX]);	vpif_dbg(2, debug, "vpif_poll/n");	if (common->started)		return videobuf_poll_stream(filep, &common->buffer_queue, wait);	return 0;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:12,


示例13: vpif_g_chip_ident

/* * vpif_g_chip_ident() - Identify the chip * @file: file ptr * @priv: file handle * @chip: chip identity * * Returns zero or -EINVAL if read operations fails. */static int vpif_g_chip_ident(struct file *file, void *priv,		struct v4l2_dbg_chip_ident *chip){	chip->ident = V4L2_IDENT_NONE;	chip->revision = 0;	if (chip->match.type != V4L2_CHIP_MATCH_I2C_DRIVER &&			chip->match.type != V4L2_CHIP_MATCH_I2C_ADDR) {		vpif_dbg(2, debug, "match_type is invalid./n");		return -EINVAL;	}	return v4l2_device_call_until_err(&vpif_obj.v4l2_dev, 0, core,			g_chip_ident, chip);}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:22,


示例14: vpif_enum_output

static int vpif_enum_output(struct file *file, void *fh,				struct v4l2_output *output){	struct vpif_display_config *config = vpif_dev->platform_data;	if (output->index >= config->output_count) {		vpif_dbg(1, debug, "Invalid output index/n");		return -EINVAL;	}	strcpy(output->name, config->output[output->index]);	output->type = V4L2_OUTPUT_TYPE_ANALOG;	output->std = DM646X_V4L2_STD;	return 0;}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:17,


示例15: vpif_buffer_queue

static void vpif_buffer_queue(struct videobuf_queue *q,			      struct videobuf_buffer *vb){		struct vpif_fh *fh = q->priv_data;	struct channel_obj *ch = fh->channel;	struct common_obj *common;	common = &ch->common[VPIF_VIDEO_INDEX];	vpif_dbg(2, debug, "vpif_buffer_queue/n");		list_add_tail(&vb->queue, &common->dma_queue);		vb->state = VIDEOBUF_QUEUED;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:17,


示例16: vpif_dbg

static struct vpif_subdev_info *vpif_map_sub_device_to_input(				struct channel_obj *ch,				struct vpif_capture_config *vpif_cfg,				int input_index,				int *sub_device_index){	struct vpif_capture_chan_config *chan_cfg;	struct vpif_subdev_info *subdev_info = NULL;	const char *subdev_name = NULL;	int i;	vpif_dbg(2, debug, "vpif_map_sub_device_to_input/n");	chan_cfg = &vpif_cfg->chan_config[ch->channel_id];	for (i = 0; i < chan_cfg->input_count; i++) {				if (i == input_index) {			subdev_name = chan_cfg->inputs[i].subdev_name;			break;		}	}		if (i == chan_cfg->input_count || (NULL == subdev_name))		return subdev_info;		for (i = 0; i < vpif_cfg->subdev_count; i++) {		subdev_info = &vpif_cfg->subdev_info[i];		if (!strcmp(subdev_info->name, subdev_name))			break;	}	if (i == vpif_cfg->subdev_count)		return subdev_info;		if (NULL == vpif_obj.sd[i])		return NULL;	*sub_device_index = i;	return subdev_info;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:44,


示例17: vpif_s_dv_preset

/** * vpif_s_dv_presets() - S_DV_PRESETS handler * @file: file ptr * @priv: file handle * @preset: input preset */static int vpif_s_dv_preset(struct file *file, void *priv,		struct v4l2_dv_preset *preset){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	struct common_obj *common = &ch->common[VPIF_VIDEO_INDEX];	struct video_obj *vid_ch = &ch->video;	int ret = 0;	if (common->started) {		vpif_dbg(1, debug, "streaming in progress/n");		return -EBUSY;	}	ret = v4l2_prio_check(&ch->prio, fh->prio);	if (ret != 0)		return ret;	fh->initialized = 1;	/* Call encoder subdevice function to set the standard */	if (mutex_lock_interruptible(&common->lock))		return -ERESTARTSYS;	ch->video.dv_preset = preset->preset;	ch->video.stdid = V4L2_STD_UNKNOWN;	memset(&ch->video.bt_timings, 0, sizeof(ch->video.bt_timings));	/* Get the information about the standard */	if (vpif_update_resolution(ch)) {		ret = -EINVAL;	} else {		/* Configure the default format information */		vpif_config_format(ch);		ret = v4l2_subdev_call(vpif_obj.sd[vid_ch->output_id],				video, s_dv_preset, preset);	}	mutex_unlock(&common->lock);	return ret;}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:49,


示例18: vpif_querystd

static int vpif_querystd(struct file *file, void *priv, v4l2_std_id *std_id){	struct vpif_fh *fh = priv;	struct channel_obj *ch = fh->channel;	int ret = 0;	vpif_dbg(2, debug, "vpif_querystd/n");		ret = v4l2_subdev_call(vpif_obj.sd[ch->curr_sd_index], video,				querystd, std_id);	if (ret < 0)		vpif_dbg(1, debug, "Failed to set standard for sub devices/n");	return ret;}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:16,



注:本文中的vpif_dbg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vpn_progress函数代码示例
C++ vpi_scan函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。