|
|
@ -95,12 +95,11 @@ public class TextureMediaEncoder extends VideoMediaEncoder<TextureConfig> { |
|
|
|
mTransformRotation = mConfig.rotation; |
|
|
|
mTransformRotation = mConfig.rotation; |
|
|
|
mConfig.rotation = 0; |
|
|
|
mConfig.rotation = 0; |
|
|
|
super.onPrepare(controller, maxLengthMillis); |
|
|
|
super.onPrepare(controller, maxLengthMillis); |
|
|
|
mIssue514Workaround = new Issue514Workaround(mConfig.textureId, mConfig.width, mConfig.height); |
|
|
|
mIssue514Workaround = new Issue514Workaround(mConfig.textureId); |
|
|
|
mEglCore = new EglCore(mConfig.eglContext, EglCore.FLAG_RECORDABLE); |
|
|
|
mEglCore = new EglCore(mConfig.eglContext, EglCore.FLAG_RECORDABLE); |
|
|
|
mWindow = new EglWindowSurface(mEglCore, mSurface, true); |
|
|
|
mWindow = new EglWindowSurface(mEglCore, mSurface, true); |
|
|
|
mWindow.makeCurrent(); |
|
|
|
mWindow.makeCurrent(); |
|
|
|
mViewport = new EglViewport(); |
|
|
|
mViewport = new EglViewport(); |
|
|
|
mIssue514Workaround.onStart(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@EncoderThread |
|
|
|
@EncoderThread |
|
|
@ -127,6 +126,7 @@ public class TextureMediaEncoder extends VideoMediaEncoder<TextureConfig> { |
|
|
|
// First, drain any previous data.
|
|
|
|
// First, drain any previous data.
|
|
|
|
LOG.i("onEvent", "frameNumber:", mFrameNumber, "timestamp:", frame.timestamp, "- draining."); |
|
|
|
LOG.i("onEvent", "frameNumber:", mFrameNumber, "timestamp:", frame.timestamp, "- draining."); |
|
|
|
drainOutput(false); |
|
|
|
drainOutput(false); |
|
|
|
|
|
|
|
mIssue514Workaround.onStart(); |
|
|
|
|
|
|
|
|
|
|
|
// Then draw on the surface.
|
|
|
|
// Then draw on the surface.
|
|
|
|
LOG.i("onEvent", "frameNumber:", mFrameNumber, "timestamp:", frame.timestamp, "- drawing."); |
|
|
|
LOG.i("onEvent", "frameNumber:", mFrameNumber, "timestamp:", frame.timestamp, "- drawing."); |
|
|
|