將nativeSurfaceInit改為在surfaceChanged呼叫
This commit is contained in:
parent
2eca9c4860
commit
38b39c6d1d
@ -57,6 +57,10 @@ public class GstLibrary implements SurfaceHolder.Callback {
|
|||||||
nativePause();
|
nativePause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void releaseSurface() {
|
||||||
|
nativeSurfaceFinalize();
|
||||||
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
nativeFinalize();
|
nativeFinalize();
|
||||||
}
|
}
|
||||||
@ -119,13 +123,12 @@ public class GstLibrary implements SurfaceHolder.Callback {
|
|||||||
nativeClassInit();
|
nativeClassInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void surfaceChanged(SurfaceHolder holder, int format, int width,
|
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
|
||||||
int height) {
|
|
||||||
Log.d("GStreamer", "Surface changed to format " + format + " width " + width + " height " + height);
|
Log.d("GStreamer", "Surface changed to format " + format + " width " + width + " height " + height);
|
||||||
nativeSurfaceInit (holder.getSurface());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void surfaceCreated(SurfaceHolder holder) {
|
public void surfaceCreated(SurfaceHolder holder) {
|
||||||
|
nativeSurfaceInit (holder.getSurface());
|
||||||
Log.d("GStreamer", "Surface created: " + holder.getSurface());
|
Log.d("GStreamer", "Surface created: " + holder.getSurface());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user