Lines Matching refs:mVideoInfo
92 mVideoInfo->rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lInitMmap()
93 mVideoInfo->rb.memory = V4L2_MEMORY_MMAP; in v4lInitMmap()
94 mVideoInfo->rb.count = count; in v4lInitMmap()
96 ret = v4lIoctl(mCameraHandle, VIDIOC_REQBUFS, &mVideoInfo->rb); in v4lInitMmap()
102 count = mVideoInfo->rb.count; in v4lInitMmap()
105 memset (&mVideoInfo->buf, 0, sizeof (struct v4l2_buffer)); in v4lInitMmap()
107 mVideoInfo->buf.index = i; in v4lInitMmap()
108 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lInitMmap()
109 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in v4lInitMmap()
111 ret = v4lIoctl (mCameraHandle, VIDIOC_QUERYBUF, &mVideoInfo->buf); in v4lInitMmap()
117 mVideoInfo->mem[i] = mmap (NULL, in v4lInitMmap()
118 mVideoInfo->buf.length, in v4lInitMmap()
122 mVideoInfo->buf.m.offset); in v4lInitMmap()
124 …(" mVideoInfo->mem[%d]=%p ; mVideoInfo->buf.length = %d", i, mVideoInfo->mem[i], mVideoInfo->buf.l… in v4lInitMmap()
125 if (mVideoInfo->mem[i] == MAP_FAILED) { in v4lInitMmap()
136 mVideoInfo->rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lInitUsrPtr()
137 mVideoInfo->rb.memory = V4L2_MEMORY_USERPTR; in v4lInitUsrPtr()
138 mVideoInfo->rb.count = count; in v4lInitUsrPtr()
140 ret = v4lIoctl(mCameraHandle, VIDIOC_REQBUFS, &mVideoInfo->rb); in v4lInitUsrPtr()
146 count = mVideoInfo->rb.count; in v4lInitUsrPtr()
154 if (!mVideoInfo->isStreaming) { in v4lStartStreaming()
162 mVideoInfo->isStreaming = true; in v4lStartStreaming()
171 if (mVideoInfo->isStreaming) { in v4lStopStreaming()
179 mVideoInfo->isStreaming = false; in v4lStopStreaming()
182 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lStopStreaming()
183 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in v4lStopStreaming()
185 if (munmap(mVideoInfo->mem[i], mVideoInfo->buf.length) < 0) { in v4lStopStreaming()
191 mVideoInfo->rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lStopStreaming()
192 mVideoInfo->rb.memory = V4L2_MEMORY_MMAP; in v4lStopStreaming()
193 mVideoInfo->rb.count = 0; in v4lStopStreaming()
195 ret = v4lIoctl(mCameraHandle, VIDIOC_REQBUFS, &mVideoInfo->rb); in v4lStopStreaming()
208 mVideoInfo->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lSetFormat()
209 ret = v4lIoctl(mCameraHandle, VIDIOC_G_FMT, &mVideoInfo->format); in v4lSetFormat()
214 mVideoInfo->width = width; in v4lSetFormat()
215 mVideoInfo->height = height; in v4lSetFormat()
216 mVideoInfo->framesizeIn = (width * height << 1); in v4lSetFormat()
217 mVideoInfo->formatIn = DEFAULT_PIXEL_FORMAT; in v4lSetFormat()
219 mVideoInfo->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in v4lSetFormat()
220 mVideoInfo->format.fmt.pix.width = width; in v4lSetFormat()
221 mVideoInfo->format.fmt.pix.height = height; in v4lSetFormat()
222 mVideoInfo->format.fmt.pix.pixelformat = pix_format; in v4lSetFormat()
224 ret = v4lIoctl(mCameraHandle, VIDIOC_S_FMT, &mVideoInfo->format); in v4lSetFormat()
229 v4lIoctl(mCameraHandle, VIDIOC_G_FMT, &mVideoInfo->format); in v4lSetFormat()
230 …CAMHAL_LOGDB("VIDIOC_G_FMT : WxH = %dx%d", mVideoInfo->format.fmt.pix.width, mVideoInfo->format.fm… in v4lSetFormat()
270 mVideoInfo->buf.index = i; in restartPreview()
271 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in restartPreview()
272 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in restartPreview()
274 ret = v4lIoctl(mCameraHandle, VIDIOC_QBUF, &mVideoInfo->buf); in restartPreview()
300 mVideoInfo = (struct VideoInfo *) calloc (1, sizeof (struct VideoInfo)); in initialize()
301 if(!mVideoInfo) { in initialize()
312 ret = v4lIoctl (mCameraHandle, VIDIOC_QUERYCAP, &mVideoInfo->cap); in initialize()
319 if ((mVideoInfo->cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0) { in initialize()
325 if (!(mVideoInfo->cap.capabilities & V4L2_CAP_STREAMING)) { in initialize()
333 mVideoInfo->isStreaming = false; in initialize()
355 if ( !mVideoInfo->isStreaming ) { in fillThisBuffer()
365 mVideoInfo->buf.index = idx; in fillThisBuffer()
366 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in fillThisBuffer()
367 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in fillThisBuffer()
369 ret = v4lIoctl(mCameraHandle, VIDIOC_QBUF, &mVideoInfo->buf); in fillThisBuffer()
582 mVideoInfo->buf.index = i; in takePicture()
583 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in takePicture()
584 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in takePicture()
586 ret = v4lIoctl(mCameraHandle, VIDIOC_QBUF, &mVideoInfo->buf); in takePicture()
709 mVideoInfo->buf.index = i; in startPreview()
710 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in startPreview()
711 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in startPreview()
713 ret = v4lIoctl(mCameraHandle, VIDIOC_QBUF, &mVideoInfo->buf); in startPreview()
774 mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in GetFrame()
775 mVideoInfo->buf.memory = V4L2_MEMORY_MMAP; in GetFrame()
782 if(!mVideoInfo->isStreaming) { in GetFrame()
786 ret = v4lIoctl(mCameraHandle, VIDIOC_DQBUF, &mVideoInfo->buf); in GetFrame()
798 index = mVideoInfo->buf.index; in GetFrame()
801 return (char *)mVideoInfo->mem[mVideoInfo->buf.index]; in GetFrame()
921 if (mVideoInfo) in ~V4LCameraAdapter()
923 free(mVideoInfo); in ~V4LCameraAdapter()
924 mVideoInfo = NULL; in ~V4LCameraAdapter()