tencent cloud

Feedback

Last updated: 2024-11-29 12:42:25

    TXUGCRecord

    Basic shooting APIs

    API
    Description
    Gets a shooting instance.
    Sets the shooting callback.
    Releases resources.
    Sets the custom image processing callback (not supported in UGSV Lite).

    Shooting effect APIs

    API
    Description
    Sets a global watermark (not supported in UGSV Lite).
    Gets the beauty filter management object.

    Camera and mic APIs

    API
    Description
    Starts the camera preview (simplified parameters).
    Starts the camera preview (custom parameters).
    Sets the shooting resolution.
    Sets the video bitrate for shooting.
    Stops the camera preview.
    Switches between the front and rear cameras.
    Sets the mic volume.
    Turns on/off the flashlight.
    Gets the maximum zoom factor. You can also use this API to check whether zooming is supported.
    Sets the zoom factor.
    Sets the focus position manually.
    Sets the video rendering mode.

    Shooting APIs

    API
    Description
    Starts shooting. The SDK will automatically generate the video path and thumbnail, which are returned by ITXVideoRecordListener.
    Starts shooting.
    Starts shooting.
    Stops shooting.
    Pauses shooting.
    Resumes shooting.
    Sets the aspect ratio.
    Sets the shooting speed (not supported in UGSV Lite).
    Sets whether to mute audio.
    Sets the orientation (in relation to the Home button).
    Sets the rotation for rendering.

    Background music APIs

    API
    Description
    Sets the reverb effect (not supported in UGSV Lite).
    Sets the voice changing effect (not supported in UGSV Lite).
    Sets the background music (not supported in UGSV Lite).
    Sets the music playback callback (not supported in UGSV Lite).
    Plays the background music (not supported in UGSV Lite).
    Stops the background music (not supported in UGSV Lite).
    Pauses the background music (not supported in UGSV Lite).
    Resumes the background music (not supported in UGSV Lite).
    Sets the start and end time for the background music (not supported in UGSV Lite).
    Sets the volume of the background music (not supported in UGSV Lite).
    Gets the duration of the music file (not supported in UGSV Lite).

    Screenshot APIs

    API
    Description
    Sets the preprocessing callback.

    Disused APIs

    API
    Description
    Sets the animated effect (supported in UGSV Enterprise and Enterprise Pro).
    Sets whether to mute an animated effect (supported in UGSV Enterprise and Enterprise Pro).
    Sets the green screen (supported in UGSV Enterprise Pro).
    Sets the V shape effect (supported in UGSV Enterprise Pro).
    Sets the face length (supported in UGSV Enterprise Pro and Enterprise Pro EX).
    Sets the chin length (supported in UGSV Enterprise Pro and Enterprise Pro EX).
    Sets the nose size (supported in UGSV Enterprise Pro and Enterprise Pro EX).
    Sets the big eyes effect (supported in UGSV Enterprise Pro and Enterprise Pro EX).
    Sets the slim face effect (supported in UGSV Enterprise Pro).
    Sets the beauty style.
    Sets the beautification and brightening strength.
    Sets the color filter.
    Sets multiple filters.
    Sets the filter strength.

    TXUGCPartsManager

    Segment-based shooting APIs

    API
    Description
    The video segment manager.
    Sets the callback for processing video segments.
    Sets the callback for deleting video segments.
    Adds a video segment to the end of the list.
    Inserts a video segment.
    Gets the total duration of all the video segments.
    Gets the paths of all the video segments shot.
    Deletes the last video segment.
    Deletes a specific video segment.
    Deletes all the video segments.

    VideoCustomProcessListener

    Custom video processing callback APIs

    API
    Description
    The texture processing callback.
    The facial keypoints.
    The texture releasing callback.

    ITXVideoRecordListener

    Preview callback APIs

    API
    Description
    A shooting event.
    The shooting progress callback.
    The shooting ended.

    ITXSnapshotListener

    Screenshot callback APIs

    API
    Description
    The screenshot callback.

    ITXBGMNotify

    Background music callback APIs

    API
    Description
    The background music started.
    The music playback progress.
    The background music ended.

    TXRecordCommon

    Definitions of key types

    API
    Description
    The shooting result.
    Preset shooting parameters.
    Custom shooting parameters.

    Error Codes

    Shooting result

    Message
    Code
    Description
    RECORD_RESULT_OK
    0
    The shooting was successful or was paused (stopped).
    RECORD_RESULT_OK_LESS_THAN_MINDURATION
    1
    The shooting was successful. The duration is shorter than the minimum duration allowed.
    RECORD_RESULT_OK_REACHED_MAXDURATION
    2
    The shooting was successful. The duration is longer than the maximum duration allowed.
    RECORD_RESULT_FAILED
    -1
    The shooting failed.
    RECORD_RESULT_SUSPEND_FOR_NO_TASK
    -2
    An API was called to pause (stop) shooting, but there wasn’t a shooting task.
    RECORD_RESULT_FILE_ERR
    -3
    The file does not exist or its duration is 0. This is usually because the interval between when shooting is started, and when it is paused (stopped) is too short. This error does not need to be handled.
    RECORD_RESULT_COMPOSE_SET_SRC_PATH_ERR
    -4
    The source video path is invalid. Call mTXUGCPartsManager.getPartsPathList() to check whether the file is empty or its duration is 0.
    RECORD_RESULT_COMPOSE_SET_DST_PATH_ERR
    -5
    The target video path is invalid. Check whether the path is empty.
    RECORD_RESULT_COMPOSE_START_ERR
    -6
    Failed to generate the video because there is an ongoing task.
    RECORD_RESULT_COMPOSE_CANCEL
    -7
    The video was canceled.
    RECORD_RESULT_COMPOSE_VERIFY_FAIL
    -8
    Verification for video generation failed because the file does not exist, the file duration is 0, or the video parameters are inconsistent.
    RECORD_RESULT_COMPOSE_INTERNAL_ERR
    -9
    The video failed to be generated due to an internal error.

    Starting shooting

    Message
    Code
    Description
    START_RECORD_OK
    0
    Shooting started.
    START_RECORD_ERR_IS_IN_RECORDING
    -1
    There was an ongoing task when a request was made to start shooting.
    START_RECORD_ERR_VIDEO_PATH_IS_EMPTY
    -2
    The file path is empty when a request was made to start shooting.
    START_RECORD_ERR_API_IS_LOWER_THAN_18
    -3
    The version is earlier than v18.
    START_RECORD_ERR_NOT_INIT
    -4
    Initialization was not finished yet when a request was made to start shooting.
    START_RECORD_ERR_LICENCE_VERIFICATION_FAILED
    -5
    License verification failed.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support