feat(ffmpeg): select frame by duration and float position (#40)

* seek duration private

* feat(ffmpeg): select frame by duration and float position
This commit is contained in:
Adrian Shum 2022-10-22 02:14:49 +08:00 committed by GitHub
parent b50c44e854
commit 7c18dcda7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 27 additions and 38 deletions

View file

@ -13,6 +13,7 @@ import (
"reflect"
"strings"
"testing"
"time"
)
var files = []string{
@ -71,7 +72,7 @@ func TestAVContext(t *testing.T) {
if n == 10 {
require.NoError(t, av.ProcessFrames(n))
} else if n == 99999 {
require.NoError(t, av.SeekPosition(0.6))
require.NoError(t, av.SelectDuration(time.Millisecond*500))
} else if n == 9999 {
require.NoError(t, av.SelectPosition(0.7))
} else if n > -1 {