Skip to content

Commit ce28328

Browse files
committed
提交代码,准备绘制视频界面
1 parent b929ed5 commit ce28328

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
android:supportsRtl="true"
1818
android:theme="@style/MyTheme">
1919
<activity android:name=".MainActivity">
20+
<intent-filter>
21+
<action android:name="android.intent.action.MAIN" />
2022

23+
<category android:name="android.intent.category.LAUNCHER" />
24+
</intent-filter>
2125
</activity>
2226
<activity android:name=".blocks.BlocksActivity" />
2327
<activity android:name=".blocks.mediaCodec.MediaCodecActivity" />

app/src/main/java/com/aserbao/androidcustomcamera/whole/createVideoByVoice/CreateVideoByAudioDbActivity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void onViewClicked(View view) {
5555
mMuxerVoiceAndVideo = new MuxerVoiceAndVideo(new IMuxerVideoCallBackListener() {
5656
@Override
5757
public void success() {
58-
Log.e(TAG, "合成 success: " + (System.currentTimeMillis() - mStartTime) / (float) 1000 + "s");
58+
Log.e(TAG, "合成 success: " + (System.currentTimeMillis() - mStartTime)+ "s");
5959
}
6060

6161
@Override
@@ -68,15 +68,14 @@ public void failed() {
6868
@Override
6969
public void success(final String outputMeidaPath, final float finalMediaTime) {
7070
mGetAudioDb.stop();
71-
// mPlayVideoBtn.performClick();
7271
runOnUiThread(new Runnable() {
7372
@Override
7473
public void run() {
7574
mMuxerVoiceAndVideo.startMuxer(outputMeidaPath, inputAudioPath,finalMediaTime,outputMediaPath);
7675
}
7776
});
7877

79-
Log.e(TAG, "编码 success: 耗时: " + (System.currentTimeMillis() - mStartTime) / (float) 1000 + "s");
78+
Log.e(TAG, "编码 success: 耗时: " + (System.currentTimeMillis() - mStartTime) + "s");
8079
}
8180

8281
@Override

app/src/main/java/com/aserbao/androidcustomcamera/whole/createVideoByVoice/EncoderVideo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ public void update(boolean isEnd,float volume,float cuurTime){
8383
}
8484
}else{
8585
Log.e(TAG, "update: " + cuurTime + " cuurFrame = " + cuurFrame + " volume = "+ volume + " over ");
86-
finalMediaTime = cuurTime;
86+
finalMediaTime = cuurTime / (float) 1000;
8787
stopRecording();
8888
}
8989
}else{
9090
Log.e(TAG, "update: " + cuurTime + " cuurFrame = " + cuurFrame + " volume = "+ volume + " over ");
91-
finalMediaTime = MEDIA_MAX_TIME;
91+
finalMediaTime = MEDIA_MAX_TIME/ (float) 1000;
9292
stopRecording();
9393
}
9494
}

0 commit comments

Comments
 (0)