MeiCam SDK For Android
3.14.0
|
MediaFileConvertor. More...
Classes | |
interface | MeidaFileConvertorCallback |
Public Member Functions | |
NvsMediaFileConvertor () | |
void | release () |
Release convertor object. More... | |
boolean | isReleased () |
Whether released. More... | |
void | setMeidaFileConvertorCallback (MeidaFileConvertorCallback callback, Handler hanlder) |
Set callback to convertor. More... | |
void | setMeidaFileConvertorCallback (MeidaFileConvertorCallback callback, boolean postMainLoop) |
Sets callback to convertor. More... | |
long | convertMeidaFile (String srcFile, String dstFile, boolean isReverseConvert, long fromPositon, long toPosition, Hashtable< String, Object > configurations) |
Start to convert file. More... | |
void | cancelTask (long taskId) |
Cancel task. More... | |
Static Public Attributes | |
static final String | CONVERTOR_AUDIO_CHANNEL_MAP = "convertor-audio-channel-map" |
set audio channel map, More... | |
convertor params | |
static final String | CONVERTOR_CUSTOM_VIDEO_HEIGHT = "custom-video-height" |
Set custom video height, width will be automatic scaled to keep aspect ratio. type: int. More... | |
static final String | CONVERTOR_CUSTOM_AUDIO_SAMPLE_RATE = "custom-audio-sample-rate" |
Set custom audio sample rate, type: int. More... | |
static final String | CONVERTOR_NO_VIDEO = "convertor-no-video" |
only convert audio stream, type: bool More... | |
static final String | CONVERTOR_NO_AUDIO = "convertor-no-audio" |
only convert video stream, type: bool More... | |
static final String | CONVERTOR_CUSTOM_AUDIO_CHANNEL = "custom-audio-channel" |
Set custom audio channels, type: int. More... | |
static final String | CONVERTOR_CUSTOM_AUDIO_PCM_FILE = "custom-audio-pcm-file" |
Set custom audio pcm file, type: bool. More... | |
static final String | CONVERTOR_DETECTED_AUDIO_MUTE_FACTOR = "detected_audio_mute" |
Set threshold of mute audio, type: int. More... | |
static final String | CONVERTOR_DISABLE_HARDWARE_VIDEO_DECODER = "disable_hardware_video_decoder" |
disable hardware decoder,type: bool More... | |
static final String | CONVERTOR_CUSTOM_VIDEO_FRAME_RATE = "custom-video-frame-rate" |
Set custom video frame rate, type: int. More... | |
static final String | CONVERTOR_MAX_CACHE_SIZE_IN_MEMORY = "max_cache_size_in_memory" |
max cache video frame buffer count in host memory,type: int More... | |
static final String | CONVERTOR_REVERSE_AUDIO_STREAM = "convertor-reverse-audio" |
Reverse audio stream,type: bool. More... | |
static final String | CONVERTOR_AUDIO_ENCODER_NAME = "audio encoder name" |
Assigned audio encoding format, amr-wb, mp3 is supported,type: string. More... | |
static final String | CONVERTOR_BITRATE = "bitrate" |
convertor video bitrate in bps. type: int More... | |
static final String | CONVERTOR_GOP_SIZE = "gopsize" |
convertor video GOP size, type: int More... | |
static final String | CONVERTOR_AUDIO_BITRATE = "audio bitrate" |
convertor audio bitrate in bps. type:int More... | |
static final String | CONVERTOR_ENABLE_HDR = "enable hdr" |
Enable HDR video convert if the video is HDR type: bool. More... | |
convertor error | |
static final int | CONVERTOR_ERROR_CODE_NO_ERROR = 0 |
no error More... | |
static final int | CONVERTOR_ERROR_CODE_CANCEL = 1 |
task is canceled More... | |
static final int | CONVERTOR_ERROR_VIDEO_ENCODER_SETUP_ERROR = 2 |
video encoder setup error More... | |
static final int | CONVERTOR_ERROR_VIDEO_ENCODING_ERROR = 3 |
video encoder error More... | |
static final int | CONVERTOR_ERROR_VIDEO_DECODER_ERROR = 4 |
video decoder setup error More... | |
static final int | CONVERTOR_ERROR_VIDEO_DECODING_ERROR = 5 |
video decode error More... | |
static final int | CONVERTOR_ERROR_UNKNOWN = 65535 |
Protected Member Functions | |
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) |
MediaFileConvertor.
|
inline |
|
inline |
Cancel task.
taskId | Task Id |
|
inline |
Start to convert file.
srcFile | source file |
dstFile | destination file |
isReverseConvert | reverse convert file |
fromPositon | start time |
toPosition | end time |
configurations | convert params |
|
inlineprotected |
|
inline |
Whether released.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Release convertor object.
|
inline |
Sets callback to convertor.
callback | Callback interface |
postMainLoop | whether to callback to main looper |
|
inline |
Set callback to convertor.
callback | Callback interface |
hanlder | Callback to this handler,if null will callback to main looper |
|
static |
convertor audio bitrate in bps. type:int
|
static |
set audio channel map,
set audio channel map, Currently, "left" and "right" are supported; the number of mapping tables must be consistent with the number of output channels For example, the mapping table is "'right ','left'", which means that the input right channel to the output left channel, and the input left channel to the output audio channel.
|
static |
Assigned audio encoding format, amr-wb, mp3 is supported,type: string.
|
static |
convertor video bitrate in bps. type: int
|
static |
Set custom audio channels, type: int.
|
static |
Set custom audio pcm file, type: bool.
|
static |
Set custom audio sample rate, type: int.
|
static |
Set custom video frame rate, type: int.
|
static |
Set custom video height, width will be automatic scaled to keep aspect ratio. type: int.
|
static |
Set threshold of mute audio, type: int.
|
static |
disable hardware decoder,type: bool
|
static |
Enable HDR video convert if the video is HDR type: bool.
|
static |
task is canceled
|
static |
no error
|
static |
task has unknown error
|
static |
video decoder setup error
|
static |
video decode error
|
static |
video encoder setup error
|
static |
video encoder error
|
static |
convertor video GOP size, type: int
|
static |
max cache video frame buffer count in host memory,type: int
|
static |
only convert video stream, type: bool
|
static |
only convert audio stream, type: bool
|
static |
Reverse audio stream,type: bool.