After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 107296 - [PATCH] v4l doesn't close device on failure and fails to quickly
[PATCH] v4l doesn't close device on failure and fails to quickly
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.6.x
Assigned To: Ronald Bultje
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-28 21:20 UTC by Sjoerd Simons
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gstv4lelement (1.83 KB, patch)
2003-02-28 21:21 UTC, Sjoerd Simons
none Details | Review
something like this (2.90 KB, patch)
2003-03-01 12:32 UTC, Ronald Bultje
none Details | Review

Description Sjoerd Simons 2003-02-28 21:20:29 UTC
When v4lelement changes state from NULL to READY and it fails the video
device is kept open. 

Also when setting an audio options fails, NULL to READY is declared as a
failure. Unfortunely the pwc driver says it has a audio device, but returns
a failure on all audio options one tries to set. Because of this the v4l
plugin  
doesn't work at all with a philips webcam.

The patch fixes the first issue and works around the second
Comment 1 Sjoerd Simons 2003-02-28 21:21:43 UTC
Created attachment 14699 [details] [review]
patch for gstv4lelement
Comment 2 Ronald Bultje 2003-03-01 12:26:51 UTC
I don't like that audio part - why does the webcam driver say it has
an audio device at all if it doesn't? That sounds like a driver bug.

It's better to not set the audio properties at all... making
gstv4lelement->mute a gint8 and setting it to default -1 is a good way
of doing this. How about that?
Comment 3 Ronald Bultje 2003-03-01 12:32:13 UTC
Created attachment 14709 [details] [review]
something like this
Comment 4 Sjoerd Simons 2003-03-01 12:55:37 UTC
> why does the webcam driver say it has
>an audio device at all if it doesn't? That sounds like a driver bug.

I already e-mailed the author about that. The webcam has a mic, but it
is not accessible through the v4l api. According to him the flag is 
informational only and in the future it will be possible to ask to
which audio device it is coupled.. 

Your patch works fine and is indeed a better solution to the problem
Comment 5 Ronald Bultje 2003-03-01 13:13:29 UTC
(patch applied to CVS/HEAD, please reopen if something's still wrong).

-edit- concerning the driver, the driver author is wrong (imho). In
v4l2, these flags are partly informational (there's an additional
syscall for per-input audio information). In v4l1, the flag informs
applications that the driver can do sound. In both cases, if the v4l
api is not used for sound, it shouldn't say it has sound. v4l will
never include information about which device does sound, since that's
outside the scope of v4l (and system-specific).

Informational doesn't mean "show me how cool my cam is", it means
"give information to the application what features the cam provides
over this API".
Comment 6 Sjoerd Simons 2003-03-01 13:25:45 UTC
I agree with you on the driver part, but i don't feel like argueing
with   it's author ;)