Hi,
We are developing an application to stream video from I.MX6Q Sabre board. We looking for APIs and sample code to utilize the VPU to do hardware encoding. Any pointer will be really appreciated.
Note: our application is a native Android app so we will need C/C++ api. Many Thanks.
-- Li
Hi Li,
If you want to use VPU encoding from your application with raw video stream, then check this sample program at Freescale Android source code
external/linux-test/test/mxc_vpu_test/
Let me clarify the question:
We would like to use i.MX hardware encoding capabilities from a user-space program, compiled with the NDK. Do you have any API (public or private) for using i.MX hardware video encoder from the user-space? The VPU API described in the above document requires physical addresses, does not provide any way to convert from virtual to physical addresses, and thus cannot be used from a normal NDK app.
We use this API with Gstreamer plug-in in Linux and there is no specific API for user-space.
Do you use Android?
Yes, we are building an native Android app using Android NDK. Any suggestion on how we can utilize the VPU to do hardware encoding on Android? Many thanks.
Under Android, Freescale already did it on our Android release BSP.
You can choose Google default decoder or Freescale VPU decoder by the config files.
More details you can refer to our Android release document.
We want to do "encoding" on VPU, not decoding. Does Freescale's Android BSP include an encoding API? Thanks again.
Yes, we have both decoding and encoding VPU API. But in our Android release, we already packaged all the API calling to a wrapper layer.
Under Android, the media service will call our OMXPlayer and then OMXPlayer will call the wrapper.
If you develop you application base on our Android release, it will call the VPU.
Hi Qingrong Jiang,
I'm finding how to use VPU API in Android.
I could see your comments for the API callng to a wrapper layer using OMXPlaher.
Could you inform me how to use VPU API in Android in details?
It's very helpful if you give me the reference documents for this.
Best Regards,
Eric.
Under Android, you no need call VPU API directly. You only need call the Android media service, it will call VPU in HAL layer.
Hi Hi Qingrong Jiang,
Thanks for your response.
Actually I didn't family with Android.
Could you tell me how to call the Android media service for details?
Please give me any guidance if you have.
It's very helpful to me.
Best Regards,
Eric.
You can find it from google document. This is application level API. I'm also not familiar about it.
Hi Qingrong Jiang,
Thanks for your response.
I could find the Android standard API like as Media Framework.
http://developer.android.com/reference/android/media/package-summary.html
We will use this Media Framework to make the Android MediaPlayer/MediaRecorder.
I think it's helpful to me.
Best Regards,
Eric.