Interface MediaAPI
public interface MediaAPI
-
Method Summary
Modifier and TypeMethodDescriptionintaddAudioStream(long ctx, MediaIO io, int codec_id, int bit_rate, int chs, int freq) intaddVideoStream(long ctx, MediaIO io, int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval) booleanaudioDecoderChange(long ctx, int chs, int freq) short[]audioDecoderDecode(long ctx, byte[] data, int offset, int length) intaudioDecoderGetChannels(long ctx) intaudioDecoderGetSampleRate(long ctx) longaudioDecoderStart(int codec_id, int new_chs, int new_freq) voidaudioDecoderStop(long ctx) byte[]audioEncoderEncode(long ctx, short[] samples, int offset, int length) intaudioEncoderGetAudioFramesize(long ctx) longaudioEncoderStart(int codec_id, int bit_rate, int chs, int freq) voidaudioEncoderStop(long ctx) floatcompareFrames(int[] frame1, int[] frame2, int width, int height) intgetAudioBitRate(long ctx) intgetAudioChannels(long ctx) intgetAudioCodecID(long ctx) intgetAudioSampleRate(long ctx) intgetAudioStream(long ctx) longgetDuration(long ctx) static MediaAPIintgetPacketData(long ctx, byte[] data, int offset, int length) booleangetPacketKeyFrame(long ctx) intgetVideoBitRate(long ctx) intgetVideoCodecID(long ctx) floatgetVideoFrameRate(long ctx) intgetVideoHeight(long ctx) intgetVideoKeyFrameInterval(long ctx) intgetVideoStream(long ctx) intgetVideoWidth(long ctx) booleaninputClose(long ctx, MediaIO io) booleaninputOpenAudio(long ctx, MediaIO io, int chs, int freq) longinputOpenFile(String file, String format) longinputOpenIO(MediaIO io) booleaninputOpenVideo(long ctx, MediaIO io, int width, int height) intbooleanbooleanmediaLoadLibs(String codec, String device, String filter, String format, String util, String scale, String postproc, String resample) voidmediaSetLogging(boolean state) booleanoutputClose(long ctx, MediaIO io) longoutputCreateFile(String file, String format) longoutputCreateIO(MediaIO io, String format) booleanvideoDecoderChange(long ctx, int width, int height) int[]videoDecoderDecode(long ctx, byte[] data, int offset, int length) floatvideoDecoderGetFrameRate(long ctx) intvideoDecoderGetHeight(long ctx) intvideoDecoderGetWidth(long ctx) longvideoDecoderStart(int codec_id, int new_width, int new_height) voidvideoDecoderStop(long ctx) byte[]videoEncoderEncode(long ctx, int[] px, int offset, int length) longvideoEncoderStart(int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval) voidvideoEncoderStop(long ctx) booleanwriteHeader(long ctx, MediaIO io) booleanwritePacket(long ctx, MediaIO io, int stream, byte[] data, int offset, int length, boolean keyFrame)
-
Method Details
-
getInstance
-
mediaLoadLibs
-
mediaSetLogging
void mediaSetLogging(boolean state) -
getVideoStream
int getVideoStream(long ctx) -
getAudioStream
int getAudioStream(long ctx) -
getVideoCodecID
int getVideoCodecID(long ctx) -
getAudioCodecID
int getAudioCodecID(long ctx) -
getVideoBitRate
int getVideoBitRate(long ctx) -
getAudioBitRate
int getAudioBitRate(long ctx) -
inputOpenFile
-
inputOpenIO
-
getDuration
long getDuration(long ctx) -
getVideoWidth
int getVideoWidth(long ctx) -
getVideoHeight
int getVideoHeight(long ctx) -
getVideoFrameRate
float getVideoFrameRate(long ctx) -
getVideoKeyFrameInterval
int getVideoKeyFrameInterval(long ctx) -
getAudioChannels
int getAudioChannels(long ctx) -
getAudioSampleRate
int getAudioSampleRate(long ctx) -
inputClose
-
inputOpenVideo
-
inputOpenAudio
-
inputRead
-
getPacketKeyFrame
boolean getPacketKeyFrame(long ctx) -
getPacketData
int getPacketData(long ctx, byte[] data, int offset, int length) -
inputSeek
-
outputCreateFile
-
outputCreateIO
-
addVideoStream
int addVideoStream(long ctx, MediaIO io, int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval) -
addAudioStream
-
outputClose
-
writeHeader
-
writePacket
boolean writePacket(long ctx, MediaIO io, int stream, byte[] data, int offset, int length, boolean keyFrame) -
audioDecoderStart
long audioDecoderStart(int codec_id, int new_chs, int new_freq) -
audioDecoderStop
void audioDecoderStop(long ctx) -
audioDecoderDecode
short[] audioDecoderDecode(long ctx, byte[] data, int offset, int length) -
audioDecoderGetChannels
int audioDecoderGetChannels(long ctx) -
audioDecoderGetSampleRate
int audioDecoderGetSampleRate(long ctx) -
audioDecoderChange
boolean audioDecoderChange(long ctx, int chs, int freq) -
audioEncoderStart
long audioEncoderStart(int codec_id, int bit_rate, int chs, int freq) -
audioEncoderStop
void audioEncoderStop(long ctx) -
audioEncoderEncode
byte[] audioEncoderEncode(long ctx, short[] samples, int offset, int length) -
audioEncoderGetAudioFramesize
int audioEncoderGetAudioFramesize(long ctx) -
videoDecoderStart
long videoDecoderStart(int codec_id, int new_width, int new_height) -
videoDecoderStop
void videoDecoderStop(long ctx) -
videoDecoderDecode
int[] videoDecoderDecode(long ctx, byte[] data, int offset, int length) -
videoDecoderGetWidth
int videoDecoderGetWidth(long ctx) -
videoDecoderGetHeight
int videoDecoderGetHeight(long ctx) -
videoDecoderGetFrameRate
float videoDecoderGetFrameRate(long ctx) -
videoDecoderChange
boolean videoDecoderChange(long ctx, int width, int height) -
videoEncoderStart
long videoEncoderStart(int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval) -
videoEncoderStop
void videoEncoderStop(long ctx) -
videoEncoderEncode
byte[] videoEncoderEncode(long ctx, int[] px, int offset, int length) -
compareFrames
float compareFrames(int[] frame1, int[] frame2, int width, int height)
-