Documentation ¶
Index ¶
- Constants
- Variables
- func Clip(x, min, max int) int
- func ParseTime(timestr string, duration bool) (int64, error)
- func Rescale(a, b, c int64) int64
- func RescaleByRationals(a int64, bq, cq *Rational) int64
- func SetLogLevel(level LogLevel)
- func String(str string) *string
- func Version() (int, int, int)
- type AudioFifo
- func (a *AudioFifo) Drain(nb_samples int) error
- func (a *AudioFifo) Free()
- func (a *AudioFifo) Peek(maxSamples int, frame *Frame) (int, error)
- func (a *AudioFifo) PeekAt(nb_samples, offset int, frame *Frame) (int, error)
- func (a *AudioFifo) Read(nb_samples int, frame *Frame) (int, error)
- func (a *AudioFifo) Realloc(nb_samples int) error
- func (a *AudioFifo) Reset()
- func (a *AudioFifo) Size() int
- func (a *AudioFifo) Space() int
- func (a *AudioFifo) Write(data unsafe.Pointer, nb_samples int) (int, error)
- type ChannelLayout
- type ChromaLocation
- type Class
- type Dictionary
- func (dict *Dictionary) Copy() *Dictionary
- func (dict *Dictionary) Count() int
- func (dict *Dictionary) Delete(key string) error
- func (dict *Dictionary) Free()
- func (dict *Dictionary) Get(key string) string
- func (dict *Dictionary) GetInsensitive(key string) string
- func (dict *Dictionary) GetInsensitiveOk(key string) (string, bool)
- func (dict *Dictionary) GetOk(key string) (string, bool)
- func (dict *Dictionary) Has(key string) bool
- func (dict *Dictionary) HasInsensitive(key string) bool
- func (dict *Dictionary) Keys() []string
- func (dict *Dictionary) Map() map[string]string
- func (dict *Dictionary) Pointer() unsafe.Pointer
- func (dict *Dictionary) Set(key, value string) error
- func (dict *Dictionary) SetInsensitive(key, value string) error
- func (dict *Dictionary) String(keyValSep, pairsSep byte) (string, error)
- func (dict *Dictionary) Value() unsafe.Pointer
- func (dict *Dictionary) Values() []string
- type Error
- type ErrorCode
- type Expr
- type Frame
- func (f *Frame) BestEffortTimestamp() int64
- func (f *Frame) ChannelLayout() ChannelLayout
- func (f *Frame) Channels() int
- func (f *Frame) CodedPictureNumber() int
- func (f *Frame) Data(index int) unsafe.Pointer
- func (f *Frame) DisplayPictureNumber() int
- func (f *Frame) ExtendedData() unsafe.Pointer
- func (f *Frame) Free()
- func (f *Frame) GetBuffer() error
- func (f *Frame) GetBufferWithAlignment(alignment int) error
- func (f *Frame) Height() int
- func (f *Frame) KeyFrame() bool
- func (f *Frame) LineSize(index int) int
- func (f *Frame) Metadata() *Dictionary
- func (f *Frame) NumberOfSamples() int
- func (f *Frame) Opaque() unsafe.Pointer
- func (f *Frame) PTS() int64
- func (f *Frame) PacketDTS() int64
- func (f *Frame) PacketDuration() int64
- func (f *Frame) PacketPTS() int64
- func (f *Frame) PictureType() PictureType
- func (f *Frame) PixelFormat() PixelFormat
- func (f *Frame) Quality() int
- func (f *Frame) Ref(dst *Frame) error
- func (f *Frame) SampleAspectRatio() *Rational
- func (f *Frame) SampleFormat() SampleFormat
- func (f *Frame) SampleRate() int
- func (f *Frame) SetChannelLayout(cl ChannelLayout)
- func (f *Frame) SetChannels(n int)
- func (f *Frame) SetCodedPictureNumber(number int)
- func (f *Frame) SetData(index int, data unsafe.Pointer)
- func (f *Frame) SetDisplayPictureNumber(number int)
- func (f *Frame) SetExtendedData(data unsafe.Pointer)
- func (f *Frame) SetHeight(height int)
- func (f *Frame) SetKeyFrame(keyFrame bool)
- func (f *Frame) SetLineSize(index int, lineSize int)
- func (f *Frame) SetMetadata(dict *Dictionary)
- func (f *Frame) SetNumberOfSamples(samples int)
- func (f *Frame) SetOpaque(opaque unsafe.Pointer)
- func (f *Frame) SetPTS(pts int64)
- func (f *Frame) SetPacketDTS(dts int64)
- func (f *Frame) SetPacketPTS(pts int64)
- func (f *Frame) SetPictureType(ptype PictureType)
- func (f *Frame) SetPixelFormat(format PixelFormat)
- func (f *Frame) SetQuality(quality int)
- func (f *Frame) SetSampleAspectRatio(aspectRatio *Rational)
- func (f *Frame) SetSampleFormat(sf SampleFormat)
- func (f *Frame) SetSampleRate(sr int)
- func (f *Frame) SetWidth(width int)
- func (f *Frame) Unref()
- func (f *Frame) Width() int
- type LogLevel
- type LossFlags
- type MediaType
- type Option
- type OptionAccessor
- func (oa *OptionAccessor) GetChannelLayoutOption(name string) (int64, bool, error)
- func (oa *OptionAccessor) GetChannelLayoutOptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)
- func (oa *OptionAccessor) GetDictionaryOption(name string) (*Dictionary, error)
- func (oa *OptionAccessor) GetDictionaryOptionWithFlags(name string, flags OptionSearchFlags) (*Dictionary, error)
- func (oa *OptionAccessor) GetFloat64Option(name string) (float64, bool, error)
- func (oa *OptionAccessor) GetFloat64OptionWithFlags(name string, flags OptionSearchFlags) (float64, bool, error)
- func (oa *OptionAccessor) GetImageSizeOption(name string) (int, int, bool, error)
- func (oa *OptionAccessor) GetImageSizeOptionWithFlags(name string, flags OptionSearchFlags) (int, int, bool, error)
- func (oa *OptionAccessor) GetInt64Option(name string) (int64, bool, error)
- func (oa *OptionAccessor) GetInt64OptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)
- func (oa *OptionAccessor) GetOption(name string) (string, bool, error)
- func (oa *OptionAccessor) GetOptionWithFlags(name string, flags OptionSearchFlags) (string, bool, error)
- func (oa *OptionAccessor) GetPixelFormatOption(name string) (PixelFormat, bool, error)
- func (oa *OptionAccessor) GetPixelFormatOptionWithFlags(name string, flags OptionSearchFlags) (PixelFormat, bool, error)
- func (oa *OptionAccessor) GetRationalOption(name string) (*Rational, error)
- func (oa *OptionAccessor) GetRationalOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)
- func (oa *OptionAccessor) GetSampleFormatOption(name string) (SampleFormat, bool, error)
- func (oa *OptionAccessor) GetSampleFormatOptionWithFlags(name string, flags OptionSearchFlags) (SampleFormat, bool, error)
- func (oa *OptionAccessor) GetVideoRateOption(name string) (*Rational, error)
- func (oa *OptionAccessor) GetVideoRateOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)
- func (oa *OptionAccessor) SetBinaryOption(name string, value unsafe.Pointer, size int) error
- func (oa *OptionAccessor) SetBinaryOptionWithFlags(name string, value unsafe.Pointer, size int, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetChannelLayoutOption(value ChannelLayout) error
- func (oa *OptionAccessor) SetChannelLayoutOptionWithFlags(value ChannelLayout, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetDictionaryOption(name string, value *Dictionary) error
- func (oa *OptionAccessor) SetDictionaryOptionWithFlags(name string, value *Dictionary, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetFloat64Option(name string, value float64) error
- func (oa *OptionAccessor) SetFloat64OptionWithFlags(name string, value float64, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetImageSizeOption(name string, width, height int) error
- func (oa *OptionAccessor) SetImageSizeOptionWithFlags(name string, width, height int, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetInt64Option(name string, value int64) error
- func (oa *OptionAccessor) SetInt64OptionWithFlags(name string, value int64, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetIntArrayOption(name string, value []int) error
- func (oa *OptionAccessor) SetIntArrayOptionWithFlags(name string, value []int, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetOption(name, value string) error
- func (oa *OptionAccessor) SetOptionWithFlags(name, value string, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetPixelFormatOption(name string, value PixelFormat) error
- func (oa *OptionAccessor) SetPixelFormatOptionWithFlags(name string, value PixelFormat, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetRationalOption(name string, value *Rational) error
- func (oa *OptionAccessor) SetRationalOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetSampleFormatOption(name string, value SampleFormat) error
- func (oa *OptionAccessor) SetSampleFormatOptionWithFlags(name string, value SampleFormat, flags OptionSearchFlags) error
- func (oa *OptionAccessor) SetVideoRateOption(name string, value *Rational) error
- func (oa *OptionAccessor) SetVideoRateOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error
- type OptionSearchFlags
- type PictureType
- type PixelFormat
- type PixelFormatDescriptor
- type Rational
- func (r *Rational) Add(r2 *Rational)
- func (r *Rational) Compare(r2 *Rational) (int, bool)
- func (r *Rational) Copy() *Rational
- func (r *Rational) Denominator() int
- func (r *Rational) Div(r2 *Rational)
- func (r *Rational) Float64() float64
- func (r *Rational) Invert()
- func (r *Rational) Mul(r2 *Rational)
- func (r *Rational) Nearer(r2 *Rational, r3 *Rational) int
- func (r *Rational) Nearest(rs []*Rational) *Rational
- func (r *Rational) Numerator() int
- func (r *Rational) Reduce()
- func (r *Rational) SetDenominator(denominator int)
- func (r *Rational) SetNumerator(numerator int)
- func (r *Rational) String() string
- func (r *Rational) Sub(r2 *Rational)
- type SampleFormat
- type Time
Constants ¶
View Source
const ( ErrorCodeBSFNotFound ErrorCode = -1179861752 ErrorCodeBug ErrorCode = -558323010 ErrorCodeBufferTooSmall ErrorCode = -1397118274 ErrorCodeDecoderNotFound ErrorCode = -1128613112 ErrorCodeDemuxerNotFound ErrorCode = -1296385272 ErrorCodeEncoderNotFound ErrorCode = -1129203192 ErrorCodeEOF ErrorCode = -541478725 ErrorCodeExit ErrorCode = -1414092869 ErrorCodeExternal ErrorCode = -542398533 ErrorCodeFilterNotFound ErrorCode = -1279870712 ErrorCodeInvalidData ErrorCode = -1094995529 ErrorCodeMuxerNotFound ErrorCode = -1481985528 ErrorCodeOptionNotFound ErrorCode = -1414549496 ErrorCodePatchWelcome ErrorCode = -1163346256 ErrorCodeProtocolNotFound ErrorCode = -1330794744 ErrorCodeStreamNotFound ErrorCode = -1381258232 ErrorCodeBug2 ErrorCode = -541545794 ErrorCodeUnknown ErrorCode = -1313558101 ErrorCodeExperimental ErrorCode = -733130664 ErrorCodeInputChanged ErrorCode = -1668179713 ErrorCodeOutputChanged ErrorCode = -1668179714 ErrorCodeHttpBadRequest ErrorCode = -808465656 ErrorCodeHttpForbidden ErrorCode = -858797304 ErrorCodeHttpNotFound ErrorCode = -875574520 ErrorCodeHttpOther4xx ErrorCode = -1482175736 ErrorCodeHttpServerError ErrorCode = -1482175992 NoPTSValue int64 = -9223372036854775808 )
View Source
const NoPtsValue int64 = C.AV_NOPTS_VALUE
Variables ¶
View Source
var ( ErrAllocationError = errors.New("allocation error") ErrInvalidArgumentSize = errors.New("invalid argument size") )
View Source
var StandardTimeBase = NewRational(1, C.AV_TIME_BASE)
Functions ¶
func RescaleByRationals ¶
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
Types ¶
type AudioFifo ¶
type AudioFifo struct { CAudioFifo *C.struct_AVAudioFifo SampleFmt SampleFormat ChannelLayout ChannelLayout }
func NewAudioFifo ¶
func NewAudioFifo(sf SampleFormat, layout ChannelLayout, nb_samples int) (*AudioFifo, error)
func NewAudioFifoFromC ¶
func (*AudioFifo) Drain ¶
*
- Drain data from an AVAudioFifo. *
- Removes the data without reading it. *
- @param af AVAudioFifo to drain
- @param nb_samples number of samples to drain
- @return 0 if OK, or negative AVERROR code on failure
int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples);
func (*AudioFifo) Free ¶
func (a *AudioFifo) Free()
*
- Free an AVAudioFifo. *
- @param af AVAudioFifo to free
void av_audio_fifo_free(AVAudioFifo *af);
func (*AudioFifo) Peek ¶
*
- Peek data from an AVAudioFifo. *
- @see enum AVSampleFormat
- The documentation for AVSampleFormat describes the data layout. *
- @param af AVAudioFifo to read from
- @param data audio data plane pointers
- @param nb_samples number of samples to peek
- @return number of samples actually peek, or negative AVERROR code
- on failure. The number of samples actually peek will not
- be greater than nb_samples, and will only be less than
- nb_samples if av_audio_fifo_size is less than nb_samples.
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
func (*AudioFifo) PeekAt ¶
*
- Peek data from an AVAudioFifo. *
- @see enum AVSampleFormat
- The documentation for AVSampleFormat describes the data layout. *
- @param af AVAudioFifo to read from
- @param data audio data plane pointers
- @param nb_samples number of samples to peek
- @param offset offset from current read position
- @return number of samples actually peek, or negative AVERROR code
- on failure. The number of samples actually peek will not
- be greater than nb_samples, and will only be less than
- nb_samples if av_audio_fifo_size is less than nb_samples.
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset);
func (*AudioFifo) Read ¶
*
- Read data from an AVAudioFifo. *
- @see enum AVSampleFormat
- The documentation for AVSampleFormat describes the data layout. *
- @param af AVAudioFifo to read from
- @param data audio data plane pointers
- @param nb_samples number of samples to read
- @return number of samples actually read, or negative AVERROR code
- on failure. The number of samples actually read will not
- be greater than nb_samples, and will only be less than
- nb_samples if av_audio_fifo_size is less than nb_samples.
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
func (*AudioFifo) Realloc ¶
*
- Reallocate an AVAudioFifo. *
- @param af AVAudioFifo to reallocate
- @param nb_samples new allocation size, in samples
- @return 0 if OK, or negative AVERROR code on failure
int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
func (*AudioFifo) Reset ¶
func (a *AudioFifo) Reset()
*
- Reset the AVAudioFifo buffer. *
- This empties all data in the buffer. *
- @param af AVAudioFifo to reset
void av_audio_fifo_reset(AVAudioFifo *af);
func (*AudioFifo) Size ¶
*
- Get the current number of samples in the AVAudioFifo available for reading. *
- @param af the AVAudioFifo to query
- @return number of samples available for reading
int av_audio_fifo_size(AVAudioFifo *af);
func (*AudioFifo) Space ¶
*
- Get the current number of samples in the AVAudioFifo available for writing. *
- @param af the AVAudioFifo to query
- @return number of samples available for writing
int av_audio_fifo_space(AVAudioFifo *af);
func (*AudioFifo) Write ¶
*
- Write data to an AVAudioFifo. *
- The AVAudioFifo will be reallocated automatically if the available space
- is less than nb_samples. *
- @see enum AVSampleFormat
- The documentation for AVSampleFormat describes the data layout. *
- @param af AVAudioFifo to write to
- @param data audio data plane pointers
- @param nb_samples number of samples to write
- @return number of samples actually written, or negative AVERROR
- code on failure. If successful, the number of samples
- actually written will always be nb_samples.
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
type ChannelLayout ¶
type ChannelLayout uint64
const ( ChannelLayoutMono ChannelLayout = C.AV_CH_LAYOUT_MONO ChannelLayoutStereo ChannelLayout = C.AV_CH_LAYOUT_STEREO ChannelLayout2Point1 ChannelLayout = C.AV_CH_LAYOUT_2POINT1 ChannelLayout21 ChannelLayout = C.AV_CH_LAYOUT_2_1 ChannelLayoutSurround ChannelLayout = C.AV_CH_LAYOUT_SURROUND ChannelLayout3Point1 ChannelLayout = C.AV_CH_LAYOUT_3POINT1 ChannelLayout4Point0 ChannelLayout = C.AV_CH_LAYOUT_4POINT0 ChannelLayout4Point1 ChannelLayout = C.AV_CH_LAYOUT_4POINT1 ChannelLayout22 ChannelLayout = C.AV_CH_LAYOUT_2_2 ChannelLayoutQuad ChannelLayout = C.AV_CH_LAYOUT_QUAD ChannelLayout5Point0 ChannelLayout = C.AV_CH_LAYOUT_5POINT0 ChannelLayout5Point1 ChannelLayout = C.AV_CH_LAYOUT_5POINT1 ChannelLayout5Point0Back ChannelLayout = C.AV_CH_LAYOUT_5POINT0_BACK ChannelLayout5Point1Back ChannelLayout = C.AV_CH_LAYOUT_5POINT1_BACK ChannelLayout6Point0 ChannelLayout = C.AV_CH_LAYOUT_6POINT0 ChannelLayout6Point0Front ChannelLayout = C.AV_CH_LAYOUT_6POINT0_FRONT ChannelLayoutHexagonal ChannelLayout = C.AV_CH_LAYOUT_HEXAGONAL ChannelLayout6Point1 ChannelLayout = C.AV_CH_LAYOUT_6POINT1 ChannelLayout6Point1Back ChannelLayout = C.AV_CH_LAYOUT_6POINT1_BACK ChannelLayout6Point1Front ChannelLayout = C.AV_CH_LAYOUT_6POINT1_FRONT ChannelLayout7Point0 ChannelLayout = C.AV_CH_LAYOUT_7POINT0 ChannelLayout7Point0Front ChannelLayout = C.AV_CH_LAYOUT_7POINT0_FRONT ChannelLayout7Point1 ChannelLayout = C.AV_CH_LAYOUT_7POINT1 ChannelLayout7Point1Wide ChannelLayout = C.AV_CH_LAYOUT_7POINT1_WIDE ChannelLayout7Point1WideBack ChannelLayout = C.AV_CH_LAYOUT_7POINT1_WIDE_BACK ChannelLayoutOctagonal ChannelLayout = C.AV_CH_LAYOUT_OCTAGONAL ChannelLayoutStereoDownmix ChannelLayout = C.AV_CH_LAYOUT_STEREO_DOWNMIX )
func ChannelLayouts ¶
func ChannelLayouts() []ChannelLayout
func FindChannelLayoutByName ¶
func FindChannelLayoutByName(name string) (ChannelLayout, bool)
func FindDefaultChannelLayout ¶
func FindDefaultChannelLayout(numberOfChannels int) (ChannelLayout, bool)
func (ChannelLayout) DescriptionOk ¶
func (cl ChannelLayout) DescriptionOk() (string, bool)
func (ChannelLayout) Name ¶
func (cl ChannelLayout) Name() string
func (ChannelLayout) NameOk ¶
func (cl ChannelLayout) NameOk() (string, bool)
func (ChannelLayout) NumberOfChannels ¶
func (cl ChannelLayout) NumberOfChannels() int
type ChromaLocation ¶
type ChromaLocation C.enum_AVChromaLocation
const ( ChromaLocationUnspecified ChromaLocation = C.AVCHROMA_LOC_UNSPECIFIED ChromaLocationLeft ChromaLocation = C.AVCHROMA_LOC_LEFT ChromaLocationCenter ChromaLocation = C.AVCHROMA_LOC_CENTER ChromaLocationTopLeft ChromaLocation = C.AVCHROMA_LOC_TOPLEFT ChromaLocationTop ChromaLocation = C.AVCHROMA_LOC_TOP ChromaLocationBottomLeft ChromaLocation = C.AVCHROMA_LOC_BOTTOMLEFT ChromaLocationBottom ChromaLocation = C.AVCHROMA_LOC_BOTTOM )
type Dictionary ¶
type Dictionary struct { CAVDictionary **C.AVDictionary // contains filtered or unexported fields }
func NewDictionary ¶
func NewDictionary() *Dictionary
func NewDictionaryFromC ¶
func NewDictionaryFromC(cDictionary unsafe.Pointer) *Dictionary
func (*Dictionary) Copy ¶
func (dict *Dictionary) Copy() *Dictionary
func (*Dictionary) Count ¶
func (dict *Dictionary) Count() int
func (*Dictionary) Delete ¶
func (dict *Dictionary) Delete(key string) error
func (*Dictionary) Free ¶
func (dict *Dictionary) Free()
func (*Dictionary) Get ¶
func (dict *Dictionary) Get(key string) string
func (*Dictionary) GetInsensitive ¶
func (dict *Dictionary) GetInsensitive(key string) string
func (*Dictionary) GetInsensitiveOk ¶
func (dict *Dictionary) GetInsensitiveOk(key string) (string, bool)
func (*Dictionary) Has ¶
func (dict *Dictionary) Has(key string) bool
func (*Dictionary) HasInsensitive ¶
func (dict *Dictionary) HasInsensitive(key string) bool
func (*Dictionary) Keys ¶
func (dict *Dictionary) Keys() []string
func (*Dictionary) Map ¶
func (dict *Dictionary) Map() map[string]string
func (*Dictionary) Pointer ¶
func (dict *Dictionary) Pointer() unsafe.Pointer
func (*Dictionary) Set ¶
func (dict *Dictionary) Set(key, value string) error
func (*Dictionary) SetInsensitive ¶
func (dict *Dictionary) SetInsensitive(key, value string) error
func (*Dictionary) String ¶
func (dict *Dictionary) String(keyValSep, pairsSep byte) (string, error)
func (*Dictionary) Value ¶
func (dict *Dictionary) Value() unsafe.Pointer
func (*Dictionary) Values ¶
func (dict *Dictionary) Values() []string
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func NewErrorFromCode ¶
type Frame ¶
func NewFrameFromC ¶
func (*Frame) BestEffortTimestamp ¶
func (*Frame) ChannelLayout ¶
func (f *Frame) ChannelLayout() ChannelLayout
func (*Frame) CodedPictureNumber ¶
func (*Frame) DisplayPictureNumber ¶
func (*Frame) ExtendedData ¶
func (*Frame) GetBufferWithAlignment ¶
*
- Allocate new buffer(s) for audio or video data. *
- The following fields must be set on frame before calling this function:
- - format (pixel format for video, sample format for audio)
- - width and height for video
- - nb_samples and channel_layout for audio *
- This function will fill AVFrame.data and AVFrame.buf arrays and, if
- necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf.
- For planar formats, one buffer will be allocated for each plane. *
- @warning: if frame already has been allocated, calling this function will
- leak memory. In addition, undefined behavior can occur in certain
- cases. *
- @param frame frame in which to store the new buffers.
- @param align Required buffer size alignment. If equal to 0, alignment will be
- chosen automatically for the current CPU. It is highly
- recommended to pass 0 here unless you know what you are doing. *
- @return 0 on success, a negative AVERROR on error.
func (*Frame) Metadata ¶
func (f *Frame) Metadata() *Dictionary
func (*Frame) NumberOfSamples ¶
func (*Frame) PacketDuration ¶
func (*Frame) PictureType ¶
func (f *Frame) PictureType() PictureType
func (*Frame) PixelFormat ¶
func (f *Frame) PixelFormat() PixelFormat
func (*Frame) SampleAspectRatio ¶
func (*Frame) SampleFormat ¶
func (f *Frame) SampleFormat() SampleFormat
func (*Frame) SampleRate ¶
func (*Frame) SetChannelLayout ¶
func (f *Frame) SetChannelLayout(cl ChannelLayout)
func (*Frame) SetChannels ¶
func (*Frame) SetCodedPictureNumber ¶
func (*Frame) SetDisplayPictureNumber ¶
func (*Frame) SetExtendedData ¶
func (*Frame) SetKeyFrame ¶
func (*Frame) SetLineSize ¶
func (*Frame) SetMetadata ¶
func (f *Frame) SetMetadata(dict *Dictionary)
func (*Frame) SetNumberOfSamples ¶
func (*Frame) SetPacketDTS ¶
func (*Frame) SetPacketPTS ¶
func (*Frame) SetPictureType ¶
func (f *Frame) SetPictureType(ptype PictureType)
func (*Frame) SetPixelFormat ¶
func (f *Frame) SetPixelFormat(format PixelFormat)
func (*Frame) SetQuality ¶
func (*Frame) SetSampleAspectRatio ¶
func (*Frame) SetSampleFormat ¶
func (f *Frame) SetSampleFormat(sf SampleFormat)
func (*Frame) SetSampleRate ¶
type LogLevel ¶
type LogLevel int
const ( LogLevelQuiet LogLevel = C.AV_LOG_QUIET LogLevelPanic LogLevel = C.AV_LOG_PANIC LogLevelFatal LogLevel = C.AV_LOG_FATAL LogLevelError LogLevel = C.AV_LOG_ERROR LogLevelWarning LogLevel = C.AV_LOG_WARNING LogLevelInfo LogLevel = C.AV_LOG_INFO LogLevelVerbose LogLevel = C.AV_LOG_VERBOSE LogLevelDebug LogLevel = C.AV_LOG_DEBUG LogLevelTrace LogLevel = C.GO_AV_LOG_TRACE )
type LossFlags ¶
type LossFlags int
const ( LossFlagNone LossFlags = 0 LossFlagResolution LossFlags = C.FF_LOSS_RESOLUTION LossFlagDepth LossFlags = C.FF_LOSS_DEPTH LossFlagColorspace LossFlags = C.FF_LOSS_COLORSPACE LossFlagAlpha LossFlags = C.FF_LOSS_ALPHA LossFlagColorquant LossFlags = C.FF_LOSS_COLORQUANT LossFlagChroma LossFlags = C.FF_LOSS_CHROMA LossFlagAll LossFlags = -1 )
type MediaType ¶
type MediaType C.enum_AVMediaType
const ( MediaTypeUnknown 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 )
type OptionAccessor ¶
type OptionAccessor struct {
// contains filtered or unexported fields
}
func NewOptionAccessor ¶
func NewOptionAccessor(obj unsafe.Pointer, fake bool) *OptionAccessor
func (*OptionAccessor) GetChannelLayoutOption ¶
func (oa *OptionAccessor) GetChannelLayoutOption(name string) (int64, bool, error)
func (*OptionAccessor) GetChannelLayoutOptionWithFlags ¶
func (oa *OptionAccessor) GetChannelLayoutOptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)
func (*OptionAccessor) GetDictionaryOption ¶
func (oa *OptionAccessor) GetDictionaryOption(name string) (*Dictionary, error)
func (*OptionAccessor) GetDictionaryOptionWithFlags ¶
func (oa *OptionAccessor) GetDictionaryOptionWithFlags(name string, flags OptionSearchFlags) (*Dictionary, error)
func (*OptionAccessor) GetFloat64Option ¶
func (oa *OptionAccessor) GetFloat64Option(name string) (float64, bool, error)
func (*OptionAccessor) GetFloat64OptionWithFlags ¶
func (oa *OptionAccessor) GetFloat64OptionWithFlags(name string, flags OptionSearchFlags) (float64, bool, error)
func (*OptionAccessor) GetImageSizeOption ¶
func (*OptionAccessor) GetImageSizeOptionWithFlags ¶
func (oa *OptionAccessor) GetImageSizeOptionWithFlags(name string, flags OptionSearchFlags) (int, int, bool, error)
func (*OptionAccessor) GetInt64Option ¶
func (oa *OptionAccessor) GetInt64Option(name string) (int64, bool, error)
func (*OptionAccessor) GetInt64OptionWithFlags ¶
func (oa *OptionAccessor) GetInt64OptionWithFlags(name string, flags OptionSearchFlags) (int64, bool, error)
func (*OptionAccessor) GetOption ¶
func (oa *OptionAccessor) GetOption(name string) (string, bool, error)
func (*OptionAccessor) GetOptionWithFlags ¶
func (oa *OptionAccessor) GetOptionWithFlags(name string, flags OptionSearchFlags) (string, bool, error)
func (*OptionAccessor) GetPixelFormatOption ¶
func (oa *OptionAccessor) GetPixelFormatOption(name string) (PixelFormat, bool, error)
func (*OptionAccessor) GetPixelFormatOptionWithFlags ¶
func (oa *OptionAccessor) GetPixelFormatOptionWithFlags(name string, flags OptionSearchFlags) (PixelFormat, bool, error)
func (*OptionAccessor) GetRationalOption ¶
func (oa *OptionAccessor) GetRationalOption(name string) (*Rational, error)
func (*OptionAccessor) GetRationalOptionWithFlags ¶
func (oa *OptionAccessor) GetRationalOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)
func (*OptionAccessor) GetSampleFormatOption ¶
func (oa *OptionAccessor) GetSampleFormatOption(name string) (SampleFormat, bool, error)
func (*OptionAccessor) GetSampleFormatOptionWithFlags ¶
func (oa *OptionAccessor) GetSampleFormatOptionWithFlags(name string, flags OptionSearchFlags) (SampleFormat, bool, error)
func (*OptionAccessor) GetVideoRateOption ¶
func (oa *OptionAccessor) GetVideoRateOption(name string) (*Rational, error)
func (*OptionAccessor) GetVideoRateOptionWithFlags ¶
func (oa *OptionAccessor) GetVideoRateOptionWithFlags(name string, flags OptionSearchFlags) (*Rational, error)
func (*OptionAccessor) SetBinaryOption ¶
func (*OptionAccessor) SetBinaryOptionWithFlags ¶
func (oa *OptionAccessor) SetBinaryOptionWithFlags(name string, value unsafe.Pointer, size int, flags OptionSearchFlags) error
func (*OptionAccessor) SetChannelLayoutOption ¶
func (oa *OptionAccessor) SetChannelLayoutOption(value ChannelLayout) error
func (*OptionAccessor) SetChannelLayoutOptionWithFlags ¶
func (oa *OptionAccessor) SetChannelLayoutOptionWithFlags(value ChannelLayout, flags OptionSearchFlags) error
func (*OptionAccessor) SetDictionaryOption ¶
func (oa *OptionAccessor) SetDictionaryOption(name string, value *Dictionary) error
func (*OptionAccessor) SetDictionaryOptionWithFlags ¶
func (oa *OptionAccessor) SetDictionaryOptionWithFlags(name string, value *Dictionary, flags OptionSearchFlags) error
func (*OptionAccessor) SetFloat64Option ¶
func (oa *OptionAccessor) SetFloat64Option(name string, value float64) error
func (*OptionAccessor) SetFloat64OptionWithFlags ¶
func (oa *OptionAccessor) SetFloat64OptionWithFlags(name string, value float64, flags OptionSearchFlags) error
func (*OptionAccessor) SetImageSizeOption ¶
func (oa *OptionAccessor) SetImageSizeOption(name string, width, height int) error
func (*OptionAccessor) SetImageSizeOptionWithFlags ¶
func (oa *OptionAccessor) SetImageSizeOptionWithFlags(name string, width, height int, flags OptionSearchFlags) error
func (*OptionAccessor) SetInt64Option ¶
func (oa *OptionAccessor) SetInt64Option(name string, value int64) error
func (*OptionAccessor) SetInt64OptionWithFlags ¶
func (oa *OptionAccessor) SetInt64OptionWithFlags(name string, value int64, flags OptionSearchFlags) error
func (*OptionAccessor) SetIntArrayOption ¶
func (oa *OptionAccessor) SetIntArrayOption(name string, value []int) error
func (*OptionAccessor) SetIntArrayOptionWithFlags ¶
func (oa *OptionAccessor) SetIntArrayOptionWithFlags(name string, value []int, flags OptionSearchFlags) error
func (*OptionAccessor) SetOption ¶
func (oa *OptionAccessor) SetOption(name, value string) error
func (*OptionAccessor) SetOptionWithFlags ¶
func (oa *OptionAccessor) SetOptionWithFlags(name, value string, flags OptionSearchFlags) error
func (*OptionAccessor) SetPixelFormatOption ¶
func (oa *OptionAccessor) SetPixelFormatOption(name string, value PixelFormat) error
func (*OptionAccessor) SetPixelFormatOptionWithFlags ¶
func (oa *OptionAccessor) SetPixelFormatOptionWithFlags(name string, value PixelFormat, flags OptionSearchFlags) error
func (*OptionAccessor) SetRationalOption ¶
func (oa *OptionAccessor) SetRationalOption(name string, value *Rational) error
func (*OptionAccessor) SetRationalOptionWithFlags ¶
func (oa *OptionAccessor) SetRationalOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error
func (*OptionAccessor) SetSampleFormatOption ¶
func (oa *OptionAccessor) SetSampleFormatOption(name string, value SampleFormat) error
func (*OptionAccessor) SetSampleFormatOptionWithFlags ¶
func (oa *OptionAccessor) SetSampleFormatOptionWithFlags(name string, value SampleFormat, flags OptionSearchFlags) error
func (*OptionAccessor) SetVideoRateOption ¶
func (oa *OptionAccessor) SetVideoRateOption(name string, value *Rational) error
func (*OptionAccessor) SetVideoRateOptionWithFlags ¶
func (oa *OptionAccessor) SetVideoRateOptionWithFlags(name string, value *Rational, flags OptionSearchFlags) error
type OptionSearchFlags ¶
type OptionSearchFlags int
const ( OptionSearchChildren OptionSearchFlags = C.AV_OPT_SEARCH_CHILDREN OptionSearchFakeObj OptionSearchFlags = C.AV_OPT_SEARCH_FAKE_OBJ )
type PictureType ¶
type PictureType C.enum_AVPictureType
const ( PictureTypeNone PictureType = C.AV_PICTURE_TYPE_NONE PictureTypeI PictureType = C.AV_PICTURE_TYPE_I PictureTypeP PictureType = C.AV_PICTURE_TYPE_P PictureTypeB PictureType = C.AV_PICTURE_TYPE_B PictureTypeS PictureType = C.AV_PICTURE_TYPE_S PictureTypeSI PictureType = C.AV_PICTURE_TYPE_SI PictureTypeSP PictureType = C.AV_PICTURE_TYPE_SP PictureTypeBI PictureType = C.AV_PICTURE_TYPE_BI )
type PixelFormat ¶
type PixelFormat C.enum_AVPixelFormat
const (
PixelFormatNone PixelFormat = C.AV_PIX_FMT_NONE
)
func FindPixelFormatByName ¶
func FindPixelFormatByName(name string) (PixelFormat, bool)
func (PixelFormat) Name ¶
func (pfmt PixelFormat) Name() string
func (PixelFormat) NameOk ¶
func (pfmt PixelFormat) NameOk() (string, bool)
type PixelFormatDescriptor ¶
type PixelFormatDescriptor struct {
CAVPixFmtDescriptor *C.AVPixFmtDescriptor
}
func FindPixelFormatDescriptorByPixelFormat ¶
func FindPixelFormatDescriptorByPixelFormat(pixelFormat PixelFormat) *PixelFormatDescriptor
func NewPixelFormatDescriptorFromC ¶
func NewPixelFormatDescriptorFromC(cCtx unsafe.Pointer) *PixelFormatDescriptor
func (*PixelFormatDescriptor) ComponentCount ¶
func (d *PixelFormatDescriptor) ComponentCount() int
type Rational ¶
type Rational struct {
CAVRational C.AVRational
}
func NewRational ¶
func NewRationalFromC ¶
func (*Rational) Denominator ¶
func (*Rational) SetDenominator ¶
func (*Rational) SetNumerator ¶
type SampleFormat ¶
type SampleFormat C.enum_AVSampleFormat
const ( SampleFormatNone SampleFormat = C.AV_SAMPLE_FMT_NONE SampleFormatU8 SampleFormat = C.AV_SAMPLE_FMT_U8 SampleFormatS16 SampleFormat = C.AV_SAMPLE_FMT_S16 SampleFormatS32 SampleFormat = C.AV_SAMPLE_FMT_S32 SampleFormatFLT SampleFormat = C.AV_SAMPLE_FMT_FLT SampleFormatDBL SampleFormat = C.AV_SAMPLE_FMT_DBL SampleFormatU8P SampleFormat = C.AV_SAMPLE_FMT_U8P SampleFormatS16P SampleFormat = C.AV_SAMPLE_FMT_S16P SampleFormatS32P SampleFormat = C.AV_SAMPLE_FMT_S32P SampleFormatFLTP SampleFormat = C.AV_SAMPLE_FMT_FLTP SampleFormatDBLP SampleFormat = C.AV_SAMPLE_FMT_DBLP )
func FindSampleFormatByName ¶
func FindSampleFormatByName(name string) (SampleFormat, bool)
func (SampleFormat) BytesPerSample ¶
func (sfmt SampleFormat) BytesPerSample() int
func (SampleFormat) Int ¶
func (sfmt SampleFormat) Int() int
func (SampleFormat) IsPlanar ¶
func (sfmt SampleFormat) IsPlanar() bool
func (SampleFormat) Name ¶
func (sfmt SampleFormat) Name() string
func (SampleFormat) NameOk ¶
func (sfmt SampleFormat) NameOk() (string, bool)
Click to show internal directories.
Click to hide internal directories.