packaging the media againt,based in the media lifecycle and jni