public class ScreenPusher
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ScreenPusher.VideoSourceTextureListener |
Modifier and Type | Field and Description |
---|---|
private static int |
DISPLAY_FLAGS |
private long |
mBaseWallTime |
private android.media.projection.MediaProjection |
mediaProjection |
private android.media.projection.MediaProjection.Callback |
mediaProjectionCallback |
private android.media.projection.MediaProjectionManager |
mediaProjectionManager |
private android.content.Intent |
mediaProjectionPermissionResultData |
private long |
mLastCaptureTime |
private int |
mLastFpsCounter |
private android.graphics.SurfaceTexture.OnFrameAvailableListener |
mOnFrameAvailableListener |
private ScreenVideoParam |
mParam |
private boolean |
mPause |
private long |
mStartElapsedTime |
private android.view.Surface |
mSurface |
private android.graphics.SurfaceTexture |
mSurfaceTexture |
private ScreenPusher.VideoSourceTextureListener |
mVideoSourceTextureListener |
private static java.lang.String |
TAG |
private int |
TIME_MILLISECOND |
private int |
VIRTUAL_DISPLAY_DPI |
private android.hardware.display.VirtualDisplay |
virtualDisplay |
Constructor and Description |
---|
ScreenPusher() |
Modifier and Type | Method and Description |
---|---|
private void |
createVirtualDisplay() |
void |
destroy() |
void |
getTransformMatrix(float[] matrix) |
void |
init(int source,
int width,
int height,
int fps,
int rotation,
android.content.Intent mediaProjectionPermissionResultData,
android.content.Context applicationContext) |
void |
setVideoSourceTextureListener(ScreenPusher.VideoSourceTextureListener listener) |
void |
start(int surfaceId) |
void |
stop() |
int |
updateTexImage() |
private static final java.lang.String TAG
private ScreenVideoParam mParam
private android.view.Surface mSurface
private static final int DISPLAY_FLAGS
private int VIRTUAL_DISPLAY_DPI
private final int TIME_MILLISECOND
private android.content.Intent mediaProjectionPermissionResultData
private android.media.projection.MediaProjection.Callback mediaProjectionCallback
private android.hardware.display.VirtualDisplay virtualDisplay
private android.graphics.SurfaceTexture mSurfaceTexture
private android.media.projection.MediaProjection mediaProjection
private android.media.projection.MediaProjectionManager mediaProjectionManager
private ScreenPusher.VideoSourceTextureListener mVideoSourceTextureListener
private long mBaseWallTime
private long mStartElapsedTime
private boolean mPause
private long mLastCaptureTime
private int mLastFpsCounter
private android.graphics.SurfaceTexture.OnFrameAvailableListener mOnFrameAvailableListener
public void init(int source, int width, int height, int fps, int rotation, android.content.Intent mediaProjectionPermissionResultData, android.content.Context applicationContext)
public void start(int surfaceId) throws java.lang.Exception
java.lang.Exception
private void createVirtualDisplay()
public void stop()
public void destroy()
public void setVideoSourceTextureListener(ScreenPusher.VideoSourceTextureListener listener)
public int updateTexImage()
public void getTransformMatrix(float[] matrix)