info-beamer / tools

Useful tools when working with info-beamer on the Pi
https://info-beamer.com/
33 stars 11 forks source link

raspivid and visual-watchdog #6

Closed natxopedreira closed 6 years ago

natxopedreira commented 6 years ago

Hello

Thanks for those tools, are nice :)

Im trying to use visual-watchdog with raspivid from desktop, but when i run the watchdog, the screen goes black..... Its possible to use the watchdog with raspivid?

dividuum commented 6 years ago

Not sure. Haven't tried myself but I don't see any obvious reason why it shouldn't work. It works in any other configuration and only fails if you're also running raspivid?

natxopedreira commented 6 years ago

I was connected with vnc using directly from console i don't get a black screen :)

I tried displaying a static image and the watchdog get no "stuck msg" if the image is all black i get the message.... Does it make sense??

dividuum commented 6 years ago

The content doesn't make a difference. But if there is anything changing, you won't get the stuck message.

natxopedreira commented 6 years ago

Im trying to merge two of your tools so i can save a jpg from the watchdog to be sure im "capturing" the correct thing.

Can i ask you about those differences:

in snapshot you do:

 /* DispmanX expects buffer rows to be aligned to a 32 bit boundary */
 int pitch = ALIGN_UP(2 * info.width, 32);
vc_dispmanx_resource_read_data(resource, &rect, image, info.width * 2);

and in watchdog:

int pitch = ALIGN_UP(info.width * 3, 32);
vc_dispmanx_resource_read_data(resource, &rect, image, info.width * 3);

Why those differences, if i store a jpg from the watchdog should i change those lines to fit snapshot code?

dividuum commented 6 years ago

No. The difference is VC_IMAGE_RGB565 and VC_IMAGE_RGB888. One is two bytes per pixel, the other is 3.

natxopedreira commented 6 years ago

Thanks!