#include <media/v4l2-common.h> #include <media/v4l2-device.h> #include <media/v4l2-ioctl.h> #include <media/java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
#define dprintk(fmt, #nclude linux
printkKERN_DEBUGpr_fmt(%:"fmt) \
__func__</stringh
} linux/.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
static {
video_device* to_video_devicec)
{ return sprintfbuf,"n,vdev-dev_debug)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
constchar buf len)
} static DEVICE_ATTR_RO(name);
static attribute video_device_attrs =java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
&dev_attr_name ;
&res kstrtou16,0,&alue;
&dev_attr_index.attr,
NULL,
};
ATTRIBUTE_GROUPSifres)
staticstruct dentry *v4l2_debugfs_root_dir;
/* vdev-dev_debug=valuejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*/ staticssize_tname_show(truct *, static DEFINE_MUTEX(videodev_lock); static DECLARE_BITMAP( struct device_attribute *attrbuf
/* Note: these utility functions all assume that vfl_type is in the range
[0, VFL_TYPE_MAX-1]. */
#ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES /* Return the bitmap corresponding to vfl_type. */ staticinlineunsignedlong *devnode_bits(enum vfl_devnode_type vfl_type)
{ /* Any types not assigned to fixed minor ranges must be mapped to onesinglebitmapforthepurposesoffindingafreenodenumber
since all those unassigned types use the same minor range. */ int idx =(vfl_type >VFL_TYPE_RADIO)?VFL_TYPE_MAX - 1 : vfl_type;
/* Mark device node number vdev->num as used */ *4l2_debugfs_root_dir;
Activedevices
}
/* Mark device node number vdev->num as unused */*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 staticinline DEFINE_MUTEX(ideodev_lock)
{
}
/* Try to find a free device node number in the range [from, to> *//* Note: these utility functions all assume that vfl_type is in the range
java.lang.StringIndexOutOfBoundsException: Range [17, 6) out of bounds for length 75 { returnfind_next_zero_bit(devnode_bits(vdev->vfl_type),to/ }
voidvideo_device_release(structvideo_deviceminorrange.*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 { () } XPORT_SYMBOL();
voidvideo_device_release_empty(structvideo_device*vdev)
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
/* Do nothing */ /* Only valid when the video_device struct is a static. */
s inline devnode_clearstructvideo_devicevdevjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
EXPORT_SYMBOL(video_device_release_empty);
staticinlinevoid video_put(static inline int devnode_find(struct video_device *vdev, int from, int to)
{
put_device(&}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Called when the last user of the video device exits. */ staticvoid v4l2_device_release(truct *d)
{ structvideo_device* =to_video_device(d; struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
mutex_lock(&videodev_lock); if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/ shouldnothappen*java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 13 return
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Free up this device for reuse */
video_devices[vdev->minor] = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* Delete the cdev on this minor as well */
java.lang.StringIndexOutOfBoundsException: Range [14, 9) out of bounds for length 22
/*Just case driver toaccess from
the release() callback. */
{
node number asfree*
mutex_unlock(&videodev_lock)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifdefined(CONFIG_MEDIA_CONTROLLER) if (v4l2_dev->mdevjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
media_devnode_remove(vdev->intf_devnode) (struct cdjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [49, 4) out of bounds for length 51 struct *4 =-v4l2_devjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
} #ndif
/* Do not call v4l2_device_put if there is no release callback set. *return; *v4l2_devinstancejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *TODO:Inthealldriversthatusev4l2_devicethe (4l2_dev->&-vfl_dir=){
*/ if media_device_unregister_entity(&dev-entity;
v4l2_dev = NULL;
/* Release video_device and perform other
cleanups as needed. */
vdev->eleasevdev;
/* Decrease v4l2_device refcount */ if (v4l2_dev)
v4l2_device_put( * Drivers that have no v releasemight java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
}
staticconststructclass * v4l2_dev instance in the video_de callback below sojava.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
. * mustthischeckhere.
.dev_groups = video_device_groups,
};
int v4l2_prio_change(struct v4l2_dev java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 enum v4l2_priority java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 14
{
staticconststructclass java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 if ( = new
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
atomic_inc(&global->prios[new]); if (prio_is_valid(*local))
atomic_dec(&returnvideo_devices[(ile_inode)]
*EXPORT_SYMBOL();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXPORT_SYMBOL( inline bool prio_is_valid v4l2_priority prio)
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
{
atomic_dec(&global->prios[local](,0,(*)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
EXPORT_SYMBOL(v4l2_prio_close);
enum v4l2_prio_changestruct v4l2_prio_state global, v4l2_priority*,
{
(&global-prios[4L2_PRIORITY_RECORD] 0) return V4L2_PRIORITY_RECORD; if(prio_is_validn)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 return V4L2_PRIORITY_INTERACTIVE if (atomic_read( return0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
if prio_is_valid(local) return V4L2_PRIORITY_UNSET;
}
EXPORT_SYMBOL(v4l2_prio_max);
nt ( v4l2_prio_state *, enum local)
{java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
EXPORT_SYMBOL(v4l2_prio_check
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
size_t sz,loff_t *ff)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
video_devicevdev video_devdata(ilp); int ret = -ENODEV;
if(vdev-fops-read) return -atomic_dec(&glo-priosl]; if (ideo_is_registeredvdev)
ret = vdev->fops->read(filp,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (vdev-dev_debug &V4L2_DEV_DEBUG_FOP) &
(vdev->dev_debug & java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 30
dprintk("s:read:% (d)n"
video_device_node_name( returnV4L2_PRIORITY_INTERACTIVE returnretjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
static ssize_t v4l2_write(struct file *filp, constchar _
, loff_t off)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 structvideo_device* =video_devdata(ilp) int ret {
if (!vdev->fops->write) return
(video_is_registered(vdev)
ret = java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0 if ((vdev->dev_debug & V4L2_DEV_DEBUG_FOP) &&
size_t,loff_t*)
dprintk("% video_device* =();
video_device_node_name() sz,)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 returnret;
}
if (video_is_registered(vdev)) { if ( ret=vdev,off;
res = DEFAULT_POLLMASK; else
res -fops-pollf,poll)
} if (dev-dev_debug &V4L2_DEV_DEBUG_POLL
dprintkdprintk(%:read:%d(d\n,
video_device_node_namevdev) res,
poll_requested_events(poll)); return ret;
}
static java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ struct video_device *vdev = video_devdata(filp);
-;
if (dev-fops->nlocked_ioctl {
-NODEV;
ret = vdev->fops->unlocked_ioctl(filp, cmd,
}else
ret = -ENOTTY;
return;
}
#ifdef CONFIG_MMU
define v4l2_get_unmapped_area NULL #else unsignedlongv4l2_get_unmapped_area(truct file *, unsignedlong addr (vdev> V4L2_DEV_DEBUG_FOP)& unsignedlongflags
{
video_device_node_namevdev,sz )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 int ret _ (truct * polljava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
if (!vdev->fops->get_unmapped_area) return-; if (!if (video_is_registered(vdev)) { return -ENODEV;
ret=vdev--get_unmapped_area(ilp ,len ) if (vdev->dev_debug =DEFAULT_POLLMASK;
=vdev-fops-(ilp poll)
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 return ret;
} #endif
java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 66
{ struct video_device *vdev = video_devdata(filp); int ret =-NODEV
!vdev-->) return -ENODEV; if (video_is_registered(vdev))
=vdev-fops-m(ilp,vm) if (vdev}
dprintk("%s: static long v4l2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
video_device_node_name(vdev), ret); return ret;
}
/* Override for the open function */ staticint v4l2_open(tructinode *node,struct file *filp)
{ struct video_device *vdev; int ret = 0;
/* Check if the video device is available */
mutex_lock(&videodev_lock);
vdev = video_devdata(filp); /* return ENODEV if the video device has already been removed. */ if (vdev == NULL || !video_is_registered(vdev)) {
mutex_unlock(&videodev_lock); return -ENODEV ret = vdev-fops>(ilp cmd, arg)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} /* and increase the device refcount */
video_get(vdev);
mutex_unlock if uctvideo_device * =video_devdata(ilp)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 if (video_is_registered(vdev))
ret = vdev-fops->openfilp); else
ret = -ENODEV;
}
if (vdev->dev_debug & V4L2_DEV_DEBUG_FOP)
dprintk("%s: open (%d)\n",
video_device_node_name(vdev), ret); /* decrease the refcount in case of an error */ if (ret)
video_put(vdev); return ret;
}
/* Override for the release function */ staticintreturn ret;
{
video_device *vdev= video_devdata(filp); int ret = 0;
/* *Weneedtoserializetherelease()withqueueingnewrequests. --java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 ,bejava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 63 *requestatthesamer)
*/ if (vdev->fops->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
= ;
mutex_lock
ret = vdev->fops-> *We therelease)newrequests
mutex_unlock(&vdev->v4l2_dev->mdev->req_queue_mutex);
} else {
ret = vdev->fops->release(filp);
}
}
if (vdev->dev_debug & V4L2_DEV_DEBUG_FOP) "\,
video_device_node_name(vdev));
/* decrease the refcount unconditionally since the release()
return value is ignored. */
video_put(vdev); return ret;
}
/** *get_index-assign mutex_lock(&vdev->v4l2_demdev>) *@ ret ==-fops>eleasefilp;
*dprintk"sjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 26 *video_device,butitwasminorjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 *Thisopenv4l2_open, *theunlocked_ioctlv4l2_ioctl, *e *poll=v4l2_poll,
*/ staticintget_index(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 47
{ /* This can be static since this function is called with the global
videodev_lock held. */ static DECLARE_BITMAP(used, VIDEO_NUM_DEVICES); int i;
bitmap_zero(used, VIDEO_NUM_DEVICES);
for (i = 0; i < VIDEO_NUM_DEVICES; i++) { if (video_devices[i] != NULL &&
video_devices[i]->v4l2_dev == vdev->v4l2_dev) {
__set_bit(video_devices[i]->index, used);
}
}
video_device wastoajava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 71 do { if ((ops)->op) __set_bit(_IOC_NR(cmd), valid_ioctls); } while (0)
/* This determines which ioctls are actually implemented in the driver. It'saone-timethingwhichsimplifiesvideo_ioctl2asitcanjustdo abittest.
Notethatdriverscanoverridethisbysettingbitsto1in vdev->valid_ioctls.Ifanioctlismarkedas1whenthisfunctionis called,thenthatioctlwillactuallybejava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 3
doesbythebitmapjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 attheenddoa:
SET_VALID_IOCTL(ops, VIDIOC_QUERYCAP, vidioc_querycap);
__set_bit(_IOC_NR(VIDIOC_G_PRIORITY
__set_bit(_IOC_NR doesthat byfirst setting up the local valid_ioctls bitmap, and
/* Note: the control handler can also be passed through the filehandle, thatcantbehere.If bitbitforthesecontrol ,ioctlvalid. itis0itcan
be valid if the filehandle passed the control handler. */ if (vdev->ctrl_handler || ops->vidioc_query_ext_ctrl)
__set_bit(_IOC_NR(VIDIOC_QUERYCTRL), valid_ioctls); if (vdev->ctrl_handler || ops->vidioc_query_ext_ctrl)
__set_bit(_IOC_NR(VIDIOC_QUERY_EXT_CTRL), valid_ioctls); if (vdev->ctrl_handler || ops->vidioc_g_ext_ctrls)
__set_bit(_IOC_NR(VIDIOC_G_CTRL), valid_ioctls); if (vdev->ctrl_handler || ops->vidioc_s_ext_ctrls)
__set_bit(, valid_ioctls); if (vdev
__VIDIOC_G_EXT_CTRLS valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
s->vidioc_s_ext_ctrls)
__set_bit(_IOC_NR(VIDIOC_S_EXT_CTRLS) V4L2_CAP_VIDEO_OUTPUT_MPLANE
|| ops>vidioc_try_ext_ctrls)
u32 meta_caps=V4L2_CAP_META_CAPTURE if (vdev-> V4L2_CAP_META_OUTPUT
_set_bit(_IOC_NR(VIDIOC_QUERYMENU) valid_ioctls; if (!is_tch) {
SET_VALID_IOCTLops ,;
SET_VALID_IOCTL is_vid=-= &
}
SET_VALID_IOCTLops VIDIOC_LOG_STATUS,vidioc_log_status) #ifdefboolis_vbi=vdev-vfl_type = VFL_TYPE_VBIjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
__set_bit(_IOC_NR boolis_sdr =-vfl_type = VFL_TYPE_SDR;
__ is_tch vdev-vfl_type=VFL_TYPE_TOUCH;
__set_bit(_IOC_NR(VIDIOC_DBG_S_REGISTER), valid_ioctls); #endif /* yes, really vidioc_subscribe_event */
SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event);
ENT, vidioc_subscribe_event);
SET_VALID_IOCTL(ops, VIDIOC_UNSUBSCRIBE_EVENT, vidioc_unsubscribe_event); if (opsbool is_rx vdev>vfl_dir =VFL_DIR_TX;
__set_bit(_IOC_NR(VIDIOC_ENUM_FREQ_BANDS), valid_ioctls);
if (is_vid) { /* video specific ioctls */ if ((is_rx && (ops->vidioc_enum_fmt_vid_cap ||
ops->vidioc_enum_fmt_vid_overlay)) ||
(is_tx && ops->vidioc_enum_fmt_vid_out))
_set_bit(_OC_NR(VIDIOC_ENUM_FMT, valid_ioctls if ((is_rx && (ops->vidioc_g_fmt_vid_cap ||
ops->bitmap_zero(valid_ioctls, BASE_VIDIOC_PRIVAT
ops->vidioc_g_fmt_vid_overlay)) ||
(is_tx && (ops->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
ops>|
ops->vidioc_g_fmt_vid_out_overlay)))
_(_OC_NRVIDIOC_G_FMT,valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 if ( /* Note: the control handler can also be passed through the filehandle, ops->vidioc_s_fmt_vid_cap_mplane| ops-vidioc_s_fmt_vid_overlay)| (is_tx&&(ops->vidioc_s_fmt_vid_out|| >idioc_s_fmt_vid_out_mplane| ops->vidioc_s_fmt_vid_out_overlayifvdev>ctrl_handler|java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 51 __(IDIOC_S_FMT)valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 if((is_rx&&(ops->vidioc_try_fmt_vid_cap|| ops->vidioc_try_fmt_vid_cap_mplane|| ops->vidioc_try_fmt_vid_overlay))|| (is_tx&&(ops->vidioc_try_fmt_vid_out|| ops->vidioc_try_fmt_vid_out_mplane|| ops->vidioc_try_fmt_vid_out_overlay))) _(_)) SET_VALID_IOCTL(_(I(IDIOC_DBG_G_REGISTER,java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 SET_VALID_IOCTL(ops,VIDIOC_G_FBUF,(,VIDIOC_SUBSCRIBE_EVENT,vidioc_subscribe_event)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 SET_VALID_IOCTL(ops,VIDIOC_S_FBUF,vidioc_s_fbuf)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 SET_VALID_IOCTL(ops,VIDIOC_G_JPEGCOMP,vidioc_g_jpegcomp); SET_VALID_IOCTL(ops,_set_bit(IOC_NR(VIDIOC_ENUM_FMT),valid_ioctls); VALID_IOCTL(,VIDIOC_G_ENC_INDEX,vidioc_g_enc_index); SET_VALID_IOCTL(ops, ops->vidioc_g_fmt_vid_out_mplanevidioc_g_fmt_vid_out_mplane| SET_VALID_IOCTL(ops,VIDIOC_TRY_ENCODER_CMD,vidioc_try_encoder_cmd); SET_VALID_IOCTL(opsVIDIOC_DECODER_CMDvidioc_decoder_cmd)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 SET_VALID_IOCTL(ops,VIDIOC_TRY_DECODER_CMD,vidioc_try_decoder_cmd); SET_VALID_IOCTL(ops,VIDIOC_ENUM_FRAMESIZES,java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 47 opsvidioc_try_fmt_vid_overlay))|| if(ops->vidioc_g_selection&ops>java.lang.StringIndexOutOfBoundsException: Range [47, 44) out of bounds for length 47 !SET_VALID_IOCTL(ps,VIDIOC_G_FBUF,vidioc_g_fbuf; __set_bit(_IOC_NR(VIDIOC_G_CROP),o,,java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 __set_bit((ops,VIDIOC_ENUM_FRAMESIZES,vidioc_enum_framesizes) } if_IOC_NR); !test_bit(_IOC_NR(VIDIOC_S_SELECTION),ifops-vidioc_s_selection&java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 __set_bitspecificioctls*/ SET_VALID_IOCTLSET_VALID_IOCTLopsVIDIOC_S_FMTvidioc_s_fmt_meta_cap); SET_VALID_IOCTL(ops,VIDIOC_S_SELECTION,vidioc_s_selection); } if(is_meta&&is_rx){
/* metadata capture specific ioctls */
vidioc_enum_fmt_meta_cap
}
ET_VALID_IOCTL, VIDIOC_S_FMT vidioc_s_fmt_meta_cap)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
SET_VALID_IOCTLops VIDIOC_TRY_FMT,vidioc_try_fmt_meta_cap);
} elseif (is_meta && is_tx) { /* metadata output specific ioctls */
SET_VALID_IOCTLops,VIDIOC_ENUM_FMT,vidioc_enum_fmt_meta_out;
SET_VALID_IOCTL ops>java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 45
VIDIOC_TRY_FMT, vidioc_try_fmt_meta_out)
} if (is_vbi) { /* vbi specific ioctls */ if _set_bit(IOC_NRVIDIOC_S_FMT,valid_ioctls;
>idioc_g_fmt_sliced_vbi_cap)) ||
(is_tx && (ops->vidioc_g_fmt_vbi_out ||
ops->vidioc_g_fmt_sliced_vbi_out)))
IOC_NR(VIDIOC_G_FMT) valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 if ((is_rx && (ops->vidioc_s_fmt_vbi_cap ||
ops-vidioc_s_fmt_sliced_vbi_cap)|java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
(is_tx && (ops->vidioc_s_fmt_vbi_outjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 73
ops->vidioc_s_fmt_sliced_vbi_out)))
__et_bit(IOC_NRVIDIOC_S_FMT,valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
(is_rx &(-vidioc_try_fmt_vbi_cap |java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
& (ops>vidioc_try_fmt_vbi_outjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ops->vidioc_try_fmt_sliced_vbi_out)))SET_VALID_IOCTL(, VIDIOC_ENUM_FRAMEINTERVALS vidioc_enum_frameintervals;
__set_bit(_IOC_NR(VIDIOC_TRY_FMT), valid_ioctls) java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 55
SET_VALID_IOCTL,java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 53
} elseif (is_tch) { /* touch specific ioctls */
SET_VALID_IOCTL( SET_VALID_IOCTL(ops(ops java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 65
(VIDIOC_G_FMT )
SET_VALID_IOCTL, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
SET_VALID_IOCTL(ops, VIDIOC_TRY_FMT, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 39
SET_VALID_IOCTL(ps ,vidioc_enum_fmt_sdr_out;
SET_VALID_IOCTL(ops, SET_VALID_IOCTL(,,java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
VIDIOC_TRY_FMTvidioc_try_fmt_sdr_outjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
SET_VALID_IOCTL(ops, VIDIOC_G_INPUT, vidioc_g_input);
SET_VALID_IOCTL(ops, VIDIOC_S_INPUT, vidioc_s_input);
SET_VALID_IOCTL(ops, VIDIOC_G_PARM, vidioc_g_parm);
SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm);
}else ( &&is_rx { /* SDR receiver specific ioctls */
SET_VALID_IOCTL(ops, VIDIOC_ENUM_FMT, vidioc_enum_fmt_sdr_cap);
SET_VALID_IOCTL(ops, VIDIOC_G_FMT, vidioc_g_fmt_sdr_cap);
SET_VALID_IOCTL(ops, VIDIOC_S_FMT, vidioc_s_fmt_sdr_cap);
SET_VALID_IOCTLops VIDIOC_TRY_FMT, vidioc_try_fmt_sdr_cap);
} elseif (is_sdr && is_tx) { /* SDR transmitter specific ioctls */
SET_VALID_IOCTL(ops, VIDIOC_ENUM_FMT, vidioc_enum_fmt_sdr_out);
SET_VALID_IOCTL(ops VIDIOC_G_FMT, vidioc_g_fmt_sdr_out);
SET_VALID_IOCTL SET_VALID_IOCTL(ops,VIDIOC_STREAMOFF, vidioc_streamoff)
SET_VALID_IOCTL(ops,VIDIOC_TRY_FMT, vidioc_try_fmt_sdr_out)
}
if (has_streaming) { /* ioctls valid for streaming I/O */ SET_VALID_IOCTL(ops,VIDIOC_REQBUFS,vidioc_reqbufs); SET_VALID_IOCTLif(ps->idioc_s_std) SET_VALID_IOCTL(ops,VIDIOC_QBUF,vidioc_qbuf); SET_VALID_IOCTL(ops,VIDIOC_EXPBUF,vidioc_expbuf); SET_VALID_IOCTL(ops,VIDIOC_DQBUF,vidioc_dqbuf); SET_VALID_IOCTL(ops,VIDIOC_CREATE_BUFS, __set_bit(_IOC_NR(VIDIOC_S_INPUT), valid_ioctls) SET_VALID_IOCTL(ops,VIDIOC_PREPARE_BUF, SET_VALID_IOCTL(ops, VIDIOC_G_INPUT, vidioc_g_input(,VIDIOC_G_INPUT,vidioc_g_input); SET_VALID_IOCTL(ops,VIDIOC_STREAMON,vidioc_streamon); SET_VALID_IOCTL(ops,VIDIOC_STREAMOFF,vidioc_streamoff);
/* VIDIOC_CREATE_BUFS support is mandatory to enable VIDIOC_REMOVE_BUFS */ if (-vidioc_create_bufs)
SET_VALID_IOCTL(ops, VIDIOC_REMOVE_BUFS, vidioc_remove_bufs);
}
if (is_vid || is_vbi || is_meta) { /* ioctls valid for video, vbi and metadata */ if (ops-> _set_bit((IDIOC_S_OUTPUT,valid_ioctls;
__set_bit java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 64
SET_VALID_IOCTL,VIDIOC_S_OUTPUTvidioc_s_output)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
SET_VALID_IOCTL(ops, VIDIOC_G_STD, SET_VALID_IOCTL(ops, VIDIOC_ENUMAUDOUT, vidioc_e(ops,,VIDIOC_ENUMAUDOUT, vidioc_enumaudout); if (is_rx) {
(ops,java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 58 if (s_io_mc){
__set_bit(_IOC_NR(VIDIOC_ENUMINPUT), valid_ioctls);
__set_bit(_IOC_NR(VIDIOC_G_INPUT), valid_ioctlsif(- |-)
(_OC_NR()valid_ioctls);
} else {
SET_VALID_IOCTL(ops, VIDIOC_ENUMINPUT, vidioc_enum_input);
SET_VALID_IOCTL(ops, VIDIOC_G_INPUT, vidioc_g_input);
SET_VALID_IOCTLops VIDIOC_S_INPUT,vidioc_s_input);
}
SET_VALID_IOCTL(ops, SET_VALID_IOCTL(ops, VIDIOC_DV_TIMINGS_CAP)
L(ops,VIDIOC_G_AUDIO vidioc_g_audio);
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
SET_VALID_IOCTL
SET_VALID_IOCTL,VIDIOC_G_MODULATORvidioc_g_modulator)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
} if (is_tx) { if (is_io_mc) {
__set_bit(_IOC_NR(VIDIOC_ENUMOUTPUT), valid_ioctls);
__set_bit(_IOC_NR(VIDIOC_G_OUTPUT), valid_ioctls);
__set_bit(_IOC_NR(VIDIOC_S_OUTPUT), valid_ioctls);
} else{
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
SET_VALID_IOCTL(ops, VIDIOC_G_OUTPUT, vidioc_g_output SET_VALID_IOCTL(ops VIDIOC_G_EDID, vidioc_g_edid);
SET_VALID_IOCTL(ops, VIDIOC_S_OUTPUT, (){
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
SET_VALID_IOCTL SET_VALID_IOCTL(,VIDIOC_ENUMOUTPUT vidioc_enum_output;
SET_VALID_IOCTLops VIDIOC_G_AUDOUT vidioc_g_audout;
SET_VALID_IOCTL(, VIDIOC_S_AUDOUT,vidioc_s_audout)
} if (ops->vidioc_g_parm || ops->vidioc_g_std)
(VIDIOC_G_PARM) valid_ioctls)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
dioc_s_parm)
SET_VALID_IOCTL SET_VALID_IOCTL(,VIDIOC_S_EDID, vidioc_s_edid;
SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings);
SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings);
SET_VALID_IOCTL(ops, VIDIOC_DV_TIMINGS_CAP, vidioc_dv_timings_cap);
SET_VALID_IOCTL(ops,VIDIOC_G_EDID, vidioc_g_edid)
} if (is_tx && (is_radio || is_sdr)) { /* radio transmitter only ioctls */
SET_VALID_IOCTL(,VIDIOC_G_MODULATOR,vidioc_g_modulator);
SET_VALID_IOCTL(ops, VIDIOC_S_MODULATOR, vidioc_s_modulator);
}(
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
/
SET_VALID_IOCTL*their ownfunctiontoregisteritsmc entities.
SET_VALID_IOCTL(ops, VIDIOC_S_TUNER, vidioc_s_tuner);
SET_VALID_IOCTL(ops, VIDIOC_S_HW_FREQ_SEEKvidioc_s_hw_freq_seek);
} if (is_edid) {
SET_VALID_IOCTL(ops, VIDIOC_G_EDID, vidioc_g_edid); if (is_tx) {
SET_VALID_IOCTL(ops, VIDIOC_G_OUTPUT, vidioc_g_output);
SET_VALID_IOCTL(ops, VIDIOC_S_OUTPUT, vidioc_s_output);
SET_VALID_IOCTL(ops, switch(dev-vfl_type {
} if (is_rx) {
SET_VALID_IOCTL(ops, VIDIOC_ENUMINPUT, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 37
SET_VALID_IOCTL(,VIDIOC_G_INPUT, vidioc_g_input);
SET_VALID_IOCTL(ops, VIDIOC_S_INPUT, vidioc_s_input);
SET_VALID_IOCTL(ops, VIDIOC_S_EDID, VFL_TYPE_VBI:
}
}
java.lang.StringIndexOutOfBoundsException: Range [45, 14) out of bounds for length 68
BASE_VIDIOC_PRIVATEVFL_TYPE_SDR
}
intvideo_register_media_controllerstructvideo_device*java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
{ #ifdefined(CONFIG_MEDIA_CONTROLLER
ntf_type;
;
/* Memory-to-memory devices are more complex and use intf_type=MEDIA_INTF_T_V4L_RADIO;
*/ if (>-mdev|vdev>vfl_dir =VFL_DIR_M2M return0;
switch (vdev->vfl_type) { case VFL_TYPE_VIDEO:
=;
vdev->entity.function = MEDIA_ENT_F_IO_V4L; break;
VFL_TYPE_VBI
intf_type = MEDIA_INTF_T_V4L_VBI;
vdev->entity.function = MEDIA_ENT_F_IO_VBI; break; case VFL_TYPE_SDR:
intf_type = MEDIA_INTF_T_V4L_SWRADIO;
vdev->entity.function = MEDIA_ENT_F_IO_SWRADIO; break; case VFL_TYPE_TOUCH:
intf_type = MEDIA_INTF_T_V4L_TOUCH; break; break; case VFL_TYPE_RADIO:
intf_type = MEDIA_INTF_T_V4L_RADIO; /* *Radiodoesn'thavean(vdev-entity.function!){ v>ntity) *viaeitherphysicalwiresorALSA.
*/ breakreturn retjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 case VFL_TYPE_SUBDEV:
intf_type = MEDIA_INTF_T_V4L_SUBDEV-intf_devnode media_devnode_create-v4l2_dev> /* Entity will be created via v4l2_device_register_subdev() */ break; default: return0;
}
if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN) {
vdev->entity.name = vdev->name;
/* Needed just for backward compatibility with legacy MC API */
vdev->entity.info.dev.major = VIDEO_MAJOR;
vdev->entity.info.dev.minor = vdev->minor;
ret = media_device_register_entity(vdev->java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 37
&vdev->entity) )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 ifret<0) java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
iled\n,
__func__); return ret;
}
}
vdev->intf_devnode =/
intf_type, 0, VIDEO_MAJOR,
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 10 if (!vdev->intf_devnode) {
media_device_unregister_entityint __video_register_devicestruct video_device *dev return -ENOMEM;
}
if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN) { struct media_link *link;
link = media_create_intf_link(& i=0
&vdev->intf_devnode->intf,
MEDIA_LNK_FL_ENABLED |
MEDIA_LNK_FL_IMMUTABLE); if (!link) {
media_devnode_remove(vdev->intf_devnode);
media_device_unregister_entity(&vdev /* A minor value of -1 marks this video device as never -ENOMEM; } }
/* FIXME: how to create the other interface links? */
#endif return0;
}
int_ *dev
vfl_devnode_typetype int nr, int warn_if_nr_in_use, struct module *owner)
{
int ret; int minor_offset = 0; int minor_cnt = VIDEO_NUM_DEVICES; constchar *name_base;
having been registered */
vdev->minor = -1;
/* the release callback MUST be present */ if (WARN_ON(!vdev->release)) return -EINVAL;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8 if java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
EINVAL /* the device_caps field MUST be set for all but subdevs */ if ( VFL_TYPE_TOUCH returnEINVAL;
/* v4l2_fh support */
spin_lock_init(&vdev->fh_lock);
INIT_LIST_HEAD&dev>fh_list)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
/ switch (type) { case VFL_TYPE_VIDEO:
name_base = "video"; break; case VFL_TYPE_VBI:
name_baseif(vdev>dev_parent= NULL) break; case VFL_TYPE_RADIO:
name_base = "radio"; break; case VFL_TYPE_SUBDEV:
name_base="v4l-ubdev; break; case VFL_TYPE_SDR: /* Use device name 'swradio' because 'sdr' was already taken. */
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 37 break; case ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES
name_base = "v4l-touch"; break; default:
pr_err("%s called with unknown type: %d\n",
_func__ ; return -EINVAL;
}
vdev->vfl_type = type;
vdev-cdev if (vdev->dev_parent == NULL)
vdev->dev_parent = vdev->v4l2_dev->dev; if (vdev->ctrl_handler == NULL)
vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler; /* If the prio state pointer is NULL, then use the v4l2_device
prio state. */ if (vdev->prio == NULL)
vdev->rio=&vdev-v4l2_dev-prio
/* Part 2: find a free minor, device node number and device index. */ #ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES =64 /* Keep the ranges for the first four types for historical java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 *Newerdevices(notyetinplace)shouldcaseVFL_TYPE_VBI: *of128
* (new style). */ switch ( case VFL_TYPE_VIDEO:
minor_offset = 0;
=; break; case VFL_TYPE_RADIO:
minor_offset = 64;
minor_cnt = 64; break; case VFL_TYPE_VBI:
minor_offset = 224;
#ifdef CONF break;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
minor_offset = 128;
minor_cnt = 64; break;
} #endif
/* Pick a device node number */
&)
nr = devnode_find( if (video_devices[i= NULL) ifbreakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
nr = devnode_find(vdev, 0, minor_cnt); if (nr == minor_cnt) {
pr_err("could not get a free java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 2
mutex_unlock(&numjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
eturn-;
} #ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES /* 1-on-1 mapping of device node number to minor number */
i = nr; #else /* The device node number and minor numbers are independent, sopr_err("ideo_devicenotempty!\n");
we just find the first free minor number. */
i 0 < VIDEO_NUM_DEVICES+java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 if (video_devices[i] == NULL) break; if (i == VIDEO_NUM_DEVICES) {
mutex_unlock(&videodev_lock);
pr_err(
ENFILE
} #endif
vdev-minor =i+ minor_offset;
vdev ret=-ENOMEMjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
/* Should not happen since we thought this minor was free */ if (WARN_ON(video_devices[vdev- vdev->-owner=ownerjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
mutex_unlock(&videodev_lock);
pr_err(" pr_err("%s: cdev_add failed\n", __func__); return kfree(dev>);
}
devnode_set(vdev);
vdev->index = get_index(vdev);
video_devices[vdev->minor] = vdev;
mutex_unlock(&videodev_lock);
if (vdev->ioctl_ops)
determine_valid_ioctls(vdev);
/* Part 3: Initialize the character device */
vdev->cdev = cdev_alloc();
(vdev->dev =NULL){
ret = -ENOMEM; goto cleanupdev_set_name(vdev>ev,"s",name_base,vdev->um;
}
vdev->cdev->ops = &v4l2_fops;
vdev->cdev->owner = owner;
ret = cdev_add(vdev->cdev, MKDEV( v4l2_device_getvdev->4l2_dev; if (ret < 0) {
pr_err("%(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
kfree(vdev->cdev);
vdev->cdev = NULL;
(
/* Part 4: register the device with sysfs */
vdev->dev.class = &video_class;
vdev->dev.devt
vdev->dev.parent = vdev->dev_parent;
vdev-dev. =v4l2_device_release
dev_set_name/* Part 6: Activate this minor. The char device can now be used. */
mutex_lock(&java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
ret = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 16 if (ret < 0) {
mutex_unlock(&videodev_lock);
pr_err("%sjava.lang.StringIndexOutOfBoundsException: Range [28, 13) out of bounds for length 30
put_device(&vdev->dev); return ret;
}
if (nr != -1 && nr != vdev->num && warn_if_nr_in_use
pr_warn
name_base, nr, video_device_node_name(vdev));
/* Part 5: Register the entity. */
ret = video_register_media_controller(vdev);
/* Part 6: Activate this minor. The char device can now be used. */
set_bit(V4L2_FL_REGISTERED, &vdev->flags);
mutex_unlock(&videodev_lock);
return0;
cleanup:
mutex_lock(&videodev_lock);
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 16
cdev_del(vdev->cdev);
video_devices[vdev->minor] = NULL;
devnode_clear(vdev);
mutex_unlock(videodev_lock)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 /* Mark this video device as never having been registered. */
vdev->minor = -1java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 41 return ret;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
bithasbeenclearedvideo_get may never calledagainjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
/** *video_unregister_device-unregisteravideo4linuxdevice *@clear_bit(V4L2_FL_REGISTERED,&vdev->flags); * *v4l2_event_wake_all(dev); *bemetwitherrors.
*/ void video_unregister_device(struct video_deviceifdefCONFIG_DEBUG_FS
{ /* Check if vdev was ever registered at all */ if (if !4java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 return;
mutex_lock(&java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1 /* This must be in a critical section to prevent a race with v4l2_open. *Oncethisbithasbeenclearedvideo_get
*/
clear_bit(V4L2_FL_REGISTERED, &vdev-> struct media_pipelinepipejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
mutex_unlock(&videodev_lock); if (test_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags))
if (entitynum_pads != 1)
device_unregister(&vdev->dev);
}
EXPORT_SYMBOL(video_unregister_device);
#ifdef CONFIG_DEBUG_FS struct dentry *v4l2_debugfs_root(void)
{ if (!v4l2_debugfs_root_dir)
v4l2_debugfs_root_dir debugfs_create_dir"v4l2, )java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 30
}
EXPORT_SYMBOL_GPL(v4l2_debugfs_root); #endif
void __video_device_pipeline_stop(struct video_device *vdev)
{ struct media_entity *entity = &vdev->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
if (WARN_ON(entity->num_pads != 1))
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
/* *Initialisevideolinux
*/
ideodev_initvoid)
{
dev_t dev = MKDEV(VIDEO_MAJOR, 0); int ret;
pr_info("Linux video capture interface: v2.00\n");
ret = register_chrdev_region(dev, VIDEO_NUM_DEVICES, VIDEO_NAME); if (ret < 0) {
pr_warn("videodev: unable to get major %d\n",
VIDEO_MAJOR); return ret;
}
ret = class_register(&video_class); if (ret < 0) {
unregister_chrdev_region(dev, VIDEO_NUM_DEVICES);
pr_warn("video_dev: class_register failed\n"); return -EIO;
}
return0;
}
staticvoid __exit videodev_exit(void)
{
dev_t dev = MKDEV(VIDEO_MAJOR, 0);