This is :
- Mirroring using MediaCodec.
- It operates in the background. So, it does not stop to interrupt.
※ interrupt ? call, message, home button and so on.
Server
-
- get Bitmap using getDrawingCache().
-
- Bitmap to Byte[]
-
- Byte[] to Encoder
-
- get Byte[] (encoded data) from Encoder
-
- Transfer Byte[] to Client
Client
-
- Receive data from Server
-
- Received data to Byte[]
-
- Byte[] to Decoder
-
- Decoder to Surface
-
- Rendering with the Surface
However :
- It's not implemented layout.
- It's not encoded with the surface. So, need to RGB2YUV and NV21->NV12. Results in a low performance.
- Application Mirroring
- H.264 Encoding, Decoding
- It's not used MediaExtractor.
- Requires minimum API 16 (Android 4.1)
- Encoder : http://bigflake.com/mediacodec/