Camera selection doesn't work: it always returns the front camera

Bug #1535670 reported by David Barth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libhybris (Ubuntu)
Invalid
Undecided
Unassigned
webbrowser-app (Ubuntu)
New
Undecided
Unassigned

Bug Description

When testing webrtc sample apps, I noticed that the camera selection was not working.

For example: http://webrtc.github.io/samples/src/content/devices/input-output/

The selected camera is always the front camera.

Revision history for this message
David Barth (dbarth) wrote :

It seems there is a bug in that commit :
https://git.launchpad.net/~libhybris-maintainers/libhybris/+git/libhybris/commit/?id=9baee354fe513020aa2197b0b0769dd06a2585bc

+ if (ci.facing != camera_type)
+ continue;
+
+ return android_camera_connect_by_id(camera_id, listener);

The continue statement will branch to the end of the loop, on the return line, as opposed to skipping to the next loop iteration.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Huh? The continue skips to the end of the loop body, causing it to start the next iteration. The return line is not executed.

I've tested this on my device, and I can switch between both cameras in the browser. There is a bug in the browser though - it doesn't initialize the default camera in Oxide until you've changed the setting in the settings page.

Revision history for this message
David Barth (dbarth) wrote : Re: [Bug 1535670] Re: Camera selection doesn't work: it always returns the front camera

Hmm, fair enough. I was not sure of the exact semantic for continue after
reading http://en.cppreference.com/w/cpp/language/continue

Redirecting to webbrowser-app then.

On Tue, Jan 19, 2016 at 12:34 PM, Chris Coulson <<email address hidden>
> wrote:

> Huh? The continue skips to the end of the loop body, causing it to start
> the next iteration. The return line is not executed.
>
> I've tested this on my device, and I can switch between both cameras in
> the browser. There is a bug in the browser though - it doesn't
> initialize the default camera in Oxide until you've changed the setting
> in the settings page.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1535670
>
> Title:
> Camera selection doesn't work: it always returns the front camera
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/libhybris/+bug/1535670/+subscriptions
>

Changed in libhybris (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.