mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
FFmpeg: Add tests, refactor package, and split into sub-packages #4604
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
19
internal/ffmpeg/encode/encoder_test.go
Normal file
19
internal/ffmpeg/encode/encoder_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package encode
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFindEncoder(t *testing.T) {
|
||||
t.Run("software", func(t *testing.T) {
|
||||
assert.Equal(t, "libx264", FindEncoder("software").String())
|
||||
})
|
||||
t.Run("apple", func(t *testing.T) {
|
||||
assert.Equal(t, "h264_videotoolbox", FindEncoder("apple").String())
|
||||
})
|
||||
t.Run("unsupported", func(t *testing.T) {
|
||||
assert.Equal(t, "libx264", FindEncoder("xxx").String())
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user