Skip to content

Commit 64ea00c

Browse files
authored
Update Egloo (deepmedia#57)
1 parent b6cd4f2 commit 64ea00c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3434
androidTestImplementation 'org.mockito:mockito-android:2.28.2'
3535

36-
api 'com.otaliastudios.opengl:egloo:0.2.3'
36+
api 'com.otaliastudios.opengl:egloo:0.4.0'
3737
api "androidx.annotation:annotation:1.1.0"
3838
}
3939

lib/src/main/java/com/otaliastudios/transcoder/transcode/internal/VideoDecoderOutput.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import com.otaliastudios.opengl.draw.GlRect;
1212
import com.otaliastudios.opengl.program.GlTextureProgram;
13+
import com.otaliastudios.opengl.texture.GlTexture;
1314
import com.otaliastudios.transcoder.internal.Logger;
1415

1516
/**
@@ -50,14 +51,16 @@ public class VideoDecoderOutput {
5051
* new one). Creates a Surface that can be passed to MediaCodec.configure().
5152
*/
5253
public VideoDecoderOutput() {
54+
GlTexture texture = new GlTexture();
5355
mProgram = new GlTextureProgram();
56+
mProgram.setTexture(texture);
5457
mDrawable = new GlRect();
5558

5659
// Even if we don't access the SurfaceTexture after the constructor returns, we
5760
// still need to keep a reference to it. The Surface doesn't retain a reference
5861
// at the Java level, so if we don't either then the object can get GCed, which
5962
// causes the native finalizer to run.
60-
mSurfaceTexture = new SurfaceTexture(mProgram.getTextureId());
63+
mSurfaceTexture = new SurfaceTexture(texture.getId());
6164
mSurfaceTexture.setOnFrameAvailableListener(new SurfaceTexture.OnFrameAvailableListener() {
6265
@Override
6366
public void onFrameAvailable(SurfaceTexture surfaceTexture) {

0 commit comments

Comments
 (0)