linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* v4l error on stretch c2
@ 2019-04-11  6:16 Carl Karsten
  2019-04-11 15:25 ` Carl Karsten
  0 siblings, 1 reply; 4+ messages in thread
From: Carl Karsten @ 2019-04-11  6:16 UTC (permalink / raw)
  To: linux-amlogic

I'm getting errors reading a uvc video stream:

Linux odroid3 4.19.20-meson64 #5.75 SMP PREEMPT Fri Feb 8 10:08:40 CET
2019 aarch64 GNU/Linux

 gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
error: XDG_RUNTIME_DIR not set in the environment.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
not read from resource.
Additional debug info:
gstv4l2bufferpool.c(1058): gst_v4l2_buffer_pool_poll ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Invalid argument (22)
Execution ended after 0:00:18.608430528
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

 gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
'/dev/hdmi2usb/by-num/all0/video' is not a capture device.
Additional debug info:
v4l2_calls.c(633): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x4a00000
Setting pipeline to NULL ...
Freeing pipeline ...

--
Carl K

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l error on stretch c2
  2019-04-11  6:16 v4l error on stretch c2 Carl Karsten
@ 2019-04-11 15:25 ` Carl Karsten
  2019-04-11 17:27   ` Nicolas Dufresne
  0 siblings, 1 reply; 4+ messages in thread
From: Carl Karsten @ 2019-04-11 15:25 UTC (permalink / raw)
  To: linux-amlogic

Hmm, it magically fixed itself. maybe.
even after a reboot.

here is baseline of what works when the v4l device was erroring:

More info:
https://www.armbian.com/odroid-c2/ Stretch

modprobe vivid
dmesg
[33294.994948] vivid-000: V4L2 capture device registered as video3

root@odroid3:~# gst-launch-1.0 v4l2src device=/dev/video3 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

(no error)






On Thu, Apr 11, 2019 at 1:16 AM Carl Karsten <carl@nextdayvideo.com> wrote:
>
> I'm getting errors reading a uvc video stream:
>
> Linux odroid3 4.19.20-meson64 #5.75 SMP PREEMPT Fri Feb 8 10:08:40 CET
> 2019 aarch64 GNU/Linux
>
>  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> error: XDG_RUNTIME_DIR not set in the environment.
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
> not read from resource.
> Additional debug info:
> gstv4l2bufferpool.c(1058): gst_v4l2_buffer_pool_poll ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> poll error 1: Invalid argument (22)
> Execution ended after 0:00:18.608430528
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
>  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> '/dev/hdmi2usb/by-num/all0/video' is not a capture device.
> Additional debug info:
> v4l2_calls.c(633): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Capabilities: 0x4a00000
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> --
> Carl K



-- 
Carl K

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l error on stretch c2
  2019-04-11 15:25 ` Carl Karsten
@ 2019-04-11 17:27   ` Nicolas Dufresne
  2019-04-11 18:08     ` Carl Karsten
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dufresne @ 2019-04-11 17:27 UTC (permalink / raw)
  To: Carl Karsten, linux-amlogic


[-- Attachment #1.1: Type: text/plain, Size: 2755 bytes --]

Le jeudi 11 avril 2019 à 10:25 -0500, Carl Karsten a écrit :
> Hmm, it magically fixed itself. maybe.
> even after a reboot.

You should have capture the kernel logs after the error. We still have
very fragile camera firmware around which Gst probing endup crashing
right before we start capturing. I have drastically reduced the number
of ioctl we do to reach capture state, which solves some of the
firmware crash issue fully or partially, I'm not sure what Gst version
you are on, but it's always worth trying a newer version.

In your code, if you catch an V4L2 error, then most of the time you
just have to wait between 15 and 30s before retrying while uvc driver
is resetting the camera.

> 
> here is baseline of what works when the v4l device was erroring:
> 
> More info:
> https://www.armbian.com/odroid-c2/ Stretch
> 
> modprobe vivid
> dmesg
> [33294.994948] vivid-000: V4L2 capture device registered as video3
> 
> root@odroid3:~# gst-launch-1.0 v4l2src device=/dev/video3 ! fakesink
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> (no error)
> 
> 
> 
> 
> 
> 
> On Thu, Apr 11, 2019 at 1:16 AM Carl Karsten <carl@nextdayvideo.com> wrote:
> > I'm getting errors reading a uvc video stream:
> > 
> > Linux odroid3 4.19.20-meson64 #5.75 SMP PREEMPT Fri Feb 8 10:08:40 CET
> > 2019 aarch64 GNU/Linux
> > 
> >  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> > error: XDG_RUNTIME_DIR not set in the environment.
> > Setting pipeline to PAUSED ...
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
> > not read from resource.
> > Additional debug info:
> > gstv4l2bufferpool.c(1058): gst_v4l2_buffer_pool_poll ():
> > /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> > poll error 1: Invalid argument (22)
> > Execution ended after 0:00:18.608430528
> > Setting pipeline to PAUSED ...
> > Setting pipeline to READY ...
> > Setting pipeline to NULL ...
> > Freeing pipeline ...
> > 
> >  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> > Setting pipeline to PAUSED ...
> > ERROR: Pipeline doesn't want to pause.
> > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> > '/dev/hdmi2usb/by-num/all0/video' is not a capture device.
> > Additional debug info:
> > v4l2_calls.c(633): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> > Capabilities: 0x4a00000
> > Setting pipeline to NULL ...
> > Freeing pipeline ...
> > 
> > --
> > Carl K
> 
> 

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l error on stretch c2
  2019-04-11 17:27   ` Nicolas Dufresne
@ 2019-04-11 18:08     ` Carl Karsten
  0 siblings, 0 replies; 4+ messages in thread
From: Carl Karsten @ 2019-04-11 18:08 UTC (permalink / raw)
  To: Nicolas Dufresne; +Cc: linux-amlogic

I don't think I saw anything in dmesg, is that where kernel logs would be?

and it is working.  except I think it is maxing out a cpu core.

On Thu, Apr 11, 2019 at 12:27 PM Nicolas Dufresne <nicolas@ndufresne.ca> wrote:
>
> Le jeudi 11 avril 2019 à 10:25 -0500, Carl Karsten a écrit :
> > Hmm, it magically fixed itself. maybe.
> > even after a reboot.
>
> You should have capture the kernel logs after the error. We still have
> very fragile camera firmware around which Gst probing endup crashing
> right before we start capturing. I have drastically reduced the number
> of ioctl we do to reach capture state, which solves some of the
> firmware crash issue fully or partially, I'm not sure what Gst version
> you are on, but it's always worth trying a newer version.
>
> In your code, if you catch an V4L2 error, then most of the time you
> just have to wait between 15 and 30s before retrying while uvc driver
> is resetting the camera.
>
> >
> > here is baseline of what works when the v4l device was erroring:
> >
> > More info:
> > https://www.armbian.com/odroid-c2/ Stretch
> >
> > modprobe vivid
> > dmesg
> > [33294.994948] vivid-000: V4L2 capture device registered as video3
> >
> > root@odroid3:~# gst-launch-1.0 v4l2src device=/dev/video3 ! fakesink
> > Setting pipeline to PAUSED ...
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> >
> > (no error)
> >
> >
> >
> >
> >
> >
> > On Thu, Apr 11, 2019 at 1:16 AM Carl Karsten <carl@nextdayvideo.com> wrote:
> > > I'm getting errors reading a uvc video stream:
> > >
> > > Linux odroid3 4.19.20-meson64 #5.75 SMP PREEMPT Fri Feb 8 10:08:40 CET
> > > 2019 aarch64 GNU/Linux
> > >
> > >  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> > > error: XDG_RUNTIME_DIR not set in the environment.
> > > Setting pipeline to PAUSED ...
> > > Pipeline is live and does not need PREROLL ...
> > > Setting pipeline to PLAYING ...
> > > New clock: GstSystemClock
> > > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
> > > not read from resource.
> > > Additional debug info:
> > > gstv4l2bufferpool.c(1058): gst_v4l2_buffer_pool_poll ():
> > > /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> > > poll error 1: Invalid argument (22)
> > > Execution ended after 0:00:18.608430528
> > > Setting pipeline to PAUSED ...
> > > Setting pipeline to READY ...
> > > Setting pipeline to NULL ...
> > > Freeing pipeline ...
> > >
> > >  gst-launch-1.0 v4l2src device=/dev/hdmi2usb/by-num/all0/video ! fakesink
> > > Setting pipeline to PAUSED ...
> > > ERROR: Pipeline doesn't want to pause.
> > > ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
> > > '/dev/hdmi2usb/by-num/all0/video' is not a capture device.
> > > Additional debug info:
> > > v4l2_calls.c(633): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> > > Capabilities: 0x4a00000
> > > Setting pipeline to NULL ...
> > > Freeing pipeline ...
> > >
> > > --
> > > Carl K
> >
> >



-- 
Carl K

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-11 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11  6:16 v4l error on stretch c2 Carl Karsten
2019-04-11 15:25 ` Carl Karsten
2019-04-11 17:27   ` Nicolas Dufresne
2019-04-11 18:08     ` Carl Karsten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).