ffmogo

package module
v0.0.0-...-7ef7117 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

README

FFmogo

fast forward moving gopher, or just ffmpeg

do whatever you want
im using this for my projects
it will always be incomplete

Documentation

Index

Constants

View Source
const (
	AVMEDIA_TYPE_VIDEO = 0x0

	AV_PIX_FMT_RGB24 = 2

	SWS_FAST_BILINEAR = 1
	SWS_BILINEAR      = 2

	EAGAIN = 11

	AVSEEK_FLAG_BACKWARD = 0x1

	SEEK_SET    = 0
	SEEK_CUR    = 1
	SEEK_END    = 2
	AVSEEK_SIZE = 0x10000
)
View Source
const (
	AV_DICT_MATCH_CASE      = 1
	AV_DICT_IGNORE_SUFFIX   = 2
	AV_DICT_DONT_STRDUP_KEY = 4
	AV_DICT_DONT_STRDUP_VAL = 8
	AV_DICT_DONT_OVERWRITE  = 16
	AV_DICT_APPEND          = 32
	AV_DICT_MULTIKEY        = 64
)

Variables

View Source
var (
	// avformat
	AVformat_open_input func(
		ps **AVFormatContext, url string, fmt *AVInputFormat, options **AVDictionary,
	) int32
	AVformat_close_input          func(s **AVFormatContext)
	AVformat_find_stream_info     func(ic *AVFormatContext, options **AVDictionary) int32
	AV_dump_format                func(ic *AVFormatContext, index int32, url string, is_output int32)
	AVcodec_find_decoder          func(id AVCodecID) *AVCodec
	AVcodec_alloc_context3        func(codec *AVCodec) *AVCodecContext
	AVcodec_free_context          func(avctx **AVCodecContext)
	AVcodec_parameters_to_context func(codec *AVCodecContext, par *AVCodecParameters) int32
	AVcodec_open2                 func(avctx *AVCodecContext, codec *AVCodec, options **AVDictionary) int32
	AV_read_frame                 func(s *AVFormatContext, pkt *AVPacket) int32
	AV_seek_frame                 func(s *AVFormatContext, stream_index int32, timestamp int64, flags int32) int32
	AVio_alloc_context            func(
		buffer unsafe.Pointer, buffer_size int32, write_flag int32, opaque unsafe.Pointer,
		read_packet func(opaque, buffer unsafe.Pointer, buf_size int32) int32,
		write_packet func(opaque, buffer unsafe.Pointer, buf_size int32) int32,
		seek func(opaque unsafe.Pointer, offset int64, whence int) int64,
	) *AVIOContext
	AVio_context_free      func(s **AVIOContext)
	AVformat_alloc_context func() *AVFormatContext
	AVformat_free_context  func(s *AVFormatContext)

	// avutil
	AV_frame_alloc           func() *AVFrame
	AV_frame_free            func(frame **AVFrame)
	AV_image_get_buffer_size func(pix_fmt AVPixelFormat, width, height, align int32) int32
	AV_image_fill_arrays     func(dst_data **uint8, dst_linesize *int32, src *uint8,
		pix_fmt AVPixelFormat, width, height, align int32) int32
	AV_malloc func(size uintptr) unsafe.Pointer

	// swscale
	SWS_getContext func(srcW, srcH int32, srcFormat AVPixelFormat,
		dstW, dstH int32, dstFormat AVPixelFormat,
		flags int32, srcFilter *SwsFilter,
		dstFilter *SwsFilter, param *float64) *SwsContext
	SWS_freeContext func(swsContext *SwsContext)
	SWS_scale       func(c *SwsContext, srcSlice **uint8,
		srcStride *int32, srcSliceY, srcSliceH int32,
		dst **uint8, dstStride *int32) int32

	// avcodec
	AV_packet_alloc       func() *AVPacket
	AV_packet_free        func(pkt **AVPacket)
	AV_packet_unref       func(pkt *AVPacket)
	AVcodec_send_packet   func(avctx *AVCodecContext, avpkt *AVPacket) int32
	AVcodec_receive_frame func(avctx *AVCodecContext, frame *AVFrame) int32
)
View Source
var (
	AVERROR_EOF = -MKTAG('E', 'O', 'F', ' ')
)

Functions

func AV_q2d

func AV_q2d(rational AVRational) float64

func CloseFFmpeg

func CloseFFmpeg()

func GoString

func GoString(cString *uint8) string

func InitFFmpeg

func InitFFmpeg() error

func MKTAG

func MKTAG(a, b, c, d rune) int32

Types

type AVBufferRef

type AVBufferRef struct{}

type AVChapter

type AVChapter struct{}

type AVClass

type AVClass struct{}

type AVCodec

type AVCodec struct{}

type AVCodecContext

type AVCodecContext struct {
	AVClass           *AVClass         // av_class
	LogLevelOffset    int32            // log_level_offset
	CodecType         int32            // codec_type
	Codec             *AVCodec         // codec
	CodecID           uint32           // codec_id
	CodecTag          uint32           // codec_tag
	PrivData          unsafe.Pointer   // priv_data
	Internal          *AVCodecInternal // internal
	Opaque            unsafe.Pointer   // opaque
	BitRate           int64            // bit_rate
	Flags             int32            // flags
	Flags2            int32            // flags2
	ExtraData         *uint8           // extradata
	ExtraDataSize     int32            // extradata_size
	TimeBase          AVRational       // time_base
	PktTimeBase       AVRational       // pkt_timebase
	Framerate         AVRational       // framerate
	TicksPerFrame     int32            // ticks_per_frame
	Delay             int32            // delay
	Width             int32            // width
	Height            int32            // height
	CodedWidth        int32            // coded_width
	CodedHeight       int32            // coded_height
	SampleAspectRatio AVRational       // sample_aspect_ratio
	PixFmt            AVPixelFormat    //  pix_fmt (int32)

}

type AVCodecID

type AVCodecID uint32

type AVCodecInternal

type AVCodecInternal struct{}

type AVCodecParameters

type AVCodecParameters struct {
	CodecType int32     // codec_type
	CodecID   AVCodecID // codec_id
	CodecTag  uint32    // codec_tag

}

type AVDictionary

type AVDictionary struct{}

type AVDictionaryEntry

type AVDictionaryEntry struct {
	Key  *uint8
	Char *uint8
}

type AVFormatContext

type AVFormatContext struct {
	AVClass   *AVClass        // av_class
	IFormat   *AVInputFormat  // iformat
	OFormat   *AVOutputFormat // oformat
	PrivData  unsafe.Pointer  // priv_data
	PB        *AVIOContext    // pb
	CTXFlags  int32           // ctx_flags
	NBStreams uint16          // nb_streams
	Streams   **AVStream      // streams

}

type AVFrame

type AVFrame struct {
	Data         [8]*uint8 // data
	LineSize     [8]int32  // linesize
	ExtendedData **uint8   // extended_data
	Width        int32     // width
	Height       int32     // height
	NBSamples    int32     // nb_samples
	Format       int32     // format
	KeyFrame     int64     // key_frame

}

type AVIOContext

type AVIOContext struct{}

type AVIOInterruptCB

type AVIOInterruptCB struct{}

type AVInputFormat

type AVInputFormat struct{}

type AVOutputFormat

type AVOutputFormat struct{}

type AVPacket

type AVPacket struct {
	Buf         *AVBufferRef //buf
	PTS         int64        //pts
	DTS         int64        //dts
	Data        *uint8       //data
	Size        int32        //size
	StreamIndex int32        //stream_index

}

type AVPacketSideData

type AVPacketSideData struct{}

type AVPixelFormat

type AVPixelFormat int32

type AVProgram

type AVProgram struct{}

type AVRational

type AVRational struct {
	Num int32
	Den int32
}

type AVStream

type AVStream struct {
	AVClass           *AVClass           // av_class
	Index             int32              // index
	ID                int32              // id
	CodecPar          *AVCodecParameters // codecpar
	PrivData          unsafe.Pointer     // priv_data
	TimeBase          AVRational         // time_base
	StartTime         int64              // start_time
	Duration          int64              // duration
	NBFrames          int64              // nb_frames
	Disposition       int32              // disposition (int)
	Discard           int32              // discard
	SampleAspectRatio AVRational         // sample_aspect_ratio
	Metadata          *AVDictionary      // metadata

}

type AVStreamGroup

type AVStreamGroup struct{}

type SwsContext

type SwsContext struct{}

type SwsFilter

type SwsFilter struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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