void setVideoRenderTimingMode(VideoRenderTimingMode mode) {
        if(mPlaybackThread != null) {
            throw new IllegalStateException("called after prepare/prepareAsync");
        }
        if(mode == VideoRenderTimingMode.SURFACEVIEW_TIMESTAMP_API21 && Build.VERSION.SDK_INT < 21) {
            throw new IllegalArgumentException("this mode needs min API 21");
        }
        Log.d(TAG, "setVideoRenderTimingMode " + mode);
        mVideoRenderTimingMode = mode;
    }
Sets the timing mode for video frame rendering.
This only works before the calling {@link #prepare()} or {@link #prepareAsync()}.

This method is only needed for the special case of rendering the video to a GL surface texture,
where {@link MediaCodec#releaseOutputBuffer(int, long)} does not defer the frame rendering
and thus does not block until the PTS is reached. This only seems to work correctly on a
{@link android.view.SurfaceView}. It is therefore required to manually set the
{@link VideoRenderTimingMode#SLEEP} mode on API 21+ platforms to get timed frame rendering.

TODO find out how to get deferred/blocking rendering to work with a surface texture

@see VideoRenderTimingMode
@param mode the desired timing mode
@throws IllegalStateException
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaPlayer.java