Thanks for your mpeg program!
I've done this:
if (bytes_read <= 0) {
if (bytes_read < 0) {
vbiprintf(stderr, L"Cannot read %s (%d:%s)\n", input,
errno, strerror(errno)); if (opt.printverbose >= 1) {
vbiprintf(stderr, L"%s terminated.\n", PROGRAM);
}
return 2;
}
(changed return 1 to return 2)
then, at the end:
if (finished == 2) {
exit(1);
}
return 0;
}
I added an exit(1). This way, I get a return code of 1 when the device is
inaccessible, and can avoid taking action when the device is busy.
Thanks again! This should help with my debugging!
On Fri, 30 Jun 2006 13:13:33 +0200
Duncan Webb <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've written a small program to display the packets that are contained
> in a mpeg stream. It is available here:
> http://www.linuxowl.com/vbiutil.html. The idea is that when the audio is
>
> lost from the mpeg stream then some action can be taken, such as
> resetting the firmware or rebooting.
>
> To use the program the following command will echo failed when there is
> no audio in the stream.
> if ! mpegcheck -b4 | grep -q AUDIO_STREAM; then
> echo $? FAILED
> fi
>
> If the video device is not /dev/video0 then it can be specified with the
>
> argument -i/dev/videoX. More information can be shown with the argument
> -v.
>
> A gotcha is that if the device is currently being used then it will
> report an error and there won't be any packets displayed.
>
> HTH
> Duncan
>
> > Hi List,
> >
> > Does anybody know why the IVTV X-Driver sometimes crashes or why the
> > audio stream disappears?
> >
> > I'm curious if anybody run a system with a PVR-350 all the time
> > everyday, without any problems?
> >
> > In the kernel log I get the following messages after the systems has
> > been running for a while. I'm trying to determine what "a while" means
> >
> > but it is in the order to 2 to 3 days.
> >
> > ivtv0 warning: No Free Mailbox for cmd 0x00000060 after 100 tries!
> > ivtv0 warning: Mailbox[0] 0x00000060 flags 0x00000003
> > ivtv0 warning: Mailbox[1] 0x00000060 flags 0x00000003
> > ivtv0 warning: Firmware UNRESPONSIVE when trying cmd 0x00000060!!!
> > ivtv0-osd warning: Need to adjust to width 720 src_w 720 dst_w 720
> > src_x 0 dst_x 0
> > ivtv0-osd warning: Need to adjust to height 576 src_h 576 dst_h 576
> > src_y 0 dst_y 0
> > ivtv0-osd warning: Source video: Interlaced
> > ivtv0 warning: Enable video output
> >
> > Usually a reboot is needed before because the audio signal has been
> > lost from the mpeg file. When the audio breaks there is nothing
> > reported in the kernel log.
> >
> > Hardware is a Hauppauge PVR-350
> > Driver: version 0.4.0->0.4.5
> > Firmware encoder revision: 0x02050032
> > Firmware decoder revision: 0x02020023
> >
> >
> > TIA
> > Duncan
> >
> >
> > _______________________________________________
> > ivtv-devel mailing list
> > [email protected]
> > http://ivtvdriver.org/mailman/listinfo/ivtv-devel
> >
> >
>
>
>
> _______________________________________________
> ivtv-devel mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-devel
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel