Posts
3557
Following
214
Followers
361
Linux kernel maintainer. Compilers and virtualization at Parity Technologies.
@ikkeT @Linux Mun mielestä tässä on ehkä ennemminkin ymmärretty mahdollisimman väärin mitä kehittäjät haluaa. Tämmöinen alustatalous toimi viimeksi 90-luvulla...
1
0
0

Jarkko Sakkinen

Edited 14 days ago

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…

0
0
1

“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…

1
0
0

Jarkko Sakkinen

Edited 14 days ago
Video streamed with ffmpeg, and played with ffplay through with my WiP V4L2 loopback driver.

The next step is to detach the producer from /dev/videoX fops and instead return anonymous inode, which owns a file where the capture device can write the video stream.

The video resolution in this smoke test is 640x480, and the encoder scales it up in real-time to 1280x720.

#linux #kernel #media #video4linux
1
4
5
@chimbosonic @teve Feels just tragic that we've spend billions and billions to build these fast connections between computers and we still have just 2024 versions of AOL or CompuServe. No one can talk to each other in bits.
0
0
0
@chimbosonic @teve ya... it is sad

I mean I did regularly in 1996 e.g. /dcc send ;-) good times...

Or like wouldn't it be cool if you could just plain call your mates computer? WA or similar not required all-in-the-client...
1
0
0
@teve IPv6 is not really for the masses or like especially providing end user apps requiring IPv6. So not like extremely huge surprise...

I heard that recently YLE turned it on so points up for that!
0
0
0

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.

2
1
2

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?

https://www.hs.fi/mielipide/art-2000010843435.html

0
4
0

Jarkko Sakkinen

I like in Rust how it returns back to MS-DOS on in executables and libraries ;-)

No joke. Makes debugging so much better experience...

DSO's suck... (for most part unless they are actually needed).

#rust #rustlang
0
0
2

Jarkko Sakkinen

Edited 15 days ago
The only person I've talk to and with whom I can share my IPv6 grit has been David Woodhouse. He really gets this! I wish more PE's in big companies were like David (he works at AWS).

If you are PE of your company who has influence, be "the dwmw2" of your corps ;-)

Make a difference. In tech.
0
1
0

@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
0
1
1

@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
0
1
1

Jarkko Sakkinen

Edited 15 days ago
The only person I've talk to and with whom I can share my IPv6 grit has been David Woodhouse. He really gets this! I wish more PE's in big companies were like David (he works at AWS).

If you are PE of your company who has influence, be "the dwmw2" of your corps ;-)

Make a difference. In tech.
0
1
0
Think how much some IM services could scale down in service if computers could actually talk to each other.

Fuck NAT.
1
0
1

Jarkko Sakkinen

IPv4 Internet of today

I wonder whether 2025 will be the year of IPv6.

I miss 90s and dialup as then you could actually speak to another computer no strings attached...

In some ways Internet was more advanced in tech back then ;-)
2
0
0

Saku - Suomen Amiga-käyttäjät

Saku toivottaa hyvää itsenäisyyspäivää Suomen Amiga-käyttäjille!

0
3
2
@travisfw then you should read this some day :-) it's still relevant and best book on topic. and as weird as it sounds it is nicely written, has nice backstories and generally very nice story telling.
1
0
1

Jarkko Sakkinen

Learned something pretty basic but also somewhat essential in software and systems engineering, i.e. how to switch the default linker in #Fedora :-)

PS. Needs sudo in order to make an effective change.
1
0
2
Show older