ffmpeg

package
v0.0.0-...-add2d34 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

package ffmpeg provides partial bindings for libavcodec and libavformat.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AVCodecVersion

func AVCodecVersion() (uint16, uint8, uint8)

AVCodecVersion return the LIBAVCODEC_VERSION constant

func AVFormatVersion

func AVFormatVersion() (uint16, uint8, uint8)

AVFormatVersion returns the LIBAVFORMAT_VERSION constant

Types

type AVError

type AVError C.int

func (AVError) Error

func (e AVError) Error() string

type CodecCtx

type CodecCtx uintptr

func (CodecCtx) Free

func (c CodecCtx) Free()

func (CodecCtx) GetSizeInfo

func (c CodecCtx) GetSizeInfo() (width, height, maxStride int)

func (CodecCtx) Open

func (c CodecCtx) Open() error

func (CodecCtx) ReadFrame

func (c CodecCtx) ReadFrame(f Frame) error

func (CodecCtx) SetLowres

func (c CodecCtx) SetLowres(lowres int)

type Filter

type Filter uintptr

func MakeFilter

func MakeFilter() (f Filter, err error)

func (Filter) AddInput

func (f Filter) AddInput(frm Frame, name string) (i FilterInput, err error)

func (Filter) Configure

func (f Filter) Configure(descr string, ycbcr bool) error

func (Filter) Free

func (f Filter) Free()

func (Filter) Get

func (f Filter) Get(frame Frame) error

type FilterInput

type FilterInput uintptr

func (FilterInput) Add

func (f FilterInput) Add(frame Frame) error

func (FilterInput) Free

func (f FilterInput) Free()

type FormatCtx

type FormatCtx uintptr

func OpenFormatFile

func OpenFormatFile(name string) (f FormatCtx, err error)

func OpenFormatStream

func OpenFormatStream(stream io.Reader) (f FormatCtx, err error)

func (FormatCtx) Dump

func (f FormatCtx) Dump()

func (FormatCtx) FindStream

func (f FormatCtx) FindStream(typ MediaType) (int, error)

func (FormatCtx) Free

func (f FormatCtx) Free()

func (FormatCtx) GetCodec

func (f FormatCtx) GetCodec(stream int) (c CodecCtx, err error)

func (FormatCtx) SetDiscard

func (f FormatCtx) SetDiscard()

type Frame

type Frame uintptr

func MakeFrame

func MakeFrame() (f Frame, err error)

func (Frame) ClearTimestamp

func (f Frame) ClearTimestamp()

func (Frame) FillRGBA

func (f Frame) FillRGBA(w, h int) error

func (Frame) FillWhite

func (f Frame) FillWhite(w, h int) error

func (Frame) FillYCbCr

func (f Frame) FillYCbCr(w, h int, ratio image.YCbCrSubsampleRatio) error

func (Frame) FillYCbCr420

func (f Frame) FillYCbCr420(w, h int) error

func (Frame) Free

func (f Frame) Free()

func (Frame) GoImg

func (f Frame) GoImg() image.Image

func (Frame) HasAlpha

func (f Frame) HasAlpha() bool

func (Frame) Scale

func (f Frame) Scale(t Frame, flags SWSFlag) error

func (Frame) SetSize

func (f Frame) SetSize(width int, height int)

func (Frame) Size

func (f Frame) Size() (width int, height int)

type MediaType

type MediaType C.enum_AVMediaType
const (
	MediaTypeUnkown     MediaType = C.AVMEDIA_TYPE_UNKNOWN
	MediaTypeVideo      MediaType = C.AVMEDIA_TYPE_VIDEO
	MediaTypeAudio      MediaType = C.AVMEDIA_TYPE_AUDIO
	MediaTypeData       MediaType = C.AVMEDIA_TYPE_DATA
	MediaTypeSubtitle   MediaType = C.AVMEDIA_TYPE_SUBTITLE
	MediaTypeAttachment MediaType = C.AVMEDIA_TYPE_ATTACHMENT
	MediaTypeNb         MediaType = C.AVMEDIA_TYPE_NB
)

type SWSFlag

type SWSFlag int
const (
	SWSFastBilinear SWSFlag = C.SWS_FAST_BILINEAR
	SWSBilinear     SWSFlag = C.SWS_BILINEAR
	SWSBicubic      SWSFlag = C.SWS_BICUBIC
	SWSX            SWSFlag = C.SWS_X
	SWSPoint        SWSFlag = C.SWS_POINT
	SWSArea         SWSFlag = C.SWS_AREA
	SWSBicublin     SWSFlag = C.SWS_BICUBLIN
	SWSGuass        SWSFlag = C.SWS_GAUSS
	SWSSinc         SWSFlag = C.SWS_SINC
	SWSLanczos      SWSFlag = C.SWS_LANCZOS
	SWSSpline       SWSFlag = C.SWS_SPLINE
)

Jump to

Keyboard shortcuts

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