Skip to content

Commit 052e5f5

Browse files
committed
新增对hevc支持,修复BUG
1 parent c85991f commit 052e5f5

File tree

10 files changed

+7
-5
lines changed

10 files changed

+7
-5
lines changed
269 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
8 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

joevideolib/src/main/java/VideoHandle/EpEditor.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package VideoHandle;
22

3-
import android.app.Activity;
4-
import android.app.Application;
53
import android.content.Context;
64
import android.media.MediaExtractor;
75
import android.media.MediaFormat;
@@ -323,7 +321,8 @@ public static void music(String videoin, String audioin, String output, float vi
323321
}
324322
cmd.append(output);
325323
mediaExtractor.release();
326-
execCmd(cmd, 0, onEditorListener);
324+
long d = VideoUitls.getDuration(videoin);
325+
execCmd(cmd, d, onEditorListener);
327326
}
328327

329328
/**
@@ -346,7 +345,8 @@ public static void demuxer(String videoin, String out, Format format, OnEditorLi
346345
break;
347346
}
348347
cmd.append(out);
349-
execCmd(cmd, 0, onEditorListener);
348+
long d = VideoUitls.getDuration(videoin);
349+
execCmd(cmd, d, onEditorListener);
350350
}
351351

352352
/**
@@ -565,9 +565,11 @@ public void onProgress(final float progress) {
565565
*/
566566
private static void execCmd(CmdList cmd, long duration, final OnEditorListener onEditorListener) {
567567
String[] cmds = cmd.toArray(new String[cmd.size()]);
568+
String cmdLog = "";
568569
for (String ss : cmds) {
569-
Log.v("EpMediaF", "cmd:" + ss);
570+
cmdLog += cmds;
570571
}
572+
Log.v("EpMediaF", "cmd:" + cmdLog);
571573
FFmpegCmd.exec(cmds, duration, new OnEditorListener() {
572574
@Override
573575
public void onSuccess() {

0 commit comments

Comments
 (0)