isobmff

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBrandNotSupported        = errors.New("error brand not supported")
	ErrBufLength                = errors.New("insufficient buffer length")
	ErrItemTypeWS               = errors.New("itemType doesn't end on whitespace")
	ErrRemainLengthInsufficient = errors.New("remain length insufficient")
	ErrFlagsLength              = errors.New("failed to read 4 bytes of Flags")
	ErrItemTypeLength           = errors.New("insufficient itemType Length")

	ErrWrongBoxType = errors.New("error wrong box type")

	// ErrInfeVersionNotSupported is returned when an infe box with an unsupported was found.
	ErrInfeVersionNotSupported = errors.New("infe box version not supported")
)

Errors

Functions

This section is empty.

Types

type Brand

type Brand uint8

Brand of ISOBMFF ftyp

func (Brand) String

func (b Brand) String() string

String is the Stringer interface for Brand

type CNCVBox

type CNCVBox struct {
	// contains filtered or unexported fields
}

CNCVBox is Canon Compressor Version box CaNon Codec Version?

type CR3MetaBox

type CR3MetaBox struct {
	//CCTP CCTPBox
	//THMB THMBBox
	CNCV CNCVBox
	CTBO CTBOBox
	Exif [4]meta.ExifHeader
}

CR3MetaBox is a uuidBox that contains Metadata for CR3 files

type CR3Trak

type CR3Trak struct {
	ImageSize, Offset uint32
	Width, Height     uint16
	Depth, ImageType  uint16
}

CR3Trak is a Canon CR3 Trak box

type CTBOBox

type CTBOBox struct {
	// contains filtered or unexported fields
}

CTBOBox is a Canon tracks base offsets Box? items are [2]{offset,length}

func (CTBOBox) MarshalZerologArray

func (ctbo CTBOBox) MarshalZerologArray(a *zerolog.Array)

MarshalZerologArray is a zerolog interface for logging

type CrxMoovBox

type CrxMoovBox struct {
	Meta CR3MetaBox
	Trak [5]CR3Trak
}

CrxMoovBox is a Canon Raw Moov Box

type ExifReader

type ExifReader func(r io.Reader, h meta.ExifHeader) error

type FileTypeBox

type FileTypeBox struct {
	Compatible   [maxBrandCount]Brand // all 4 bytes
	MinorVersion [4]byte              // 4 bytes
	MajorBrand   Brand                // 4 bytes
}

FileTypeBox is a BMFF FileTypeBox

type HeicMeta

type HeicMeta struct {
	// contains filtered or unexported fields
}

type IpmaItem

type IpmaItem struct {
	ItemID       uint32
	Associations [6]uint16
}

ItemPropertyAssociationItem is not a box

type ItemPropertiesBox

type ItemPropertiesBox struct {
	PropertyContainer ItemPropertyContainerBox
	//Associations      []ItemPropertyAssociation // at least 1
	Associations ItemPropertyAssociation
}

ItemPropertiesBox is an ISOBMFF "iprp" box

type ItemPropertyAssociation

type ItemPropertyAssociation struct {
	//Flags      Flags
	//EntryCount uint32
	Entries []IpmaItem
}

ItemPropertyAssociation is an ISOBMFF "ipma" box

type ItemPropertyContainerBox

type ItemPropertyContainerBox struct{}

type ItemTypeReferenceBox

type ItemTypeReferenceBox struct{}

ItemTypeReferenceBox is an "iref" box.

Item Reference box iref enables creating directional links from an item to one or several other items. Item references are extensively used by HEIF. For instance, thumbnail images are recognized from a thumbnail type reference which links from the thumbnail image to the master image. dimg -> derived image thmb -> thumbnail cdsc -> context description ref / exif

type Reader

type Reader struct {
	ExifReader func(r io.Reader, h meta.ExifHeader) error
	XMPReader  func(r io.Reader) error
	// contains filtered or unexported fields
}

Reader is a ISO BMFF reader

func NewReader

func NewReader(r io.Reader) Reader

NewReader returns a new bmff.Reader

func (*Reader) Close

func (r *Reader) Close()

Close the Reader. Returns the underlying bufio.Reader to the reader pool.

func (*Reader) ReadFTYP

func (r *Reader) ReadFTYP() (err error)

ReadFTYP reads an 'ftyp' box from a BMFF file.

This should be the first read function called.

func (*Reader) ReadMetadata

func (r *Reader) ReadMetadata() (err error)

Jump to

Keyboard shortcuts

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