Git Product home page Git Product logo

Comments (12)

yangh avatar yangh commented on August 16, 2024 1

Hi rameshandroid

The current code is based on kernel 3.2, it's a bit older than yours 3.19. You need fix it by yourself.

BR.

from uvcvideo.

yangh avatar yangh commented on August 16, 2024

Sorry for that I didn't include the uvc_entity.c in the repository, please download the following file in to the uvc source tree and try again.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/drivers/media/video/uvc/uvc_entity.c?id=refs/tags/v3.2.71

from uvcvideo.

lefsky avatar lefsky commented on August 16, 2024

Thank you for that clarification. I have gotten the code to compile, but
when I run "vc" I receive the following message:

./vc -d /dev/video0 -x 4912 -y 3684 -s

Set still format: 4912x3684, format: YUYV
VIDIOC_S_FMT Still error 22, Invalid argument

Can you advise?

M

On Wed, Aug 26, 2015 at 4:21 AM, Yang Hong [email protected] wrote:

Sorry for that I didn't include the uvc_entity.c in the repository, please
download the following file in to the uvc source tree and try again.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/drivers/media/video/uvc/uvc_entity.c?id=refs/tags/v3.2.71


Reply to this email directly or view it on GitHub
#1 (comment).

Michael Lefsky
Center for Ecological Applications of Lidar
College of Natural Resources
Colorado State University
http://www.researcherid.com/rid/A-7224-2009

If I were creating the world I wouldn't mess about with butterflies and
daffodils. I would have started with lasers, eight o'clock, Day One! - Time
Bandits

from uvcvideo.

lefsky avatar lefsky commented on August 16, 2024

I should say that the resulT of v4l2-ctl --list-formats-ext

is:

ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUV 4:2:2 (YUYV)
Size: Discrete 1920x1080
Interval: Discrete 0.033 s (30.000 fps)
Size: Discrete 4912x3684
Interval: Discrete 0.033 s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033 s (30.000 fps)

On Mon, Aug 31, 2015 at 1:41 PM, [email protected] [email protected] wrote:

Thank you for that clarification. I have gotten the code to compile, but
when I run "vc" I receive the following message:

./vc -d /dev/video0 -x 4912 -y 3684 -s

Set still format: 4912x3684, format: YUYV
VIDIOC_S_FMT Still error 22, Invalid argument

Can you advise?

M

On Wed, Aug 26, 2015 at 4:21 AM, Yang Hong [email protected]
wrote:

Sorry for that I didn't include the uvc_entity.c in the repository,
please download the following file in to the uvc source tree and try again.

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/drivers/media/video/uvc/uvc_entity.c?id=refs/tags/v3.2.71


Reply to this email directly or view it on GitHub
#1 (comment).

Michael Lefsky
Center for Ecological Applications of Lidar
College of Natural Resources
Colorado State University
http://www.researcherid.com/rid/A-7224-2009

If I were creating the world I wouldn't mess about with butterflies and
daffodils. I would have started with lasers, eight o'clock, Day One! - Time
Bandits

Michael Lefsky
Center for Ecological Applications of Lidar
College of Natural Resources
Colorado State University
http://www.researcherid.com/rid/A-7224-2009

If I were creating the world I wouldn't mess about with butterflies and
daffodils. I would have started with lasers, eight o'clock, Day One! - Time
Bandits

from uvcvideo.

yangh avatar yangh commented on August 16, 2024

I think you should insmod new uvcvideo kernel module, and make sure use size from STILL Capture format.

from uvcvideo.

sreyasvpariyath avatar sreyasvpariyath commented on August 16, 2024

Hi
When I try to make -f Makefile.android I am getting the following error sudo make -f Makefile.android
Password:
make ARCH=arm CROSS_COMPILE=arm-eabi- -C /obj/KERNEL_OBJ M= modules
make[1]: *** No rule to make target `modules'. Stop.
make: *** [all] Error 2
any idea.?

from uvcvideo.

yangh avatar yangh commented on August 16, 2024

Hi Sreyasvpariyath

I think you should setup android build environment before run 'make -f Makefile.android' command.

Sorry for lately reply

Best regards

from uvcvideo.

rameshandroid avatar rameshandroid commented on August 16, 2024

when i am compiling the code,getting compilations errors.

uvcvideo-master/uvc/uvc_v4l2.c:1244:3: error: too few arguments to function ‘v4l_printk_ioctl’
v4l_printk_ioctl(cmd);

Build logs :-

make -C /lib/modules/uname -r/build M=$PWD
make[1]: Entering directory `/usr/src/linux-headers-3.19.0-25-generic'
LD /home/sakhi/Downloads/uvcvideo-master/uvc/built-in.o
CC [M] /home/sakhi/Downloads/uvcvideo-master/uvc/uvc_driver.o
CC [M] /home/sakhi/Downloads/uvcvideo-master/uvc/uvc_queue.o
CC [M] /home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.o
/home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.c: In function ‘uvc_v4l2_ioctl’:
/home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.c:1244:3: warning: passing argument 1 of ‘v4l_printk_ioctl’ makes pointer from integer without a cast [enabled by default]
v4l_printk_ioctl(cmd);
^
In file included from /home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.c:27:0:
include/media/v4l2-ioctl.h:305:13: note: expected ‘const char ’ but argument is of type ‘unsigned int’
extern void v4l_printk_ioctl(const char *prefix, unsigned int cmd);
^
/home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.c:1244:3: error: too few arguments to function ‘v4l_printk_ioctl’
v4l_printk_ioctl(cmd);
^
In file included from /home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.c:27:0:
include/media/v4l2-ioctl.h:305:13: note: declared here
extern void v4l_printk_ioctl(const char *prefix, unsigned int cmd);
^
make[2]: *
* [/home/sakhi/Downloads/uvcvideo-master/uvc/uvc_v4l2.o] Error 1

Regards
Ramesh

from uvcvideo.

dasgo avatar dasgo commented on August 16, 2024

I am using OpenCV and Python in Ubuntu to acquire still images from a usb camera (8Mp). Is this driver capturing images from a usb camera without any delay? When I use OpenCV I have a lag due to the internal buffer, I suppose it is caused by uvc driver, because it doesn't happen in Windows or in Mac.

Regards
Dasgo

from uvcvideo.

yangh avatar yangh commented on August 16, 2024

Hi Dasgo

This driver is not widely tested/tunned, so may be lag on some camera. And I'm not sure if you have used the still image capture API provided by this driver.

Best regards.

from uvcvideo.

rameshandroid avatar rameshandroid commented on August 16, 2024

modified uvc_v4l2_ioctl function.now i am able to compile

static long uvc_v4l2_ioctl(struct file *file,unsigned int cmd, unsigned long arg)
{
struct video_device *vfd = video_devdata(file);
if (uvc_trace_param & UVC_TRACE_IOCTL) {
uvc_printk(KERN_DEBUG, "uvc_v4l2_ioctl executing \n");
v4l_printk_ioctl(video_device_node_name(vfd),cmd);
}

return video_usercopy(file, cmd, arg, uvc_v4l2_do_ioctl);

}

from uvcvideo.

PowerfulMoney avatar PowerfulMoney commented on August 16, 2024

Hi, yangh
Firstly, thank you for your nice program, it solves my "STILL IMAGE" problem!
I am new for V4L2, after compiling this program under Ubuntu, I have 2 problem:

  1. In order to get a high-quality still image from a web camera(supports 4608x3456) timely ,I'd like to get directly the image by V4L2 without "streamon" and "streamoff", is it feasible?
    2.It takes too long time to execute "xioctl(fd, VIDIOC_DQBUF, &buf);", maybe 3000ms, but the same process takes just 850ms by "DirectX Show" under Windows, the reason is the platform or the src?
    In addition, are you in Beijing now? Maybe we can discuss the problem by phone.
    Good luck to you!

from uvcvideo.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.