structs

package
v1.2.26 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExifData

type ExifData struct {
	ExifData *exif.Exif
}

ExifData represents the exif data of an image.

func (ExifData) ToJson

func (e ExifData) ToJson() ([]byte, error)

convert the exif data to json

func (ExifData) ToString

func (e ExifData) ToString() string

convert the exif data to a string

type ScanResult

type ScanResult struct {
	Timecodes []string
	Frames    []int
	VideoInfo VideoInfo
}

ScanResult represents the result of a video scan.

func (ScanResult) Json

func (s ScanResult) Json() (string, error)

ToJson returns a JSON string representation of the ScanResult struct.

func (ScanResult) JsonBeautify

func (s ScanResult) JsonBeautify() (string, error)

ToJsonBeatuify returns a JSON string representation of the ScanResult struct with indentation for readability.

func (ScanResult) String

func (s ScanResult) String() string

ToString returns a string representation of the ScanResult struct.

type VideoInfo

type VideoInfo struct {
	TotalFrames int     `json:"totalFrames"`
	FPS         int     `json:"fps"`
	Duration    string  `json:"duration"`
	Filename    string  `json:"filename"`
	Codec       string  `json:"codec"`
	Width       int     `json:"width"`
	Height      int     `json:"height"`
	AspectRatio float64 `json:"aspectRatio"`
}

VideoInfo represents information about a video file.

func (VideoInfo) JsonBeautify

func (s VideoInfo) JsonBeautify() (string, error)

ToJsonBeatuify returns a JSON string representation of the VideoInfo struct with indentation for readability.

func (VideoInfo) ToJson

func (s VideoInfo) ToJson() (string, error)

ToJson returns a JSON string representation of the VideoInfo struct.

func (VideoInfo) ToString

func (s VideoInfo) ToString() string

ToString returns a string representation of the VideoInfo struct.

Jump to

Keyboard shortcuts

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