[SailfishDevel] Camera flash control. Wired to Qt level or not?
Mohammed Hassan
mohammed.hassan at jollamobile.com
Sat Nov 16 15:55:31 UTC 2013
searchAndLock() should work as long as you are in a dark
place (that's what LED torch is for ;-))
and make sure the focus mode is set to fixed focus mode.
Good luck!
Cheers,
On Sat, Nov 16, 2013 at 05:35:47PM +0200, Artem Marchenko wrote:
> I used to work a little with GStreamer in the past, it wasn't much fun,
> though I was doing video processing, not just LED manipulation..
> Oh well, I try searchAndLock trick, if it doesn't work, I'll need to
> think if I am into diving to gstreamer or into waiting for the Torch
> API. Technically, waiting for Torch is correct probably, I am just
> driven by the opportunity to make the very first torch for Jolla :)
> Cheers,
> Artem.
>
> On Sat, Nov 16, 2013 at 5:28 PM, Mohammed Hassan
> <[1]mohammed.hassan at jollamobile.com> wrote:
>
> Hi Artem,
>
> On Sat, Nov 16, 2013 at 04:43:57PM +0200, Artem Marchenko wrote:
> > Thanks, Mohammed.
> >
> > I know that torch mode is not supported, but ON mode is. So my
> current
> > workaround idea is to make phone think it shoots video with flash
> mode
> > ON (ok, we can even shoot video for real if needed). Assumption is
> that
> > video + flash mode ON should make phone record video with light
> > constantly ON. Currently it doesn't work for me, maybe because
> > assumption is wrong or maybe I am just using some api the wrong way.
>
> It will not work that way. There is a special mode for torch light
> but it's
> not yet been implemented.
>
> > 2nd workaround idea is to make phone seekAndLock all the time
> causing
> > flash to be ON. That is likely to result in a multitude of short
> > flashes though.
>
> That can work but it will be slow "light bursts".
> A 3rd option would be going even below GSTreamer and Qt and talk to
> the camera HW directly.
> This is harder -trust me- and will tie you to the hardware.
> I am really sorry I don't have a solution for you :(
> I can only promise it will be available soon in an update.
> Cheers,
>
> > When you record video with the flash ON in a system camera app, does
> it
> > cause LED to have kith ON all the time?
> >
> > Artem.
> >
> > On Saturday, November 16, 2013, Mohammed Hassan wrote:
> >
> > Hi Artem,
> > On Sat, Nov 16, 2013 at 02:48:30PM +0200, Artem Marchenko wrote:
> > > Hi All
> > > *Context*
> > > I am trying to build a flashlight app, but the same question is
> > valid
> > > for any camera app that wants to shoot photos/videos in low
> > light.
> > > *The problem*
> > > I am trying to control LED flash by setting flash mode to ON (api
> > > confirms that ON mode is supported) and starting camera. Nothing
> > > happens. I also tried actually capturing photo, shooting video
> > and
> > > seekAndLocking. I don't have a device myself, but kind people on
> > IRC
> > > told that only two short LED flashes happen (during seeking for
> > focus
> > > probably).
> > > Could somebody, please, advise how to control flash in Sailfish
> > OS? Or
> > > maybe you could confirm that libhybris flash control just isn't
> > wired
> > > to Qt level?
> > This is unfortunately not supported.
> > The only flash modes supported now are: on, off or auto.
> > Torch light mode is not yet supported but I assure you it will come
> > in an update soon.
> > I am not that familiar with Qt but I know it's a limitation of the
> > layer underneath Qt.
> > The best you can do now is to wait for the phone itself and tinker
> > as you like and I am
> > sure you will manage to do it :-)
> > Cheers,
> > P.S. libhybris camera wrapper is not used by sailfish. It might or
> > might not work.
> > _______________________________________________
> > SailfishOS.org Devel mailing list
> >
> > --
> > Artem Marchenko
>
> > [1][2]http://agilesoftwaredevelopment.com
> > [2][3]http://twitter.com/AgileArtem
> >
> > References
> >
> > 1. [4]http://agilesoftwaredevelopment.com/
> > 2. [5]http://twitter.com/AgileArtem
>
> --
> Artem Marchenko
> [6]http://agilesoftwaredevelopment.com
> [7]http://twitter.com/AgileArtem
>
> References
>
> 1. mailto:mohammed.hassan at jollamobile.com
> 2. http://agilesoftwaredevelopment.com/
> 3. http://twitter.com/AgileArtem
> 4. http://agilesoftwaredevelopment.com/
> 5. http://twitter.com/AgileArtem
> 6. http://agilesoftwaredevelopment.com/
> 7. http://twitter.com/AgileArtem
More information about the Devel
mailing list