vcam

contributed by < hankTaro >

2020 年開發紀錄 / GitHub
2021 年開發紀錄 / GitHub
2022 年開發紀錄 / GitHub
vcam 測試記錄

$ make
make -C /lib/modules/5.19.0-40-generic/build M=/home/hank/linux2023/vcam modules
make[1]: 進入目錄「/usr/src/linux-headers-5.19.0-40-generic」
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/hank/linux2023/vcam/module.o
  CC [M]  /home/hank/linux2023/vcam/control.o
  CC [M]  /home/hank/linux2023/vcam/device.o
  CC [M]  /home/hank/linux2023/vcam/videobuf.o
  CC [M]  /home/hank/linux2023/vcam/fb.o
  LD [M]  /home/hank/linux2023/vcam/vcam.o
  MODPOST /home/hank/linux2023/vcam/Module.symvers
  CC [M]  /home/hank/linux2023/vcam/vcam.mod.o
  LD [M]  /home/hank/linux2023/vcam/vcam.ko
  BTF [M] /home/hank/linux2023/vcam/vcam.ko
Skipping BTF generation for /home/hank/linux2023/vcam/vcam.ko due to unavailability of vmlinux
make[1]: 離開目錄「/usr/src/linux-headers-5.19.0-40-generic」
cc -O2 -Wall -Wextra -pedantic -std=c99 -o vcam-util vcam-util.c
$ sudo fbset -fb /dev/fb0 --info

mode "1920x1080"
    geometry 1920 1080 1920 1080 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        : i915drmfb
    Address     : 0
    Size        : 8294400
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 7680
    Accelerator : No

$ sudo fbset -fb /dev/fb1 --info

mode "640x480"
    geometry 640 480 640 480 24
    timings 0 0 0 0 0 0 0
    rgba 8/0,8/8,8/16,0/0
endmode

Frame buffer device information:
    Name        : vcamfb
    Address     : 0xffffab79cf663000
    Size        : 921600
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 1
    LineLength  : 1920
    Accelerator : No

$ vlc v4l2:///dev/video2
VLC media player 3.0.18 Vetinari (revision 3.0.18-0-ge9eceaed4d)
[000055ecee050a10] main libvlc: 以預設介面執行 VLC。使用「cvlc」指令以無介面方式執行 VLC。
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Qt: Session management error: Could not open network socket
[00007fb6d00010e0] v4l2 demux error: cannot open device '/dev/video2': Operation not permitted
[00007fb6d00010e0] v4l2 demux error: cannot open device '/dev/video2': Operation not permitted
[00007fb6d0002750] v4l2 stream error: cannot open device '/dev/video2': Operation not permitted
QObject::~QObject: Timers cannot be stopped from another thread

無法開啟您的輸入:
VLC 無法開啟 MRL「v4l2:///dev/video2」。詳細資訊請閱讀記錄檔。