droidmediacodec: Create separate functions for creating decoders and encoders.

And also use a different meta data class for each that inherits a common parent.

The logic for both is slightly different