Comments (4)
Hi @Peter-St, is it possible to stream android devices onboard camera data to PC using USB UVC gadget function using your libuvc? I have custom android firmware for Pixel 4a where I have enabled UVC gadget function on kernel side , which creates a video device node on device side /dev/video3 three , was looking for a JNI implementation which allows me to stream camera data to PC via USB.
This means I can use my device as USB webcam on PC.
Looking forwarder to your response Thanks
Hi,
I read the documentation and think that it should be possible.
One thing bothering me:
Your Phone only has one usb otg port, which needs to be connected to your pc, to get the USB UVC gadget working. You will need at least one more usb port, to connect the usb camera. The questions is, if the USB UVC gadget also works from an usb hub. (/dev/video3 tree get created on you pc --> with pc and camera connected to the hub.)
Can you plz check it out.
from android-uvc-camera.
Hi @Peter-St, is it possible to stream android devices onboard camera data to PC using USB UVC gadget function using your libuvc? I have custom android firmware for Pixel 4a where I have enabled UVC gadget function on kernel side , which creates a video device node on device side /dev/video3 three , was looking for a JNI implementation which allows me to stream camera data to PC via USB.
This means I can use my device as USB webcam on PC.
Looking forwarder to your response ThanksHi,
I read the documentation and think that it should be possible.
One thing bothering me: Your Phone only has one usb otg port, which needs to be connected to your pc, to get the USB UVC gadget working. You will need at least one more usb port, to connect the usb camera. The questions is, if the USB UVC gadget also works from an usb hub. (/dev/video3 tree get created on you pc --> with pc and camera connected to the hub.) Can you plz check it out.
What I mean is use camera on android device to stream camera frames to PC , since we are using the built in camera on the device we only need one USB port to connect to PC ...
And the debugging can be using ADB over wifi .
from android-uvc-camera.
Oh, ok.
I think it should work.
You will need the souce code of an app, which catches the frames from the internal camera and next you will have to create a userspace program to interact with the UVC Gadget driver.
The UVC Gadget driver must be paired with a userspace program that responds to UVC control requests and fills buffers to be queued to the V4L2 device that the driver creates. How those things are achieved is implementation dependent and beyond the scope of this document, but a reference application can be found at https://gitlab.freedesktop.org/camera/uvc-gadget
--> https://lwn.net/Articles/925750/
I have an idea how this app should look like, but I don't own an Android device with custom kernel source, so I think, I can't help you out in this issue.
My app in general is only for usb cameras. Your userspace program will have to catch the camera frames in java. Next you will have to pass them to C / C++ code and then I think you will have to interact with your pc using the IOCTL's from the V4L2 library. (The v4l2.c file from the sample link above shows this approach).
This are only thoughts. To be more specific, I would need an android dev with custom kernel.
So far,
Peter
from android-uvc-camera.
Oh, ok. I think it should work. You will need the souce code of an app, which catches the frames from the internal camera and next you will have to create a userspace program to interact with the UVC Gadget driver.
The UVC Gadget driver must be paired with a userspace program that responds to UVC control requests and fills buffers to be queued to the V4L2 device that the driver creates. How those things are achieved is implementation dependent and beyond the scope of this document, but a reference application can be found at https://gitlab.freedesktop.org/camera/uvc-gadget
--> https://lwn.net/Articles/925750/I have an idea how this app should look like, but I don't own an Android device with custom kernel source, so I think, I can't help you out in this issue. My app in general is only for usb cameras. Your userspace program will have to catch the camera frames in java. Next you will have to pass them to C / C++ code and then I think you will have to interact with your pc using the IOCTL's from the V4L2 library. (The v4l2.c file from the sample link above shows this approach). This are only thoughts. To be more specific, I would need an android dev with custom kernel.
So far,
Peter
Just sent you a mail , please let me know if you have not received it.
from android-uvc-camera.
Related Issues (20)
- Getting error when importing the project HOT 2
- can give more priority to usb camer on android device using this library HOT 2
- 预览会卡顿问题 HOT 2
- Preview will freeze HOT 2
- WebRTC crashing HOT 2
- Unable To See Preview HOT 5
- Video Probe-Commit Control failed! HOT 2
- infrared UVC not showing HOT 10
- can i use this app for my camera PLUG417 HOT 15
- NV12 Video Format not Supported HOT 3
- PureThermal 2 HOT 6
- F-Droid availability HOT 3
- Android 13+ UVYV Stream failed; Result = -1 HOT 1
- Request: Create libuvc separate fork HOT 2
- Fastlane - add images/icon.png HOT 2
- Crash on setting manual settings HOT 7
- Saving image with error HOT 4
- V2.2.4 Video recording does not seem to be working HOT 5
- How do I setup this camera? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-uvc-camera.