|
|
|
@ -121,10 +121,8 @@ public class SrsPublisher {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void startRecord(String recPath) {
|
|
|
|
|
if (mMp4Muxer != null) {
|
|
|
|
|
mMp4Muxer.record(new File(recPath));
|
|
|
|
|
}
|
|
|
|
|
public boolean startRecord(String recPath) {
|
|
|
|
|
return mMp4Muxer != null && mMp4Muxer.record(new File(recPath));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void stopRecord() {
|
|
|
|
@ -265,15 +263,6 @@ public class SrsPublisher {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void switchMute() {
|
|
|
|
|
AudioManager audioManager = (AudioManager) mCameraView.getContext().getSystemService(Context.AUDIO_SERVICE);
|
|
|
|
|
int oldMode = audioManager.getMode();
|
|
|
|
|
audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
|
|
|
|
|
boolean isMute = !audioManager.isMicrophoneMute();
|
|
|
|
|
audioManager.setMicrophoneMute(isMute);
|
|
|
|
|
audioManager.setMode(oldMode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setRtmpHandler(RtmpHandler handler) {
|
|
|
|
|
mFlvMuxer = new SrsFlvMuxer(handler);
|
|
|
|
|
if (mEncoder != null) {
|
|
|
|
|