Early, rudimentary and unpolished skeleton of a “server side”:
import ctypes
import fcntl
import os
import sys
V4L2_LOOPBACK_DEVICE_FILE = "/dev/v4l2loopback"
V4L2_LOOPBACK_MAGIC = 0x4C
V4L2_LOOPBACK_IOC_ADD = 0xC0004C00
class V4L2LoopbackAdd(ctypes.Structure):
_fields_ = [
("card_label", ctypes.c_uint64),
("flags", ctypes.c_uint16),
("device_nr", ctypes.c_uint16),
("card_fd", ctypes.c_uint32),
]
def main():
try:
fd = os.open(V4L2_LOOPBACK_DEVICE_FILE, os.O_RDWR)
except FileNotFoundError:
sys.exit(1)
loopback = V4L2LoopbackAdd()
ctypes.memset(ctypes.addressof(loopback), 0, ctypes.sizeof(loopback))
try:
fcntl.ioctl(fd, V4L2_LOOPBACK_IOC_ADD, loopback)
print(f"{loopback.device_nr} {loopback.card_fd}")
except OSError:
sys.exit(1)
finally:
os.close(fd)
if __name__ == "__main__":
main()
Anyway shows the gist. The device name is due to change…
“Capture” for the next step, i.e. BuildRoot build for headless test.
wget https://file-examples.com/storage/fe3abb0cc967520c59b97f1/2018/04/file_example_AVI_640_800kB.avi
ffmpeg -stream_loop -1 -re -i file_example_AVI_640_800kB.avi -s 1280x720 -f v4l2 /dev/video0
Due to change for “/dev/video0” part (because capture device is a file descriptor eventually). Then I just need playback and comparison to get success/failure condition…
Time is an ocean in a storm...
35 years ago today, Prince of Persia was released on Apple II.
A huge, heartfelt THANK YOU to all who've shared this incredible journey.❤️🙏🕹️
To see what the prince and I are up to these days, check out https://jordanmechner.com.
Itsehän myös kirjoitin tästä samasta Hesarissa pari viikkoa sitten.
X:n muutos on kuitenkin ollut nähtävissä jo kahden vuoden ajan, mutta siltä on haluttu sulkea silmät. Miltä kaikelta olisi voitu välttyä, jos globaali viestintäyhteisö olisi silloin jo tehnyt oikeat johtopäätökset?
@travisfw To install full collection of currently popular linkers in Fedora:
sudo dnf install binutils-gold mold lld
This excludes wild, which needs to be installed through cargo:
cargo install --locked --bin wild --git https://github.com/davidlattimore/wild.git wild
@travisfw To install full collection of currently popular linkers in Fedora:
sudo dnf install binutils-gold mold lld
This excludes wild, which needs to be installed through cargo:
cargo install --locked --bin wild --git https://github.com/davidlattimore/wild.git wild
Saku toivottaa hyvää itsenäisyyspäivää Suomen Amiga-käyttäjille! #tasavallantietokone2