ffmpeg

package
v0.0.0-...-9d62b2b Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodecIDRawVideo = CodecID(C.AV_CODEC_ID_RAWVIDEO)
)

Supported codec IDs.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

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

Codec wraps an AVCodec.

func FindDecoder

func FindDecoder(id CodecID) (Codec, error)

FindDecoder wraps avcodec_find_decoder.

func (Codec) CodecID

func (c Codec) CodecID() CodecID

CodecID wraps AVCodec.id.

func (Codec) NewContext

func (c Codec) NewContext(params CodecParameters) (CodecContext, error)

NewContext wraps avcodec_alloc_context3.

type CodecContext

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

CodecContext wraps an AVCodecContext.

func (CodecContext) Free

func (ctx CodecContext) Free()

Free wraps avcodec_free_context.

func (CodecContext) Height

func (ctx CodecContext) Height() int

Height wraps AVCodecContext.height.

func (CodecContext) ReceiveFrame

func (ctx CodecContext) ReceiveFrame(frame *Frame) error

ReceiveFrame wraps avcodec_receive_frame.

func (CodecContext) SendPacket

func (ctx CodecContext) SendPacket(p Packet) error

SendPacket wraps avcodec_send_packet.

func (CodecContext) Width

func (ctx CodecContext) Width() int

Width wraps AVCodecContext.width.

type CodecID

type CodecID C.enum_AVCodecID

CodecID represents an AVCodecID.

type CodecParameters

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

CodecParameters wraps a AVCodecParameters.

func (CodecParameters) CodecID

func (p CodecParameters) CodecID() CodecID

CodecID wraps AVCodecParameters.codec_id.

type DeviceInfo

type DeviceInfo struct {
	Name        string
	Description string
}

DeviceInfo wraps AvDeviceInfo

func ListInputSources

func ListInputSources(inputFormat InputFormat) ([]DeviceInfo, error)

ListInputSources wraps avdevice_list_input_sources.

type FormatContext

type FormatContext struct {
	SourceFilename string
	// contains filtered or unexported fields
}

FormatContext wraps a AVFormatContext.

func NewFormatContext

func NewFormatContext(filename string, inputFormat InputFormat) (FormatContext, error)

NewFormatContext wraps avformat_open_input().

func (FormatContext) Close

func (ctx FormatContext) Close()

Close wraps avformat_close_input.

func (FormatContext) Dump

func (ctx FormatContext) Dump()

Dump wraps av_dump_format.

func (FormatContext) GetStream

func (ctx FormatContext) GetStream(i int) (Stream, error)

func (FormatContext) ReadFrame

func (ctx FormatContext) ReadFrame() (Packet, error)

ReadFrame wraps av_read_frame.

type Frame

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

Frame wraps an AVFrame.

func NewFrame

func NewFrame() (Frame, error)

NewFrame wraps av_frame_alloc.

func (Frame) Data

func (f Frame) Data() unsafe.Pointer

Data wraps AVFrame.data[0].

func (Frame) Free

func (f Frame) Free()

Free wraps av_frame_free.

func (Frame) Linesize

func (f Frame) Linesize() int

Linesize wraps AVFrame.linesize[0].

type InputFormat

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

InputFormat wraps a AVInputFormat.

func NewInputFormat

func NewInputFormat(shortName string) (InputFormat, error)

NewInputFormat wraps av_find_input_format.

type Packet

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

Packet wraps a AVPacket.

func (Packet) Free

func (p Packet) Free()

Free unref counts the packet and frees it.

type Stream

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

Stream wraps an AVStream.

func (Stream) Codecpar

func (s Stream) Codecpar() CodecParameters

Jump to

Keyboard shortcuts

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