[mythtv-users] Checking power status of STB

Eric Sharkey eric at lisaneric.org
Fri Oct 31 15:54:54 UTC 2014


On Wed, Oct 29, 2014 at 7:45 PM, Justin Alcorn <justin at jalcorn.net> wrote:
> Anyone see any problems with this?
>
> #!/bin/bash
>
> dev="/dev/video0"
> of="/tmp/$$.mpg"
> poweron="0_74_KEY_POWER"
> remote="blaster"
> lircdev="/dev/lircd"
> until $(timeout 2 dd if=${dev} of=${of} bs=4k count=1 1>/dev/null 2>/dev/null )

Are you sure this doesn't cause minor glitches in an active recording
(similar to a missing 4K block of data)?

http://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html#id2758585

In particular, this statement "V4L2 drivers should not support
multiple applications reading or writing the same data stream on a
device by copying buffers" should give one pause, even when it's
followed by "When the driver supports stream sharing anyway it must be
implemented transparently".

If it's working for you, great, but I wouldn't count on this working
in all circumstances.

Eric


More information about the mythtv-users mailing list