utils

package
v0.0.0-...-9c5431e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dst string, bufferSize int) (err error)

MIT Licensed code: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04

func CopyFile

func CopyFile(src string, dst string, buffersize int) error

func DownloadFile

func DownloadFile(filepath string, url string) error

func Unzip

func Unzip(src string, dest string) error

Types

type Camera

type Camera int
const (
	GoPro Camera = iota
	DJI
	Insta360
	Android
)

func CameraGet

func CameraGet(s string) (Camera, error)

type ConnectionType

type ConnectionType string
const (
	SDCard  ConnectionType = "sd_card"
	Connect ConnectionType = "connect"
)

type FFprobe

type FFprobe struct {
	ProgramPath string
}

func NewFFprobe

func NewFFprobe(path *string) FFprobe

func (*FFprobe) VideoSize

func (f *FFprobe) VideoSize(path string) (*VideoSizeResponse, error)

type Result

type Result struct {
	FilesImported    int
	FilesNotImported []string
	Errors           []error
}

type VideoSizeResponse

type VideoSizeResponse struct {
	Programs []interface{} `json:"programs"`
	Streams  []struct {
		Width      int    `json:"width"`
		Height     int    `json:"height"`
		RFrameRate string `json:"r_frame_rate"`
	} `json:"streams"`
}

type WriteCounter

type WriteCounter struct {
	Total uint64
}

func (WriteCounter) PrintProgress

func (wc WriteCounter) PrintProgress()

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL