media

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package media provides media open, close and conversion support

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *manager

func NewCodecEncoder

func NewCodecEncoder(id ffmpeg.AVCodecID) *codec

Create a codec from a AVCodecID for a stream

func NewDecoder

func NewDecoder(stream *stream) *decoder

Create a decoder for a stream

func NewEncoderWithCodec

func NewEncoderWithCodec(codec *ffmpeg.AVCodec) *encoder

Create a encoder for a stream

func NewFrame

func NewFrame() *frame

func NewInputDevice

func NewInputDevice(device MediaFormat, cb func(Media) error) (*input, error)

func NewInputFile

func NewInputFile(path string, format MediaFormat, cb func(Media) error) (*input, error)

func NewInputFormat

func NewInputFormat(ctx *ffmpeg.AVInputFormat, flags MediaFlag) *format_in

Create a input format container

func NewInputURL

func NewInputURL(path string, format MediaFormat, cb func(Media) error) (*input, error)

func NewMap

func NewMap(media Media, flags MediaFlag) (*decodemap, error)

func NewMetadata

func NewMetadata(ctx **ffmpeg.AVDictionary) *metadata

Create new metadata object. The metadata is odd, in that when there are no entries the dictionary gets freed, and when there are entries the dictionary is allocated. So we have to use a pointer to a pointer

func NewOutputDevice

func NewOutputDevice(device MediaFormat, cb func(Media) error) (*output, error)

func NewOutputFile

func NewOutputFile(path string, cb func(Media) error) (*output, error)

func NewOutputFormat

func NewOutputFormat(ctx *ffmpeg.AVOutputFormat, flags MediaFlag) *format_out

Create a output format container

func NewPacket

func NewPacket(fn func(int) Stream) *packet

func NewResampler

func NewResampler(dest, src AudioFormat) *resampler

Create a new resampler for a frame

func NewScalar

func NewScalar(src, dest *ffmpeg.AVFrame) *rescaler

Create a new video scalar for a source and destination frame. If the destination is nil then use the sample parameters as the source.

func NewStream

func NewStream(ctx *ffmpeg.AVStream) *stream

func PrintVersion

func PrintVersion(w io.Writer)

Types

This section is empty.

Jump to

Keyboard shortcuts

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