hitfilm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MillisecondsToFrames

func MillisecondsToFrames(milliseconds int64, frameRate int) int

func PreprocessContent

func PreprocessContent(content string, formatId string) *etree.Element

Types

type AudioVideoSettings

type AudioVideoSettings struct {
	Width     int16 `xml:"Width"`
	Height    int16 `xml:"Height"`
	FrameRate int8  `xml:"FrameRate"`
	Element   *etree.Element
}

func NewAudioVideoSettings

func NewAudioVideoSettings() *AudioVideoSettings

func (*AudioVideoSettings) FetchFromEditorSequence

func (avs *AudioVideoSettings) FetchFromEditorSequence(es *EditorSequence)

type BehaviorEffects

type BehaviorEffects struct {
	Element *etree.Element
}

func NewBehaviorEffects

func NewBehaviorEffects() *BehaviorEffects

func (*BehaviorEffects) FetchFromVisualObject

func (b *BehaviorEffects) FetchFromVisualObject(vo *VisualObject)

type BiffProject

type BiffProject struct {
	Document *etree.Document
	Project  *Project
}

func NewBiffProject

func NewBiffProject() *BiffProject

func NewBiffProjectFromFilePath

func NewBiffProjectFromFilePath(projectFilePath string) (*BiffProject, error)

func (*BiffProject) FetchFromFilePath

func (bp *BiffProject) FetchFromFilePath(projectFilePath string) error

func (*BiffProject) FetchProject

func (bp *BiffProject) FetchProject()

type Default

type Default struct {
	V       int   `xml:"V,attr"`
	B       *int8 `xml:"b"`
	Db      *int8 `xml:"db"`
	Fl      *int8 `xml:"fl"`
	P2      *P2   `xml:"p2"`
	Sc      *Sc   `xml:"sc"`
	Element *etree.Element
}

func NewDefault

func NewDefault(
	b *int8,
	db *int8,
	fl *int8,
	p2 *P2,
	sc *Sc,
) *Default

func (*Default) FetchFromProp

func (d *Default) FetchFromProp(p *Prop)

type EditorSequence

type EditorSequence struct {
	ID                 string              `xml:"ID"`
	AudioVideoSettings *AudioVideoSettings `xml:"AudioVideoSettings"`
	Video              *Video              `xml:"Video"`
	Element            *etree.Element
}

func NewEditorSequence

func NewEditorSequence() *EditorSequence

func (*EditorSequence) FetchFromProject

func (es *EditorSequence) FetchFromProject(p *Project)

type Effects

type Effects struct {
	Element *etree.Element
}

func NewEffects

func NewEffects() *Effects

func (*Effects) FetchFromObjectBase

func (e *Effects) FetchFromObjectBase(o *ObjectBase)

type FillColor

type FillColor struct {
	G       int8 `xml:"G,attr"`
	R       int8 `xml:"R,attr"`
	A       int8 `xml:"A,attr"`
	B       int8 `xml:"B,attr"`
	Element *etree.Element
}

func NewFillColor

func NewFillColor() *FillColor

func (*FillColor) FetchFromFillColors

func (fi *FillColor) FetchFromFillColors(fo *Format)

type Format

type Format struct {
	Version         int        `xml:"Version,attr"`
	ID              string     `xml:"ID,attr"`
	VerticalScale   int8       `xml:"VerticalScale,attr"`
	HorizontalScale int8       `xml:"HorizontalScale,attr"`
	Size            uint8      `xml:"Size,attr"`
	Script          int8       `xml:"Script,attr"`
	BaselineShift   int8       `xml:"BaselineShift,attr"`
	Strikethrough   int8       `xml:"Strikethrough,attr"`
	Tracking        int8       `xml:"Tracking,attr"`
	Leading         int8       `xml:"Leading,attr"`
	Underline       int8       `xml:"Underline,attr"`
	Capitalization  int8       `xml:"Capitalization,attr"`
	StrokeLocation  int8       `xml:"StrokeLocation,attr"`
	Family          string     `xml:"Family"`
	Style           string     `xml:"Style"`
	PostscriptName  string     `xml:"PostscriptName"`
	FillColor       *FillColor `xml:"FillColor"`
	Element         *etree.Element
}

func NewFormat

func NewFormat(size uint8) *Format

func (*Format) FetchFromFormats

func (f *Format) FetchFromFormats(fs *Formats, k int)

type Formats

type Formats struct {
	Formats []*Format `xml:"Format"`
	Element *etree.Element
}

func NewFormats

func NewFormats(size uint8) *Formats

func (*Formats) FetchFromTextBox

func (f *Formats) FetchFromTextBox(tb *TextBox)

type HitFilm

type HitFilm struct {
	BiffProject *BiffProject
	// contains filtered or unexported fields
}

func NewHitFilm

func NewHitFilm() *HitFilm

func NewHitFilmFromFilePath

func NewHitFilmFromFilePath(projectFilePath string) (*HitFilm, error)

func (*HitFilm) AddSubTitles

func (hf *HitFilm) AddSubTitles(subtitles *etree.Element)

func (*HitFilm) AddSubTitlesFromSRTFile

func (hf *HitFilm) AddSubTitlesFromSRTFile(file *os.File, size uint8) error

func (*HitFilm) FetchFromFilePath

func (hf *HitFilm) FetchFromFilePath(projectFilePath string) error

func (*HitFilm) GetFrameRate

func (hf *HitFilm) GetFrameRate() int8

func (*HitFilm) GetHeight

func (hf *HitFilm) GetHeight() int16

func (*HitFilm) GetName

func (hf *HitFilm) GetName() string

func (*HitFilm) GetSequenceID

func (hf *HitFilm) GetSequenceID() string

func (*HitFilm) GetWidth

func (hf *HitFilm) GetWidth() int16

func (*HitFilm) SetIndent

func (hf *HitFilm) SetIndent(indentSpaces int)

type Masks

type Masks struct {
	Element *etree.Element
}

func NewMasks

func NewMasks() *Masks

func (*Masks) FetchFromVisualObject

func (m *Masks) FetchFromVisualObject(vo *VisualObject)

type ObjectBase

type ObjectBase struct {
	Version         int              `xml:"Version,attr"`
	ID              string           `xml:"ID"`
	SequenceID      string           `xml:"SequenceID"`
	ParentTrackID   string           `xml:"ParentTrackID"`
	LinkedObjectID  string           `xml:"LinkedObjectID"`
	Name            string           `xml:"Name"`
	StartFrame      int16            `xml:"StartFrame"`
	EndFrame        int16            `xml:"EndFrame"`
	Label           string           `xml:"Label"`
	Effects         *Effects         `xml:"Effects"`
	PropertyManager *PropertyManager `xml:"PropertyManager"`
	Element         *etree.Element
}

func NewObjectBase

func NewObjectBase(
	sequenceID string,
	parentTrackID string,
	startFrame int16,
	endFrame int16,
	height int16,
) *ObjectBase

func (*ObjectBase) FetchFromVisualObject

func (ob *ObjectBase) FetchFromVisualObject(vo *VisualObject)

type Objects

type Objects struct {
	TextVisualObjects []*TextVisualObject `xml:"TextVisualObject"`
	Element           *etree.Element
}

func NewObjects

func NewObjects(sequenceID string, parentTrackID string, witdh int16) *Objects

func (*Objects) AddChild

func (o *Objects) AddChild(textVisualObjectElement *etree.Element)

func (*Objects) AddTextVisualObject

func (o *Objects) AddTextVisualObject(textVisualObject *TextVisualObject)

func (*Objects) FetchFromVideoTrack

func (o *Objects) FetchFromVideoTrack(vt *VideoTrack)

type P2

type P2 struct {
	X       float64 `xml:"X,attr"`
	Y       float64 `xml:"Y,attr"`
	Element *etree.Element
}

func NewP2

func NewP2(
	x float64,
	y float64,
) *P2

func (*P2) FetchFromDefault

func (p *P2) FetchFromDefault(d *Default)

func (*P2) FetchFromStatic

func (p *P2) FetchFromStatic(s *Static)

type Project

type Project struct {
	Name           string          `xml:"Name"`
	EditorSequence *EditorSequence `xml:"EditorSequence"`
	Element        *etree.Element
}

func NewProject

func NewProject() *Project

func (*Project) FetchFromBiffProject

func (p *Project) FetchFromBiffProject(bp *BiffProject)

type Prop

type Prop struct {
	Spatial    int8     `xml:"Spatial,attr"`
	CanInterpT int8     `xml:"CanInterpT,attr"`
	Type       int8     `xml:"Type,attr"`
	Name       string   `xml:"Name"`
	Default    *Default `xml:"Default"`
	Static     *Static  `xml:"Static"`
	Element    *etree.Element
}

func NewProp

func NewProp(
	spatial int8,
	canInterpT int8,
	propType int8,
	name string,
	propDefault *Default,
	static *Static,
) *Prop

func (*Prop) FetchFromPropertyManager

func (p *Prop) FetchFromPropertyManager(pm *PropertyManager, k int)

type PropertyManager

type PropertyManager struct {
	Version int     `xml:"Version,attr"`
	Props   []*Prop `xml:"Prop"`
	Element *etree.Element
}

func NewPropertyManager

func NewPropertyManager(height int16) *PropertyManager

func (*PropertyManager) FetchFromObjectBase

func (pm *PropertyManager) FetchFromObjectBase(o *ObjectBase)

type Sc

type Sc struct {
	X       float64 `xml:"X,attr"`
	Y       float64 `xml:"Y,attr"`
	Z       float64 `xml:"Z,attr"`
	Element *etree.Element
}

func NewSc

func NewSc(
	x float64,
	y float64,
	z float64,
) *Sc

func (*Sc) FetchFromDefault

func (s *Sc) FetchFromDefault(d *Default)

type Static

type Static struct {
	V       int `xml:"V,attr"`
	P2      *P2 `xml:"p2"`
	Element *etree.Element
}

func NewStatic

func NewStatic(
	p2 *P2,
) *Static

func (*Static) FetchFromProp

func (s *Static) FetchFromProp(p *Prop)

func (*Static) FetchFromStaticertyManager

func (s *Static) FetchFromStaticertyManager(p *Prop, k int)

type TextBox

type TextBox struct {
	Version           int      `xml:"Version,attr"`
	ID                string   `xml:"ID"`
	MinX              string   `xml:"MinX"`
	MaxX              string   `xml:"MaxX"`
	MinY              string   `xml:"MinY"`
	MaxY              string   `xml:"MaxY"`
	Mode              int8     `xml:"Mode"`
	VerticalAlignment int8     `xml:"VerticalAlignment"`
	TopIndentation    int8     `xml:"TopIndentation"`
	BottomIndentation int8     `xml:"BottomIndentation"`
	Tokens            *Tokens  `xml:"Tokens"`
	Formats           *Formats `xml:"Formats"`
	Element           *etree.Element
}

func NewTextBox

func NewTextBox(witdh int16, content string, size uint8) *TextBox

func (*TextBox) FetchFromTextVisualObject

func (t *TextBox) FetchFromTextVisualObject(tvo *TextVisualObject)

type TextVisualObject

type TextVisualObject struct {
	Version      int           `xml:"Version,attr"`
	TextBox      *TextBox      `xml:"TextBox"`
	VisualObject *VisualObject `xml:"VisualObject"`
	Element      *etree.Element
}

func NewTextVisualObject

func NewTextVisualObject(
	sequenceID string,
	parentTrackID string,
	startFrame int16,
	endFrame int16,
	witdh int16,
	height int16,
	content string,
	size uint8,
) *TextVisualObject

func (*TextVisualObject) AddChild

func (tvo *TextVisualObject) AddChild(element *etree.Element)

func (*TextVisualObject) FetchFromObjects

func (tvo *TextVisualObject) FetchFromObjects(o *Objects, k int)

type Tk

type Tk struct {
	Ri      *int8   `xml:"Ri,attr,omitempty"`
	Jf      *int8   `xml:"Jf,attr,omitempty"`
	V       int8    `xml:"V,attr"`
	Tp      int8    `xml:"Tp,attr"`
	Fi      *int8   `xml:"Fi,attr,omitempty"`
	Sb      *int8   `xml:"Sb,attr,omitempty"`
	Sa      *int8   `xml:"Sa,attr,omitempty"`
	Li      *int8   `xml:"Li,attr,omitempty"`
	Ch      *int32  `xml:"Ch,attr,omitempty"`
	Ft      *string `xml:"Ft,attr,omitempty"`
	Element *etree.Element
}

func NewTk

func NewTk(
	tp int8,
	ri *int8,
	jf *int8,
	fi *int8,
	sb *int8,
	sa *int8,
	li *int8,
	ch *int32,
	ft *string,
) *Tk

func (*Tk) FetchFromTokens

func (tk *Tk) FetchFromTokens(t *Tokens, k int)

type Tokens

type Tokens struct {
	Tks     []*Tk `xml:"Tk"`
	Element *etree.Element
}

func NewTokens

func NewTokens(content string, formatId string) *Tokens

func (*Tokens) FetchFromTextBox

func (t *Tokens) FetchFromTextBox(tb *TextBox)

type Video

type Video struct {
	VideoTracks []*VideoTrack `xml:"VideoTrack"`
	Element     *etree.Element
}

func NewVideo

func NewVideo() *Video

func (*Video) AddVideoTrack

func (v *Video) AddVideoTrack(videoTrack *VideoTrack)

func (*Video) FetchFromEditorSequence

func (v *Video) FetchFromEditorSequence(es *EditorSequence)

type VideoTrack

type VideoTrack struct {
	Version int      `xml:"Version,attr"`
	ID      string   `xml:"ID"`
	Name    string   `xml:"Name"`
	Visible int8     `xml:"Visible"`
	Locked  int8     `xml:"Locked"`
	Objects *Objects `xml:"Objects"`
	Element *etree.Element
}

func NewVideoTrack

func NewVideoTrack(
	sequenceID string,
	witdh int16,
) *VideoTrack

func (*VideoTrack) FetchFromVideo

func (vt *VideoTrack) FetchFromVideo(v *Video, k int)

type VisualObject

type VisualObject struct {
	Version         int              `xml:"Version,attr"`
	BlendMode       int8             `xml:"BlendMode"`
	MotionBlur      int8             `xml:"MotionBlur"`
	Masks           *Masks           `xml:"Masks"`
	BehaviorEffects *BehaviorEffects `xml:"BehaviorEffects"`
	ObjectBase      *ObjectBase      `xml:"ObjectBase"`
	Element         *etree.Element
}

func NewVisualObject

func NewVisualObject(
	sequenceID string,
	parentTrackID string,
	startFrame int16,
	endFrame int16,
	height int16,
) *VisualObject

func (*VisualObject) FetchFromTextVisualObject

func (vo *VisualObject) FetchFromTextVisualObject(tvo *TextVisualObject)

Jump to

Keyboard shortcuts

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