Skip to main content

Code management class.

class  AutelCodecView

method isOverExposureEnabled

boolean isOverExposureEnabled()

Description: Returns the result of whether overexposure is enabled.

Input parameter: None

Output parameter: true: enabled; false: not enabled

**Related parameter: None

method pause

void  pause()

Description:  Pauses the codec and calls resume() to restart.

Input parameter: None

Output parameter: None

**Related parameter: None

method resume

void  resume()

Description:  Restarts the codec. It is called after pause() is used.

Input parameter: None

Output parameter: None

**Related parameter: None

method setOnRenderFrameInfoListener

void setOnRenderFrameInfoListener(OnRenderFrameInfoListener onRenderFrameInfoListener)

Description: Sets the listener to monitor the current rendering frame information.

Input parameter: Listener for the current rendering frame information

Output parameter: None

**Related parameter: OnRenderFrameInfoListener

method startDecode

void startDecode(SurfaceTexture surfaceTexture, int mSurfaceWidth, int mSurfaceHeight, boolean useOpenGL)

Description: Starts decoding.

Input parameter: Decodes the associated texture object, texture width, texture height, and whether to enable OpenGL for rendering.

Output parameter: None

**Related parameter: SurfaceTexture

method stopCodec

void stopCodec()

Description: Stops decoding.

Input parameter: None

Output parameter: None

**Related parameter: None

method setOverExposure

void setOverExposure(boolean enabled, int resId)

Description: Sets the enabling state of the overexposure and overexposure background to a given resource.

Input parameter: Enables the resource ID associated with the overexposure switch and the overexposure background.

Output parameter: None

**Related parameter: None

method surfaceSizeChanged

void surfaceSizeChanged(int surfaceWidth, int surfaceHeight)

Description: Adjusts the width and height of the rendering view after decoding.

Input parameter: Adjusted view width and height

Output parameter: None

**Related parameter: None

interface OnRenderFrameInfoListener

method onRenderFrameTimestamp

void onRenderFrameTimestamp(long var1)

Description: Obtains the PTS value of the currently decoded video frame by listening

Input parameter: None

Output parameter: None

**Related parameter: None

method onRenderFrameSizeChanged

void onRenderFrameSizeChanged(int var1, int var2)

Description: Obtains the width and height of the currently decoded video frame by listening

Input parameter: None

Output parameter: None

**Related parameter: None

interface AutelCodec

method setCodecListener

void setCodecListener(AutelCodecListener listener,Handler handler)

Description: Configures to listen for decoding result.

Input parameter: Listening object for decoding

Output parameter: None

**Related parameter: AutelCodecListener

method cancel

void cancel()

Description: Sets cancellation of decoding.

Input parameter: None

Output parameter: None

**Related parameter: None

interface AutelCodecListener

method onFrameStream

void onFrameStream(byte[] videoBuffer,boolean isIFrame,int size,long pts)

Description: Obtains the currently decoded data, the size and PTS value of the current frame, and determines whether the current frame is a key frame.

Input parameter: Information obtained by decoding listening

Output parameter: None

**Related parameter: None

method onCanceled

void onCanceled()

Description: Callback for the current video decoding method is canceled.

Input parameter: None

Output parameter: None

**Related parameter: None