Skip to content

Commit

Permalink
修改爆红提示
Browse files Browse the repository at this point in the history
  • Loading branch information
neilyhe committed Jan 22, 2025
1 parent 32d7325 commit bef5dbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

import android.annotation.SuppressLint;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
Expand Down Expand Up @@ -53,6 +54,7 @@ public void startVideo(int width, int height, Surface surface) throws IOExceptio
}
}

@SuppressLint("WrongConstant")
private void initVideo(int width, int height, Surface surface) throws IOException {
mVideoExecutor = Executors.newSingleThreadExecutor();
mVideoCodec = MediaCodec.createDecoderByType(MediaFormat.MIMETYPE_VIDEO_AVC);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.tencent.iotvideo.link.encoder;

import android.annotation.SuppressLint;
import android.media.AudioRecord;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
Expand Down Expand Up @@ -77,6 +78,7 @@ public void setOnEncodeListener(OnEncodeListener listener) {
this.encodeListener = listener;
}

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

0 comments on commit bef5dbf

Please sign in to comment.