How to make androidmedia support direct output on surface
Matthew Waters
ystreet00 at gmail.com
Tue Jan 10 14:37:43 UTC 2017
On 09/01/17 23:59, lucky chou wrote:
> Hi,
> As far as I know, it seems that androidmedia plugin can only use OpenGL
> output video, right?
> I hope similar to nuplayer, Video frame be displayed on surface which is
> passed down by MediaPlayer, how to do it?
> AMediaCodec_configure (codec,format, surface,
> NULL, flags)
>
> Because in some devices, especially on TV device,
> direct surface output video usually has hardware acceleration.
androidmedia can currently only use OpenGL for accelerated video
display, yes. It uses the SurfaceTexture API to retrieve the OpenGL
texture to render the resulting video frame to the screen.
The other possibility (that's not currently implemented) is to pass a
SurfaceView based Surface into MediaCodec for decoding to render the
resulting video frames. To do so, one would need a special sink element
as well as modifications to the androidmedia decoder to allow setting
the Surface from outside. All doable though :)
Cheers
-Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 516 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170111/32827347/attachment.sig>
More information about the gstreamer-devel
mailing list