LiteAVSDK
腾讯云音视频 SDK ,服务于数万家企业客户的高可用组件,致力于最大限度地节省您的研发成本。
TXRecordCommon

详细描述

视频录制关键类型定义


结构体说明

◆ com::tencent::ugc::TXRecordCommon::TXRecordResult

class com::tencent::ugc::TXRecordCommon::TXRecordResult
成员变量
String coverPath
String descMsg
int retCode
String videoPath

◆ com::tencent::ugc::TXRecordCommon::ITXVideoRecordListener

interface com::tencent::ugc::TXRecordCommon::ITXVideoRecordListener

Public 成员函数

void onRecordEvent (final int event, final Bundle param)
 
void onRecordProgress (long milliSecond)
 
void onRecordComplete (TXRecordResult result)
 

成员函数说明

◆ onRecordComplete()

void onRecordComplete ( TXRecordResult  result)

短视频录制完成

◆ onRecordEvent()

void onRecordEvent ( final int  event,
final Bundle  param 
)

短视频录制事件通知

参数
event事件id.id类型
param事件相关的参数.(key,value)格式,其中key

◆ onRecordProgress()

void onRecordProgress ( long  milliSecond)

短视频录制进度

◆ com::tencent::ugc::TXRecordCommon::ITXSnapshotListener

interface com::tencent::ugc::TXRecordCommon::ITXSnapshotListener

Public 成员函数

void onSnapshot (Bitmap bmp)
 

成员函数说明

◆ onSnapshot()

void onSnapshot ( Bitmap  bmp)

◆ com::tencent::ugc::TXRecordCommon::TXUGCSimpleConfig

class com::tencent::ugc::TXRecordCommon::TXUGCSimpleConfig
成员变量
boolean isFront
int maxDuration
int minDuration
boolean needEdit
int profile
boolean touchFocus
int videoQuality
Bitmap watermark
int watermarkX
int watermarkY

◆ com::tencent::ugc::TXRecordCommon::TXUGCCustomConfig

class com::tencent::ugc::TXRecordCommon::TXUGCCustomConfig

成员变量

int videoResolution = VIDEO_RESOLUTION_540_960
 
int videoFps = 20
 
int videoBitrate = 1800
 
int videoGop = 3
 
Bitmap watermark = null
 
int watermarkX = 0
 
int watermarkY = 0
 
boolean isFront = true
 
boolean touchFocus = false
 
int minDuration = 5000
 
int maxDuration = 60000
 
int audioSampleRate = AUDIO_SAMPLERATE_48000
 
boolean needEdit = true
 
int profile = TXCVideoEncoderTypeDef.Profile_None
 

结构体成员变量说明

◆ audioSampleRate

int audioSampleRate = AUDIO_SAMPLERATE_48000

◆ isFront

boolean isFront = true

◆ maxDuration

int maxDuration = 60000

◆ minDuration

int minDuration = 5000

◆ needEdit

boolean needEdit = true

◆ profile

int profile = TXCVideoEncoderTypeDef.Profile_None

◆ touchFocus

boolean touchFocus = false

◆ videoBitrate

int videoBitrate = 1800

◆ videoFps

int videoFps = 20

◆ videoGop

int videoGop = 3

◆ videoResolution

int videoResolution = VIDEO_RESOLUTION_540_960

◆ watermark

Bitmap watermark = null

◆ watermarkX

int watermarkX = 0

◆ watermarkY

int watermarkY = 0

◆ com::tencent::ugc::TXRecordCommon::ITXBGMNotify

interface com::tencent::ugc::TXRecordCommon::ITXBGMNotify

Public 成员函数

void onBGMStart ()
 
void onBGMProgress (long progress, long duration)
 
void onBGMComplete (int err)
 

成员函数说明

◆ onBGMComplete()

void onBGMComplete ( int  err)

音乐播放结束的回调通知

参数
err0:正常结束 -1:出错结束

◆ onBGMProgress()

void onBGMProgress ( long  progress,
long  duration 
)

音乐播放进度的回调通知

参数
progress当前BGM已播放时间(ms)
duration当前BGM总时间(ms)

◆ onBGMStart()

void onBGMStart ( )

音乐播放开始的回调通知

◆ com::tencent::ugc::TXRecordCommon

class com::tencent::ugc::TXRecordCommon

静态 Public 属性

static final int RECORD_TYPE_STREAM_SOURCE = 1
 
static final int VIDEO_RESOLUTION_360_640 = 0
 
static final int VIDEO_RESOLUTION_480_640 = 1
 
static final int VIDEO_RESOLUTION_540_960 = 2
 
static final int VIDEO_RESOLUTION_720_1280 = 3
 
static final int VIDEO_RESOLUTION_1080_1920 = 4
 
static final int VIDEO_QUALITY_LOW = 0
 
static final int VIDEO_QUALITY_LMEDIUM = 1
 
static final int VIDEO_QUALITY_MEDIUM = 2
 
static final int VIDEO_QUALITY_HIGH = 3
 
static final int RECORD_RESULT_OK = 0
 
static final int RECORD_RESULT_OK_LESS_THAN_MINDURATION = 1
 
static final int RECORD_RESULT_OK_REACHED_MAXDURATION = 2
 
static final int RECORD_RESULT_FAILED = -1
 
static final int RECORD_RESULT_SUSPEND_FOR_NO_TASK = -2
 
static final int RECORD_RESULT_FILE_ERR = -3
 
static final int RECORD_RESULT_COMPOSE_SET_SRC_PATH_ERR = -4
 
static final int RECORD_RESULT_COMPOSE_SET_DST_PATH_ERR = -5
 
static final int RECORD_RESULT_COMPOSE_START_ERR = -6
 
static final int RECORD_RESULT_COMPOSE_CANCEL = -7
 
static final int RECORD_RESULT_COMPOSE_VERIFY_FAIL = -8
 
static final int RECORD_RESULT_COMPOSE_INTERNAL_ERR = -9
 
static final int START_RECORD_OK = 0
 
static final int START_RECORD_ERR_IS_IN_RECORDING = -1
 
static final int START_RECORD_ERR_VIDEO_PATH_IS_EMPTY = -2
 
static final int START_RECORD_ERR_API_IS_LOWER_THAN_18 = -3
 
static final int START_RECORD_ERR_NOT_INIT = -4
 
static final int START_RECORD_ERR_LICENCE_VERIFICATION_FAILED = -5
 
static final int EVT_ID_PAUSE = 1
 
static final int EVT_ID_RESUME = 2
 
static final int EVT_CAMERA_CANNOT_USE = 3
 
static final int EVT_MIC_CANNOT_USE = 4
 
static final String EVT_TIME = "EVT_TIME"
 
static final String EVT_DESCRIPTION = "EVT_DESCRIPTION"
 
static final String EVT_PARAM1 = "EVT_PARAM1"
 
static final String EVT_PARAM2 = "EVT_PARAM2"
 
static final int VIDEO_RENDER_MODE_FULL_FILL_SCREEN = 0
 
static final int VIDEO_RENDER_MODE_ADJUST_RESOLUTION = 1
 
static final int AUDIO_SAMPLERATE_8000 = 8000
 
static final int AUDIO_SAMPLERATE_16000 = 16000
 
static final int AUDIO_SAMPLERATE_32000 = 32000
 
static final int AUDIO_SAMPLERATE_44100 = 44100
 
static final int AUDIO_SAMPLERATE_48000 = 48000
 
static final int VIDEO_ASPECT_RATIO_9_16 = 0
 
static final int VIDEO_ASPECT_RATIO_3_4 = 1
 
static final int VIDEO_ASPECT_RATIO_1_1 = 2
 
static final int VIDEO_ASPECT_RATIO_16_9 = 3
 
static final int VIDEO_ASPECT_RATIO_4_3 = 4
 
static final int RECORD_SPEED_SLOWEST = 0
 
static final int RECORD_SPEED_SLOW = 1
 
static final int RECORD_SPEED_NORMAL = 2
 
static final int RECORD_SPEED_FAST = 3
 
static final int RECORD_SPEED_FASTEST = 4
 
static final int VIDOE_REVERB_TYPE_0 = 0
 
static final int VIDOE_REVERB_TYPE_1 = 1
 
static final int VIDOE_REVERB_TYPE_2 = 2
 
static final int VIDOE_REVERB_TYPE_3 = 3
 
static final int VIDOE_REVERB_TYPE_4 = 4
 
static final int VIDOE_REVERB_TYPE_5 = 5
 
static final int VIDOE_REVERB_TYPE_6 = 6
 
static final int VIDOE_REVERB_TYPE_7 = 7
 
static final int VIDOE_VOICECHANGER_TYPE_0 = 0
 
static final int VIDOE_VOICECHANGER_TYPE_1 = 1
 
static final int VIDOE_VOICECHANGER_TYPE_2 = 2
 
static final int VIDOE_VOICECHANGER_TYPE_3 = 3
 
static final int VIDOE_VOICECHANGER_TYPE_4 = 4
 
static final int VIDOE_VOICECHANGER_TYPE_6 = 6
 
static final int VIDOE_VOICECHANGER_TYPE_7 = 7
 
static final int VIDOE_VOICECHANGER_TYPE_8 = 8
 
static final int VIDOE_VOICECHANGER_TYPE_9 = 9
 
static final int VIDOE_VOICECHANGER_TYPE_10 = 10
 
static final int VIDOE_VOICECHANGER_TYPE_11 = 11
 
static final int Profile_None = 0
 
static final int Profile_Baseline = Profile_None + 1
 
static final int Profile_Main = Profile_Baseline + 1
 
static final int Profile_High = Profile_Main + 1
 
static final int Profile_Default = Profile_Baseline
 
static final int Profile_H265 = 14
 

结构体成员变量说明

◆ AUDIO_SAMPLERATE_16000

final int AUDIO_SAMPLERATE_16000 = 16000
static

◆ AUDIO_SAMPLERATE_32000

final int AUDIO_SAMPLERATE_32000 = 32000
static

◆ AUDIO_SAMPLERATE_44100

final int AUDIO_SAMPLERATE_44100 = 44100
static

◆ AUDIO_SAMPLERATE_48000

final int AUDIO_SAMPLERATE_48000 = 48000
static

◆ AUDIO_SAMPLERATE_8000

final int AUDIO_SAMPLERATE_8000 = 8000
static

音频采样率

◆ EVT_CAMERA_CANNOT_USE

final int EVT_CAMERA_CANNOT_USE = 3
static

◆ EVT_DESCRIPTION

final String EVT_DESCRIPTION = "EVT_DESCRIPTION"
static

◆ EVT_ID_PAUSE

final int EVT_ID_PAUSE = 1
static

录制事件参数

◆ EVT_ID_RESUME

final int EVT_ID_RESUME = 2
static

◆ EVT_MIC_CANNOT_USE

final int EVT_MIC_CANNOT_USE = 4
static

◆ EVT_PARAM1

final String EVT_PARAM1 = "EVT_PARAM1"
static

◆ EVT_PARAM2

final String EVT_PARAM2 = "EVT_PARAM2"
static

◆ EVT_TIME

final String EVT_TIME = "EVT_TIME"
static

◆ Profile_Baseline

final int Profile_Baseline = Profile_None + 1
static

◆ Profile_Default

final int Profile_Default = Profile_Baseline
static

◆ Profile_H265

final int Profile_H265 = 14
static

◆ Profile_High

final int Profile_High = Profile_Main + 1
static

◆ Profile_Main

final int Profile_Main = Profile_Baseline + 1
static

◆ Profile_None

final int Profile_None = 0
static

◆ RECORD_RESULT_COMPOSE_CANCEL

final int RECORD_RESULT_COMPOSE_CANCEL = -7
static

◆ RECORD_RESULT_COMPOSE_INTERNAL_ERR

final int RECORD_RESULT_COMPOSE_INTERNAL_ERR = -9
static

◆ RECORD_RESULT_COMPOSE_SET_DST_PATH_ERR

final int RECORD_RESULT_COMPOSE_SET_DST_PATH_ERR = -5
static

◆ RECORD_RESULT_COMPOSE_SET_SRC_PATH_ERR

final int RECORD_RESULT_COMPOSE_SET_SRC_PATH_ERR = -4
static

◆ RECORD_RESULT_COMPOSE_START_ERR

final int RECORD_RESULT_COMPOSE_START_ERR = -6
static

◆ RECORD_RESULT_COMPOSE_VERIFY_FAIL

final int RECORD_RESULT_COMPOSE_VERIFY_FAIL = -8
static

◆ RECORD_RESULT_FAILED

final int RECORD_RESULT_FAILED = -1
static

◆ RECORD_RESULT_FILE_ERR

final int RECORD_RESULT_FILE_ERR = -3
static

◆ RECORD_RESULT_OK

final int RECORD_RESULT_OK = 0
static

录制结果回调错误码定义

◆ RECORD_RESULT_OK_LESS_THAN_MINDURATION

final int RECORD_RESULT_OK_LESS_THAN_MINDURATION = 1
static

◆ RECORD_RESULT_OK_REACHED_MAXDURATION

final int RECORD_RESULT_OK_REACHED_MAXDURATION = 2
static

◆ RECORD_RESULT_SUSPEND_FOR_NO_TASK

final int RECORD_RESULT_SUSPEND_FOR_NO_TASK = -2
static

◆ RECORD_SPEED_FAST

final int RECORD_SPEED_FAST = 3
static

◆ RECORD_SPEED_FASTEST

final int RECORD_SPEED_FASTEST = 4
static

◆ RECORD_SPEED_NORMAL

final int RECORD_SPEED_NORMAL = 2
static

◆ RECORD_SPEED_SLOW

final int RECORD_SPEED_SLOW = 1
static

◆ RECORD_SPEED_SLOWEST

final int RECORD_SPEED_SLOWEST = 0
static

录制速度

◆ RECORD_TYPE_STREAM_SOURCE

final int RECORD_TYPE_STREAM_SOURCE = 1
static

PlayRecord 录制类型定义

◆ START_RECORD_ERR_API_IS_LOWER_THAN_18

final int START_RECORD_ERR_API_IS_LOWER_THAN_18 = -3
static

◆ START_RECORD_ERR_IS_IN_RECORDING

final int START_RECORD_ERR_IS_IN_RECORDING = -1
static

◆ START_RECORD_ERR_LICENCE_VERIFICATION_FAILED

final int START_RECORD_ERR_LICENCE_VERIFICATION_FAILED = -5
static

◆ START_RECORD_ERR_NOT_INIT

final int START_RECORD_ERR_NOT_INIT = -4
static

◆ START_RECORD_ERR_VIDEO_PATH_IS_EMPTY

final int START_RECORD_ERR_VIDEO_PATH_IS_EMPTY = -2
static

◆ START_RECORD_OK

final int START_RECORD_OK = 0
static

开始录制的返回错误码

◆ VIDEO_ASPECT_RATIO_16_9

final int VIDEO_ASPECT_RATIO_16_9 = 3
static

◆ VIDEO_ASPECT_RATIO_1_1

final int VIDEO_ASPECT_RATIO_1_1 = 2
static

◆ VIDEO_ASPECT_RATIO_3_4

final int VIDEO_ASPECT_RATIO_3_4 = 1
static

◆ VIDEO_ASPECT_RATIO_4_3

final int VIDEO_ASPECT_RATIO_4_3 = 4
static

◆ VIDEO_ASPECT_RATIO_9_16

final int VIDEO_ASPECT_RATIO_9_16 = 0
static

显示比例

◆ VIDEO_QUALITY_HIGH

final int VIDEO_QUALITY_HIGH = 3
static

◆ VIDEO_QUALITY_LMEDIUM

final int VIDEO_QUALITY_LMEDIUM = 1
static

◆ VIDEO_QUALITY_LOW

final int VIDEO_QUALITY_LOW = 0
static

◆ VIDEO_QUALITY_MEDIUM

final int VIDEO_QUALITY_MEDIUM = 2
static

◆ VIDEO_RENDER_MODE_ADJUST_RESOLUTION

final int VIDEO_RENDER_MODE_ADJUST_RESOLUTION = 1
static

◆ VIDEO_RENDER_MODE_FULL_FILL_SCREEN

final int VIDEO_RENDER_MODE_FULL_FILL_SCREEN = 0
static

图像平铺模式 VIDEO_RENDER_MODE_FULL_FILL_SCREEN :将图像等比例铺满整个屏幕,多余部分裁剪掉,此模式下画面不留黑边 VIDEO_RENDER_MODE_ADJUST_RESOLUTION :将图像等比例缩放,缩放后的宽和高都不会超过显示区域,居中显示

◆ VIDEO_RESOLUTION_1080_1920

final int VIDEO_RESOLUTION_1080_1920 = 4
static

◆ VIDEO_RESOLUTION_360_640

final int VIDEO_RESOLUTION_360_640 = 0
static

Record 录制分辨率类型定义

◆ VIDEO_RESOLUTION_480_640

final int VIDEO_RESOLUTION_480_640 = 1
static

◆ VIDEO_RESOLUTION_540_960

final int VIDEO_RESOLUTION_540_960 = 2
static

◆ VIDEO_RESOLUTION_720_1280

final int VIDEO_RESOLUTION_720_1280 = 3
static

◆ VIDOE_REVERB_TYPE_0

final int VIDOE_REVERB_TYPE_0 = 0
static

混响

◆ VIDOE_REVERB_TYPE_1

final int VIDOE_REVERB_TYPE_1 = 1
static

◆ VIDOE_REVERB_TYPE_2

final int VIDOE_REVERB_TYPE_2 = 2
static

◆ VIDOE_REVERB_TYPE_3

final int VIDOE_REVERB_TYPE_3 = 3
static

◆ VIDOE_REVERB_TYPE_4

final int VIDOE_REVERB_TYPE_4 = 4
static

◆ VIDOE_REVERB_TYPE_5

final int VIDOE_REVERB_TYPE_5 = 5
static

◆ VIDOE_REVERB_TYPE_6

final int VIDOE_REVERB_TYPE_6 = 6
static

◆ VIDOE_REVERB_TYPE_7

final int VIDOE_REVERB_TYPE_7 = 7
static

◆ VIDOE_VOICECHANGER_TYPE_0

final int VIDOE_VOICECHANGER_TYPE_0 = 0
static

变声

◆ VIDOE_VOICECHANGER_TYPE_1

final int VIDOE_VOICECHANGER_TYPE_1 = 1
static

◆ VIDOE_VOICECHANGER_TYPE_10

final int VIDOE_VOICECHANGER_TYPE_10 = 10
static

◆ VIDOE_VOICECHANGER_TYPE_11

final int VIDOE_VOICECHANGER_TYPE_11 = 11
static

◆ VIDOE_VOICECHANGER_TYPE_2

final int VIDOE_VOICECHANGER_TYPE_2 = 2
static

◆ VIDOE_VOICECHANGER_TYPE_3

final int VIDOE_VOICECHANGER_TYPE_3 = 3
static

◆ VIDOE_VOICECHANGER_TYPE_4

final int VIDOE_VOICECHANGER_TYPE_4 = 4
static

◆ VIDOE_VOICECHANGER_TYPE_6

final int VIDOE_VOICECHANGER_TYPE_6 = 6
static

◆ VIDOE_VOICECHANGER_TYPE_7

final int VIDOE_VOICECHANGER_TYPE_7 = 7
static

◆ VIDOE_VOICECHANGER_TYPE_8

final int VIDOE_VOICECHANGER_TYPE_8 = 8
static

◆ VIDOE_VOICECHANGER_TYPE_9

final int VIDOE_VOICECHANGER_TYPE_9 = 9
static