photoprism/pkg/video/brands_test.go
Michael Mayer 2339197311 Live Photos: Add support for playing videos embedded in HEIC images #439
Related Issues:
- Samsung: Initial support for Motion Photos (#439)
- Google: Initial support for Motion Photos (#1739)
- Metadata: Flag Samsung/Google Motion Photos as Live Photos (#2788)

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-23 11:27:20 +02:00

26 lines
708 B
Go

package video
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestFileTypeOffset(t *testing.T) {
t.Run("mp4v-avc1.mp4", func(t *testing.T) {
index, err := FileTypeOffset("testdata/mp4v-avc1.mp4", CompatibleBrands)
require.NoError(t, err)
assert.Equal(t, 0, index)
})
t.Run("isom-avc1.mp4", func(t *testing.T) {
index, err := FileTypeOffset("testdata/isom-avc1.mp4", CompatibleBrands)
require.NoError(t, err)
assert.Equal(t, 0, index)
})
t.Run("image-isom-avc1.jpg", func(t *testing.T) {
index, err := FileTypeOffset("testdata/image-isom-avc1.jpg", CompatibleBrands)
require.NoError(t, err)
assert.Equal(t, 23209, index)
})
}