public class VideoPusher
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
VideoPusher.VideoSourceListener |
static interface |
VideoPusher.VideoSourceTextureListener |
限定符和类型 | 字段和说明 |
---|---|
private float |
ACCEL_DELTA_DIFF |
private float |
ACCEL_DELTAXYZ_DIFF |
private static byte[] |
buffer |
private static byte[] |
buffer1 |
private static byte[] |
buffer2 |
private float |
INITIATE_VALUE |
private android.hardware.Sensor |
mAccelSensor |
private float |
MAG_DELTA_DIFF |
private boolean |
mAutoFocus |
private boolean |
mAutoFocusing |
private long |
mBaseWallTime |
private int |
mBelowMinFpsNumberTimes |
private android.hardware.Camera |
mCamera |
private int |
mCurrentFps |
private int |
mCustomRotation |
private int |
mDataOrientation |
private boolean |
mFlashOn |
private static int |
MIN_CAP_RESOLUTION |
private long |
mLastCaptureTime |
private int |
mLastFpsCounter |
private long |
mLastFpsCountTime |
private float |
mLastXAccel |
private float |
mLastXMag |
private float |
mLastYAccel |
private float |
mLastYMag |
private float |
mLastZAccel |
private float |
mLastZMag |
private android.hardware.Sensor |
mMagneticSensor |
private android.graphics.SurfaceTexture.OnFrameAvailableListener |
mOnFrameAvailableListener |
private int |
mOrientation |
private VideoParam |
mParam |
private boolean |
mPause |
private android.hardware.Camera.PreviewCallback |
mPreviewCallback |
private boolean |
mPreviewRunning |
private int |
mScreen |
private android.hardware.SensorEventListener |
mSensorEventListener |
private boolean |
mSensorFocus |
private android.hardware.SensorManager |
mSensorManager |
private long |
mStartElapsedTime |
private boolean |
mSurfaceCbMode |
private android.graphics.SurfaceTexture |
mSurfaceTexture |
private int |
mSurfaceTextureId |
private boolean |
mSwitchCamera |
private VideoPusher.VideoSourceListener |
mVideoSourceListener |
private VideoPusher.VideoSourceTextureListener |
mVideoSourceTextureListener |
private static int |
SCREEN_LANDSCAPE_LEFT |
private static int |
SCREEN_LANDSCAPE_RIGHT |
private static int |
SCREEN_PORTRAIT |
private static java.util.List<java.lang.Integer> |
sSupportedFormat |
private static java.util.Map<java.lang.Integer,java.util.List<android.hardware.Camera.Size>> |
sSupportedResolutionMap |
private static int |
supportMaxWH |
private static java.lang.String |
TAG |
private int |
TIME_MILLISECOND |
构造器和说明 |
---|
VideoPusher() |
限定符和类型 | 方法和说明 |
---|---|
private void |
cameraAutoFocus() |
void |
destroy() |
int |
getCurrentExposure() |
int |
getCurrentFps() |
int |
getCurrentZoom() |
long |
getLastCaptureTime() |
int |
getMaxExposure() |
int |
getMaxZoom() |
int |
getMinExposure() |
static java.util.List<java.lang.Integer> |
getSupportedFormats() |
static java.util.List<android.hardware.Camera.Size> |
getSupportedResolutions(int source) |
void |
getTransformMatrix(float[] matrix) |
void |
init(int source,
int width,
int height,
int fps,
int rotation,
int customRotation,
boolean surfaceCBMode,
boolean focusBySensor,
android.content.Context context) |
private boolean |
isHasPermission() |
boolean |
isPreviewRunning() |
boolean |
isSupportAutoFocus() |
boolean |
isSupportFlash() |
void |
pause(boolean useEmptyData) |
private void |
preparePublisher(int pushWidth,
int pushHeight) |
void |
resume() |
void |
setAutoFocus(boolean autoFocus) |
void |
setExposure(int exposure) |
void |
setFlashOn(boolean flash) |
void |
setFocus(float xRatio,
float yRatio) |
void |
setLastCaptureTime(long lastCaptureTime) |
void |
setOrientation(int orientation) |
private void |
setPreviewFpsRange(android.hardware.Camera.Parameters parameters) |
private void |
setPreviewOrientation(android.hardware.Camera.Parameters parameters,
int rotation) |
private void |
setPreviewSize(android.hardware.Camera.Parameters parameters) |
void |
setVideoSourceListener(VideoPusher.VideoSourceListener listener) |
void |
setVideoSourceTextureListener(VideoPusher.VideoSourceTextureListener listener) |
void |
setZoom(float scaleFactor) |
void |
setZoom(int zoom) |
void |
start(int surfaceId) |
void |
startInner() |
private void |
startPreview0() |
void |
stop() |
void |
stopInner() |
void |
switchCamera() |
private static void |
turnLightOff(android.hardware.Camera mCamera) |
private static void |
turnLightOn(android.hardware.Camera mCamera) |
int |
updateTexImage() |
private static final java.lang.String TAG
private final int TIME_MILLISECOND
private final float INITIATE_VALUE
private final float MAG_DELTA_DIFF
private final float ACCEL_DELTA_DIFF
private final float ACCEL_DELTAXYZ_DIFF
private static int MIN_CAP_RESOLUTION
private static final int SCREEN_PORTRAIT
private static final int SCREEN_LANDSCAPE_LEFT
private static final int SCREEN_LANDSCAPE_RIGHT
private static byte[] buffer
private static byte[] buffer1
private static byte[] buffer2
private static int supportMaxWH
private boolean mPreviewRunning
private android.hardware.Camera mCamera
private VideoParam mParam
private int mScreen
private int mOrientation
private int mDataOrientation
private boolean mPause
private VideoPusher.VideoSourceListener mVideoSourceListener
private VideoPusher.VideoSourceTextureListener mVideoSourceTextureListener
private boolean mSwitchCamera
private long mLastCaptureTime
private long mLastFpsCountTime
private int mLastFpsCounter
private int mBelowMinFpsNumberTimes
private int mCurrentFps
private long mBaseWallTime
private long mStartElapsedTime
private boolean mSurfaceCbMode
private int mSurfaceTextureId
private boolean mFlashOn
private boolean mAutoFocus
private boolean mAutoFocusing
private android.graphics.SurfaceTexture mSurfaceTexture
private android.hardware.SensorManager mSensorManager
private android.hardware.Sensor mAccelSensor
private android.hardware.Sensor mMagneticSensor
private float mLastXAccel
private float mLastYAccel
private float mLastZAccel
private float mLastXMag
private float mLastYMag
private float mLastZMag
private int mCustomRotation
private boolean mSensorFocus
private static java.util.Map<java.lang.Integer,java.util.List<android.hardware.Camera.Size>> sSupportedResolutionMap
private static java.util.List<java.lang.Integer> sSupportedFormat
private android.graphics.SurfaceTexture.OnFrameAvailableListener mOnFrameAvailableListener
private android.hardware.Camera.PreviewCallback mPreviewCallback
private android.hardware.SensorEventListener mSensorEventListener
public void init(int source, int width, int height, int fps, int rotation, int customRotation, boolean surfaceCBMode, boolean focusBySensor, android.content.Context context)
private static void turnLightOn(android.hardware.Camera mCamera)
private static void turnLightOff(android.hardware.Camera mCamera)
public void destroy()
public void switchCamera() throws java.lang.Exception
java.lang.Exception
public void setOrientation(int orientation) throws java.lang.Exception
java.lang.Exception
public void stopInner()
public void stop()
public void start(int surfaceId) throws java.lang.Exception
java.lang.Exception
public void startInner() throws java.lang.Exception
java.lang.Exception
private boolean isHasPermission()
private void startPreview0() throws java.lang.Exception
java.lang.Exception
public void pause(boolean useEmptyData)
public void resume()
private void setPreviewSize(android.hardware.Camera.Parameters parameters)
private void setPreviewFpsRange(android.hardware.Camera.Parameters parameters)
private void preparePublisher(int pushWidth, int pushHeight)
private void setPreviewOrientation(android.hardware.Camera.Parameters parameters, int rotation)
public void setFlashOn(boolean flash)
public void setAutoFocus(boolean autoFocus)
public boolean isSupportAutoFocus()
public boolean isSupportFlash()
public void setExposure(int exposure)
public int getMinExposure()
public int getMaxExposure()
public int getCurrentExposure()
public void setZoom(int zoom)
public int getCurrentZoom()
public int getMaxZoom()
public void setZoom(float scaleFactor)
public void setFocus(float xRatio, float yRatio)
public void setVideoSourceListener(VideoPusher.VideoSourceListener listener)
public void setVideoSourceTextureListener(VideoPusher.VideoSourceTextureListener listener)
public long getLastCaptureTime()
public void setLastCaptureTime(long lastCaptureTime)
public int getCurrentFps()
public int updateTexImage()
public void getTransformMatrix(float[] matrix)
public static java.util.List<android.hardware.Camera.Size> getSupportedResolutions(int source)
public static java.util.List<java.lang.Integer> getSupportedFormats()
public boolean isPreviewRunning()
private void cameraAutoFocus()