summaryrefslogtreecommitdiff
path: root/internal/media/types.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-22 11:48:28 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-22 11:48:28 +0100
commit1659f75ae6e491355e1d32f0f5e8b956ef70a797 (patch)
tree0cc7aba9d8c98ee0163488121328e9cd0c6b32c2 /internal/media/types.go
parent[bugfix] fix media create error not being checked (#1283) (diff)
downloadgotosocial-1659f75ae6e491355e1d32f0f5e8b956ef70a797.tar.xz
[feature] For video attachments, store + return fps, bitrate, duration (#1282)
* start messing about with different mp4 metadata extraction * heyyooo it works * add test cow * move useful multierror to gtserror package * error out if video doesn't seem to be a real mp4 * test parsing mkv in disguise as mp4 * tidy up error handling * remove extraneous line * update framerate formatting * use float32 for aspect * fixy mctesterson
Diffstat (limited to 'internal/media/types.go')
-rw-r--r--internal/media/types.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/media/types.go b/internal/media/types.go
index e7edfe643..47a545cb2 100644
--- a/internal/media/types.go
+++ b/internal/media/types.go
@@ -137,7 +137,12 @@ type mediaMeta struct {
width int
height int
size int
- aspect float64
+ aspect float32
blurhash string
small []byte
+
+ // video-specific properties
+ duration float32
+ framerate float32
+ bitrate uint64
}