美摄SDK For Android
3.14.0
|
媒体文件转码类 更多...
类 | |
interface | MeidaFileConvertorCallback |
Public 成员函数 | |
NvsMediaFileConvertor () | |
void | release () |
释放转码类对象 更多... | |
boolean | isReleased () |
是否已经释放转码类对象 更多... | |
void | setMeidaFileConvertorCallback (MeidaFileConvertorCallback callback, Handler hanlder) |
设置转码类的回调 更多... | |
void | setMeidaFileConvertorCallback (MeidaFileConvertorCallback callback, boolean postMainLoop) |
设置转码类的回调 更多... | |
long | convertMeidaFile (String srcFile, String dstFile, boolean isReverseConvert, long fromPositon, long toPosition, Hashtable< String, Object > configurations) |
开始转码 更多... | |
void | cancelTask (long taskId) |
取消转码任务 更多... | |
静态 Public 属性 | |
static final String | CONVERTOR_AUDIO_CHANNEL_MAP = "convertor-audio-channel-map" |
设置声道映射表,目前支持“left”, "right",比如:映射表为:"'right','left'" 更多... | |
转码参数 | |
static final String | CONVERTOR_CUSTOM_VIDEO_HEIGHT = "custom-video-height" |
设置自定义视频输出高度,宽度会等比例自动缩放。类型:整型 更多... | |
static final String | CONVERTOR_CUSTOM_AUDIO_SAMPLE_RATE = "custom-audio-sample-rate" |
设置自定义音频采样率,类型:整型 更多... | |
static final String | CONVERTOR_NO_VIDEO = "convertor-no-video" |
只进行音频转码,类型:bool 更多... | |
static final String | CONVERTOR_NO_AUDIO = "convertor-no-audio" |
只进行视频转码,类型:bool 更多... | |
static final String | CONVERTOR_CUSTOM_AUDIO_CHANNEL = "custom-audio-channel" |
设置自定义音频通道数, 类型:int 更多... | |
static final String | CONVERTOR_CUSTOM_AUDIO_PCM_FILE = "custom-audio-pcm-file" |
设置自定义音频PCM文件, 类型:bool 更多... | |
static final String | CONVERTOR_DETECTED_AUDIO_MUTE_FACTOR = "detected_audio_mute" |
设置检测静音的阈值, 类型:int 更多... | |
static final String | CONVERTOR_DISABLE_HARDWARE_VIDEO_DECODER = "disable_hardware_video_decoder" |
禁用硬件解码器,类型:bool 更多... | |
static final String | CONVERTOR_CUSTOM_VIDEO_FRAME_RATE = "custom-video-frame-rate" |
设置自定义视频帧率,类型:int 更多... | |
static final String | CONVERTOR_MAX_CACHE_SIZE_IN_MEMORY = "max_cache_size_in_memory" |
在内存中缓存的视频帧数量,类型:int 更多... | |
static final String | CONVERTOR_REVERSE_AUDIO_STREAM = "convertor-reverse-audio" |
倒放音频流,类型:bool 更多... | |
static final String | CONVERTOR_AUDIO_ENCODER_NAME = "audio encoder name" |
指定视频压缩格式,目前支持amr-wb, mp3,类型:string 更多... | |
static final String | CONVERTOR_BITRATE = "bitrate" |
生成视频码率,单位bps。类型:整型 更多... | |
static final String | CONVERTOR_GOP_SIZE = "gopsize" |
生成视频GOP SIZE,类型:整型 更多... | |
static final String | CONVERTOR_AUDIO_BITRATE = "audio bitrate" |
生成音频码率,单位bps。类型:整型 更多... | |
static final String | CONVERTOR_ENABLE_HDR = "enable hdr" |
开启HDR视频转换 类型:bool 更多... | |
转码错误类型 | |
static final int | CONVERTOR_ERROR_CODE_NO_ERROR = 0 |
没有错误 更多... | |
static final int | CONVERTOR_ERROR_CODE_CANCEL = 1 |
当前任务已经取消 更多... | |
static final int | CONVERTOR_ERROR_VIDEO_ENCODER_SETUP_ERROR = 2 |
视频编码器设置错误 更多... | |
static final int | CONVERTOR_ERROR_VIDEO_ENCODING_ERROR = 3 |
视频编码器编码过程中出现错误 更多... | |
static final int | CONVERTOR_ERROR_VIDEO_DECODER_ERROR = 4 |
视频解码器设置过程中出现错误 更多... | |
static final int | CONVERTOR_ERROR_VIDEO_DECODING_ERROR = 5 |
视频解码器解码过程中出现错误 更多... | |
static final int | CONVERTOR_ERROR_UNKNOWN = 65535 |
Protected 成员函数 | |
void | finalize () throws Throwable |
void | notifyProgress (final long taskId, final float progress) |
void | notifyFinish (final long taskId, final String srcFile, final String dstFile, final int errorCode) |
void | notifyAudioMuteRage (final long taskId, final long startPts, final long endPts) |
媒体文件转码类
|
inline |
|
inline |
取消转码任务
taskId | 任务id |
|
inline |
开始转码
srcFile | 源文件 |
dstFile | 目标文件 |
isReverseConvert | 是否倒放转码 |
fromPositon | 转码的起点时间 |
toPosition | 转码的止点时间 |
configurations | 转码参数集合 |
|
inlineprotected |
|
inline |
是否已经释放转码类对象
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
释放转码类对象
|
inline |
设置转码类的回调
callback | 回调对象 |
postMainLoop | 是否回调到主消息循环 |
|
inline |
设置转码类的回调
callback | 回调对象 |
hanlder | 回调的hanlder,如果是null就回调到mainLooper |
|
static |
生成音频码率,单位bps。类型:整型
|
static |
设置声道映射表,目前支持“left”, "right",比如:映射表为:"'right','left'"
设置声道映射表,目前支持“left”, "right";映射表的数量必须和输出声道的数量一致 比如:映射表为:"right,left", 表示输入的右声道到输出的左声道,输入的左声道到输出的右声道。
|
static |
指定视频压缩格式,目前支持amr-wb, mp3,类型:string
|
static |
生成视频码率,单位bps。类型:整型
|
static |
设置自定义音频通道数, 类型:int
|
static |
设置自定义音频PCM文件, 类型:bool
|
static |
设置自定义音频采样率,类型:整型
|
static |
设置自定义视频帧率,类型:int
|
static |
设置自定义视频输出高度,宽度会等比例自动缩放。类型:整型
|
static |
设置检测静音的阈值, 类型:int
|
static |
禁用硬件解码器,类型:bool
|
static |
开启HDR视频转换 类型:bool
|
static |
当前任务已经取消
|
static |
没有错误
|
static |
出现没有定义的错误
|
static |
视频解码器设置过程中出现错误
|
static |
视频解码器解码过程中出现错误
|
static |
视频编码器设置错误
|
static |
视频编码器编码过程中出现错误
|
static |
生成视频GOP SIZE,类型:整型
|
static |
在内存中缓存的视频帧数量,类型:int
|
static |
只进行视频转码,类型:bool
|
static |
只进行音频转码,类型:bool
|
static |
倒放音频流,类型:bool