ogg

package
v0.0.0-...-d57bbc6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOggOpusFile

func IsOggOpusFile(reader io.Reader) bool

IsOggOpusFile detects if given content:

  • file is an ogg file
  • ogg is encoded with opus codec

Types

type Metadata

type Metadata struct {
	CapturePattern        [4]byte
	Version               int8
	HeaderType            int8
	GranulePosition       int64
	BitStreamSerialNumber int32
	PageSequenceNumber    int32
	Checksum              int32
	PageSegments          uint8
}

func (*Metadata) Read

func (m *Metadata) Read(reader io.Reader) (err error)

type Page

type Page struct {
	Metadata *Metadata
	Segments []Segment
}

func ReadPage

func ReadPage(reader io.Reader) (page *Page, err error)

ReadPage reads a page of OGG file.

type Segment

type Segment []byte

Jump to

Keyboard shortcuts

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