Skip to content

Commit bef5dbf

Browse files
committed
修改爆红提示
1 parent 32d7325 commit bef5dbf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/src/main/java/com/tencent/iotvideo/link/decoder/VideoDecoder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static com.tencent.iotvideo.link.util.UtilsKt.getFile;
44

5+
import android.annotation.SuppressLint;
56
import android.media.MediaCodec;
67
import android.media.MediaCodecInfo;
78
import android.media.MediaFormat;
@@ -53,6 +54,7 @@ public void startVideo(int width, int height, Surface surface) throws IOExceptio
5354
}
5455
}
5556

57+
@SuppressLint("WrongConstant")
5658
private void initVideo(int width, int height, Surface surface) throws IOException {
5759
mVideoExecutor = Executors.newSingleThreadExecutor();
5860
mVideoCodec = MediaCodec.createDecoderByType(MediaFormat.MIMETYPE_VIDEO_AVC);

app/src/main/java/com/tencent/iotvideo/link/encoder/AudioEncoder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.tencent.iotvideo.link.encoder;
22

3+
import android.annotation.SuppressLint;
34
import android.media.AudioRecord;
45
import android.media.MediaCodec;
56
import android.media.MediaCodecInfo;
@@ -77,6 +78,7 @@ public void setOnEncodeListener(OnEncodeListener listener) {
7778
this.encodeListener = listener;
7879
}
7980

81+
@SuppressLint("MissingPermission")
8082
private void initAudio() {
8183
bufferSizeInBytes = 2 * AudioRecord.getMinBufferSize(micParam.getSampleRateInHz(), micParam.getChannelConfig(), micParam.getAudioFormat());
8284
Log.d(TAG, "=====bufferSizeInBytes: " + bufferSizeInBytes);

0 commit comments

Comments
 (0)