translate MediaPlayer into English

translate MediaPlayer into English
pull/112/head
xufulong 5 years ago
parent d63fb6ae9b
commit 6e3d24eeb5
  1. 2
      app/src/main/java/com/frank/ffmpeg/AudioPlayer.java
  2. 11
      app/src/main/java/com/frank/ffmpeg/MediaPlayer.java

@ -41,7 +41,7 @@ public class AudioPlayer {
public native static void lameClose();
/**
* Create an AudioTrack instance for JNI call
* Create an AudioTrack instance for JNI calling
*
* @param sampleRate sampleRate
* @param channels channel layout

@ -5,7 +5,7 @@ import android.media.AudioManager;
import android.media.AudioTrack;
/**
* 音视频播放器
* Using FFmpeg to play media
* Created by frank on 2018/2/12.
*/
@ -15,14 +15,17 @@ public class MediaPlayer {
}
public native int setup(String filePath, Object surface);
public native int play();
public native void release();
/**
* 创建一个AudioTrack对象
* @param sampleRate 采样率
* @param channels 声道布局
* Create an AudioTrack instance for JNI calling
*
* @param sampleRate sampleRate
* @param channels channel layout
* @return AudioTrack
*/
public AudioTrack createAudioTrack(int sampleRate, int channels) {

Loading…
Cancel
Save