Hi,
RT,
I am a newbie in Android,
Someone know about how to use MJPEG hardware decoder in native code in android ?
I hope i can use middle software to invoke indirectly the hardware decoder also like in linux platform.
I know about that i can use gstreamer or libvpu directly in Linux platform.
also, i saw the configure file in /etc/media_codecs.xml, there is not "MJPEG" information, the MJPEG is not supported in "android_jb4.2.2_1.1.0-ga_image_6qsabresd" ?
Hi
Use OpenMax IL, this is a thin layer wrapping all codecs in Android. I am not a Android expert but I would start grepping for openmax strings under Android source folder.
Leo
Hi,
As you said i can use OpenMax IL, what's the component name of MJPEG HW decoder ?
i saw the source code of other chip like TI, it looks like bellow :
char *tComponentName[MAXCOMP][2] = {
/*video and image components */
{"OMX.TI.JPEG.decoder", "image_decoder.jpeg" },
about IMX6Q-SDB, what's the component name of MJPEG HW decoder ?
and which library i can use as the "libopenmax_il.so" in this board ?
If you go to Gallery and play a movie it will be accelerated.
If you see Gallery source code, you can learn the media player class (I really do not remember, if it´s media_player, movie_player, movie_start... something like that)
If you´re looking for implementing your own media player, you must use this "media player class", that should be hardware accelerated already.
What do you want to do?
I have no source code of android platform,
I use the OpenMax IL directly, some error is reported when i do (disable the port):
OMX_SendCommand (comp->handle, OMX_CommandPortDisable,
port->index, NULL);
if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (comp->parent,
"Failed to send enable/disable command to %s port %u: %s (0x%08x)",
comp->name, port->index, gst_omx_error_to_string (err), err);
goto done;
the error is "OMX_ErrorNotReady", what's something wrong about for this error about for VPU ?
Daiane, I have a related question. JPEG capture image ends up in the in Android imx6 CameraHAL (ics 4.0) JpegEncoderSoftware.cpp. JPEG encoder is called from DoEncode() method as follows:
return_val = jpeg_enc_init(obj_ptr);
...
return_val = jpeg_enc_encodeframe(obj_ptr, i_buff, y_buff, u_buff, v_buff);
From looking at Android.mk file in libcamera folder, it appears that the functions are in the following library: libfsl_jpeg_enc_arm11_elinux which is in the prebuilt folder device/fsl-proprietary/lib without the source code.
Is this api h/w accelerated? Also, theses jpeg_... api's don't seem to be documented anywhere, can you point me for the documentation?
A note: I'd expect that the api that should be used is from vpu library with vpu_... prefix.
Ok, thanks, i also research some ways to invoke the android codec, likes gstreamer project (sdk), it works on android without HW codec :smileysad:,
i check this method first, it's common in cross-platform, is it ?