Comments (3)
On Fedora 39, it looks like pipewire uses v4l2 behind the scenes:
$ SDL_CAMERA_DRIVER=v4l2 test/testcamera --trackmem
INFO: - Camera #0: HD WebCam: HD WebCam
$ SDL_CAMERA_DRIVER=pipewire test/testcamera --trackmem
INFO: - Camera #0: HD WebCam (V4L2)
The camera device name is a bit counter-intuitive here.
from sdl.
with pipe wire, I got
INFO: Saw 0 camera devices.
INFO: No cameras available?
not sure what to configure to get it working ...
from sdl.
check your config, in my config i have:
context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert.* = audioconvert/libspa-audioconvert
avb.* = avb/libspa-avb
api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
api.bluez5.* = bluez5/libspa-bluez5
api.vulkan.* = vulkan/libspa-vulkan
api.jack.* = jack/libspa-jack
support.* = support/libspa-support
#videotestsrc = videotestsrc/libspa-videotestsrc
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
}
( run pw-config
)
You can also run pw-dump
and inspect the json to see all available devices (in case SDL does not pick up the video device)
example excerpt:
{
"id": 52,
"type": "PipeWire:Interface:Node",
"version": 3,
"permissions": [ "r", "w", "x", "m" ],
"info": {
"max-input-ports": 0,
"max-output-ports": 1,
"change-mask": [ "input-ports", "output-ports", "state", "props", "params" ],
"n-input-ports": 0,
"n-output-ports": 1,
"state": "suspended",
"error": null,
"props": {
"api.libcamera.location": "front",
"api.libcamera.path": "\\_SB_.PCI0.GP18.XHC0.RHUB.PRT4-4:1.0-04f2:b685",
"client.id": 34,
"clock.quantum-limit": 8192,
"device.api": "libcamera",
"device.description": "Chicony USB2.0 Camera: Chicony ",
"device.id": 46,
"device.name": "libcamera_device.\\_SB_.PCI0.GP18.XHC0.RHUB.PRT4-4:1.0-04f2:b685",
"device.product.name": "Chicony USB2.0 Camera: Chicony ",
"factory.id": 10,
"factory.name": "api.libcamera.source",
"media.class": "Video/Source",
"media.role": "Camera",
"node.description": "Built-in Front Camera",
"node.driver": true,
"node.name": "libcamera_input.__SB_.PCI0.GP18.XHC0.RHUB.PRT4-4_1.0-04f2_b685",
"node.nick": "Chicony USB2.0 Camera Chicony ",
"node.pause-on-idle": false,
"object.id": 52,
"object.path": "libcamera:\\_SB_.PCI0.GP18.XHC0.RHUB.PRT4-4:1.0-04f2:b685",
"object.serial": 55,
"priority.session": 800
},
"params": {
"PropInfo": [
{
"id": "device",
"description": "The libcamera device",
"type": "\\_SB_.PCI0.GP18.XHC0.RHUB.PRT4-4:1.0-04f2:b685"
},
{
"id": "deviceName",
"description": "The libcamera device name",
"type": ""
},
{
"id": "brightness",
"description": "Brightness",
"type": { "default": 0.000000, "min": -1.000000, "max": 1.000000 }
},
{
"id": "contrast",
"description": "Contrast",
"type": { "default": 1.000000, "min": 0.500000, "max": 2.062500 }
},
{
"id": "saturation",
"description": "Saturation",
"type": { "default": 1.000000, "min": 0.000000, "max": 3.125000 }
}
],
"Props": [
{
"device": "\\_SB_.PCI0.GP18.XHC0.RHUB.PRT4-4:1.0-04f2:b685",
"deviceName": ""
}
],
"EnumFormat": [
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 640, "height": 480 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 160, "height": 120 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 176, "height": 144 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 320, "height": 240 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 352, "height": 288 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 640, "height": 360 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 640, "height": 480 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 1280, "height": 720 }
},
{
"mediaType": "video",
"mediaSubtype": "mjpg",
"size": { "width": 1280, "height": 720 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 640, "height": 480 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 160, "height": 120 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 176, "height": 144 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 320, "height": 240 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 352, "height": 288 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 640, "height": 360 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 640, "height": 480 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 1280, "height": 720 }
},
{
"mediaType": "video",
"mediaSubtype": "raw",
"format": "YUY2",
"size": { "width": 1280, "height": 720 }
}
],
"Format": [ ]
}
}
},
from sdl.
Related Issues (20)
- Should SDL_GAMECONTROLLERCONFIG be SDL_GAMEPADCONFIG? HOT 1
- No implementations for SDL libraries found.
- [SDL_video] SDL_GetWindowPixelFormat still returns Uint32 instead of an SDL_PixelFormat value HOT 4
- Suggestion to consider modularity of SDL and separate libraries HOT 2
- Patching with SDL_migration.cocci does not work HOT 2
- SDL_SINT64_C vs SDL_INT64_C define mistake
- SDL2: sometimes linux automatically rescales window to a minimum size HOT 1
- Memory Leak with Newest SDL3 HOT 10
- Windows CI failing in icon.h creation
- SDL renderer "ERROR: Could not get a framebuffer" when running a SDL-release-2.30.5 program on a Debian system without X. HOT 4
- Rename some Get/Set functions to match the new naming style HOT 5
- Incorrect usage of GetStringUTFChars/NewStringUTF in android jni code HOT 1
- SDL_Renderer vulkan backend fails while re-entering the app on android HOT 7
- Gamepad not recognized by SDL but via Linux and gtk HOT 2
- Clarification of thread safety of SDL_GetStringRule HOT 4
- [Suggestion] Make SDL_GetWindowOpacity() return the opacity value, instead of using an out parameter. HOT 2
- Is SDL_GetWinRTFSPath() still needed? HOT 1
- ios wrong documents path
- Emscripten input callbacks HOT 1
- Locale change causes Android app to restart, despite configChanges settings
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 sdl.