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