v4l2 erlang api

Max Lapshin max.lapshin@REDACTED
Wed Jun 3 00:19:16 CEST 2020


I want to share simple piece of code that helps us to work with v4l2
devices (SDI capture card): https://github.com/flussonic/v4l-erl

1) this is a working example of enif_select, there are not too many around

2) this is a working example of stop callback (new extended api).

3) this is a nice macros hack for endless atom boilerplate:

https://github.com/flussonic/v4l-erl/blob/master/c_src/v4l.c#L130 declare  atoms
https://github.com/flussonic/v4l-erl/blob/master/c_src/v4l.c#L220  load atoms
https://github.com/flussonic/v4l-erl/blob/master/c_src/v4l.c#L275   use atoms

and it is working =)

More information about the erlang-questions mailing list