v4l2 Doesn't Stop After Device Removed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

v4l2 Doesn't Stop After Device Removed

caseyzahorik
Versions: 1.10.2 and 10.8.3

Pipeline: gst-launch-1.0 v4l2src device=/dev/video0 ! fakesink

Problem: When the usb device providing the video for /dev/video0 is unplugged, gstreamer doesn't crash or detect the device has been unplugged and stop. This causes the device, when plugged back in, to re-enumerate as another device instead of having the same path as before.

This is not a problem when using older versions of gstreamer. I have tried it on 1.2 and 1.4, both work as expected. Though i don't think a good solution here is to have to downgrade and never be able to update to newer versions. So i was hoping there was some flag i was missing or something in the newer versions that i could change to resolve this issue.

Thanks for your assistance,
Casey
Reply | Threaded
Open this post in threaded view
|

Re: v4l2 Doesn't Stop After Device Removed

Nicolas Dufresne-5
Please, file a bug on bugs.gnome.org and we'll look into that together. GStreamer should eventually produce an error and release the device. Otherwise it's a bug. Though, if you plug and unplug very quickly, the device rename  will occur, this is how Linux works.

Le 14 janv. 2017 5:13 AM, "caseyzahorik" <[hidden email]> a écrit :
Versions: 1.10.2 and 10.8.3

Pipeline: gst-launch-1.0 v4l2src device=/dev/video0 ! fakesink

Problem: When the usb device providing the video for /dev/video0 is
unplugged, gstreamer doesn't crash or detect the device has been unplugged
and stop. This causes the device, when plugged back in, to re-enumerate as
another device instead of having the same path as before.

This is not a problem when using older versions of gstreamer. I have tried
it on 1.2 and 1.4, both work as expected. Though i don't think a good
solution here is to have to downgrade and never be able to update to newer
versions. So i was hoping there was some flag i was missing or something in
the newer versions that i could change to resolve this issue.

Thanks for your assistance,
Casey



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/v4l2-Doesn-t-Stop-After-Device-Removed-tp4681449.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2 Doesn't Stop After Device Removed

caseyzahorik
This post was updated on .
Not sure if i care to go through all that for something i need done in a few days. I was hoping it was just something i was missing. I'll just downgrade to a way older version that actually functions. Also yes Linux does work that way, however it should be able to detect it has been unplugged within a minute (which it does but gst doesn't). If gst were to have release the file descriptor (or whatever it keeps it open with) then Linux would not have to re-enumerate the device as it would detect it's the same one as before (vs it thinking it's a duplicate now) and there would be no problems.

edit: I caved Bug 777354
Reply | Threaded
Open this post in threaded view
|

Re: v4l2 Doesn't Stop After Device Removed

Dimitrios Katsaros
Well you don't need to resolve the problem on your own. However, filing the bug in bugzilla helps the developers identify what problems users are having and having someone with testing knowledge can help in verifying that a problem has been resolved. At the end of the day this is a project that you are using and will possibly find yourself using in the future as well. So even doing the bare minimal can make a difference :)

On Mon, Jan 16, 2017 at 8:39 PM, caseyzahorik <[hidden email]> wrote:
Not sure if i care to go through all that for something i need done in a few
days. I was hoping it was just something i missing. I'll just downgrade to a
way older version that actually functions.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/v4l2-Doesn-t-Stop-After-Device-Removed-tp4681449p4681479.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2 Doesn't Stop After Device Removed

Nicolas Dufresne-5
Le mardi 17 janvier 2017 à 09:35 +0100, Dimitrios Katsaros a écrit :
> Well you don't need to resolve the problem on your own. However,
> filing the bug in bugzilla helps the developers identify what
> problems users are having and having someone with testing knowledge
> can help in verifying that a problem has been resolved. At the end of
> the day this is a project that you are using and will possibly find
> yourself using in the future as well. So even doing the bare minimal
> can make a difference :)

That is true, and thanks for filing a bug. Also, note that as Arun
replied, it worked for him. If developers can't reproduce the issue you
get, it's hard for us to actually figure-out a fix for it.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment