Qt Multimedia status on Android
BogDan
bog_dan_ro at yahoo.com
Mon May 7 16:36:36 UTC 2012
Hi George,
Yes, I have something but is a complete mess, I hope you can find something useful in it.
I think you misunderstand me in that mail, what I tried to say that the android is doing conversion form YUV to RGB for you, and it seem is doing it very fast, the problem was how to get that image from that texture back to main memory very fast, that why I'm trying another approach which I tried to describe it in this [1] mail, basically instead to read the texture from graphics memory, I'd like to push the TLW images to the graphics memory, but before I'll start the work, I'm waiting for some people who know OpenGL to take a look to it and review the idea.
Cheers,
BogDan.
[1] http://mail.kde.org/pipermail/necessitas-devel/2012-May/000913.html
>________________________________
> From: George Tavares <tavares.george at gmail.com>
>To: BogDan <bog_dan_ro at yahoo.com>
>Sent: Monday, May 7, 2012 2:48 PM
>Subject: Re: Qt Multimedia status on Android
>
>
>Yes, you can share it.
>
>I didn't send to list because the attachment.
>
>BogDan, in your first email, you talk about SurfaceTextureClient and ISurfaceTexture . Did you have any kind of poc of this to I try use my shader code?
>
>On Sun, 2012-05-06 at 02:21 -0700, BogDan wrote:
>Hi,
>
>>
>>
>I'll look at your code next week.
>
>>
>>
>Many thanks.
>
>>
>>
>Cheers,
>BogDan..
>
>>
>>
>P.S. Is ok with your to share your findings with the community (forward your message to necessitas-devel mailing list) ?
>>
>>
>
>>
>>
>
>>>________________________________
>>>
>>>From:George Tavares <tavares.george at gmail.com>
>>>To:BogDan <bog_dan_ro at yahoo.com>
>>>Sent:Friday, May 4, 2012 3:23 PM
>>>Subject:Re: Qt Multimedia status on Android
>>>
>>>
>
>>>
>Hello BogDan
>>>
>>>I am sending my code attached. To use my code you must replace your industrius QtCamara.java with mine, supplied in industrius_patch's folder.
>>>
>>>I read your complains about surface, but I think that is possible use this code in non-gl widget, because I get glcontext using QGLContext::currentContext() . This functions always will be true, even for non gl widgets, if libandroidGL-X.so is loaded.
>>>
>>>After I get context, I applied the world transform to position de opengl draw to correct position. No TLW is necessary to do that.
>>>
>>>The shader is write by myself. The paint method and world transform is based in libqmlshaderplugin.
>>>
>>>I hope that you can run my sample. If you any problem contact me.
>>>
>>>
>>>
>>>On Fri, 2012-05-04 at 00:38 -0700, BogDan wrote:
>>>Hello George, >________________________________
> From: George Tavares <tavares.george at gmail.com>
>To: necessitas-devel at kde.org >Sent: Thursday, May 3, 2012 11:13 PM
>Subject: Re: Qt Multimedia status on Android
>
>
>Hello BogDan
>
>I am making some work with android multimedia too, but in Camera support and I make some progress that I can share with you.
> Maybe we should join forces ?:) >
>I started with QtCamera.java/androidcamjni.cpp available in your sdk, and tried direct render the image previews received in androidcamjni.cpp to a QDeclarativeItem. The performance was not good.
>
>I look in QtCamera.java and saw that frames are encoded to jpeg , and later loaded to QImage, I decided elimate this step, sending the bytearrey of preview direct to CPP side and use a Method from Ketai project! (decodeYUV420SP) to decode frame. After running, it continue slow.
> :) >
>However, I am running qt with opengl enabled, then I decided upload YUV frame like a texture and make de YUV decode in a shader. It now it is fast. I can't see differences in my camera support (800x600) and the camera from Android application.
>
>I have only one problem implementing the shader. the YUV format appears like that:
>YYYYYYYYY
>UVUV
>
>When I tried to load this like textures, I choose first load in two textures, one with Y component of type GL_LUMINANCE and other with UV component with a type GL_LUMINANCE_ALPHA . In fragment shader I tried load these components but the GL_LUMINANCE_ALPHA has some kind of bug that the components are not load correctly. Then I decided to unscramble the image in this format:
>YYYYYYYYY
>UUVV
>
>Then I load the U and V texture separately.
> Great, can you please share with us the shader sources ? As I sad I already have the texture, the problem is how to display it on a non-gl widget ...
Using OpenGL for rendering everything it can be a solution but sadly on android we are limited to a single windowsurface, so the UI is (extremely) limited to a single Top Level Widget, this means you can't use controls which needs another TLW
(e.g. dialog, combobox, etc.). Check http://code.google.com/p/android-lighthouse/issues/detail?id=4#c24 for more informations. Thanks, Cheers,
BogDan. P.S. Please join the mailing list to https://mail.kde.org/mailman/listinfo/necessitas-devel
_______________________________________________
Necessitas-devel mailing list Necessitas-devel at kde.org https://mail.kde.org/mailman/listinfo/necessitas-devel
>>>
>>>
>
>>>
>>>
>>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20120507/6a8391a0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nativeCamera.tar.bz2
Type: application/octet-stream
Size: 5672893 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/necessitas-devel/attachments/20120507/6a8391a0/attachment-0001.obj>
More information about the Necessitas-devel
mailing list