Documentation ¶
Index ¶
- Constants
- func AvAddIndexEntry(st *CAVStream, pos int64, timestamp int64, size int, distance int, flags int) int
- func AvAppendPacket(s *CAVIOContext, pkt *avcodec.CAVPacket, size int) int
- func AvCodecGetId(tags **CAVCodecTag, tag uint) avcodec.CAVCodecID
- func AvCodecGetTag(tags **CAVCodecTag, id avcodec.CAVCodecID) uint
- func AvCodecGetTag2(tags **CAVCodecTag, id avcodec.CAVCodecID, tag *ctypes.UInt) int
- func AvDispositionFromString(disp string) int
- func AvDispositionToString(disposition int) string
- func AvDumpFormat(ic *CAVFormatContext, index int, url string, is_output int)
- func AvFilenameNumberTest(filename string) int
- func AvFindBestStream(ic *CAVFormatContext, _type avutil.CAVMediaType, wanted_stream_nb int, ...) int
- func AvFindDefaultStreamIndex(s *CAVFormatContext) int
- func AvFormatInjectGlobalSideData(s *CAVFormatContext)
- func AvGetFrameFilename(buf unsafe.Pointer, bufSize int, path string, number int) int
- func AvGetFrameFilename2(buf unsafe.Pointer, bufSize int, path string, number int, flags int) int
- func AvGetOutputTimestamp(s *CAVFormatContext, stream int, dts *ctypes.Int64, wall *ctypes.Int64) int
- func AvGetPacket(s *CAVIOContext, pkt *avcodec.CAVPacket, size int) int
- func AvGuessCodec(fmt *CAVOutputFormat, shortName string, filename string, mimeType string, ...) avcodec.CAVCodecID
- func AvGuessFrameRate(ctx *CAVFormatContext, stream *CAVStream, frame *avutil.CAVFrame) avutil.CAVRational
- func AvGuessSampleAspectRatio(format *CAVFormatContext, stream *CAVStream, frame *avutil.CAVFrame) avutil.CAVRational
- func AvHexDump(f *C.FILE, buf unsafe.Pointer, size int)
- func AvHexDumpLog(avcl unsafe.Pointer, level int, buf unsafe.Pointer, size int)
- func AvIndexSearchTimestamp(st *CAVStream, timestamp int64, flags int) int
- func AvInterleavedWriteFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
- func AvInterleavedWriteUncodedFrame(s *CAVFormatContext, streamIndex int, frame *avutil.CAVFrame) int
- func AvMatchExt(filename string, extensions string) int
- func AvPktDump2(f *C.FILE, pkt *avcodec.CAVPacket, dumpPayload int, st *CAVStream)
- func AvPktDumpLog2(avcl unsafe.Pointer, level int, pkt *avcodec.CAVPacket, dumpPayload int, ...)
- func AvProbeInputBuffer(pd *CAVIOContext, fmt **CAVInputFormat, url string, logctx unsafe.Pointer, ...) int
- func AvProbeInputBuffer2(pd *CAVIOContext, fmt **CAVInputFormat, url string, logctx unsafe.Pointer, ...) int
- func AvProgramAddStreamIndex(ac *CAVFormatContext, progid int, idx uint)
- func AvReadFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
- func AvReadPause(s *CAVFormatContext) int
- func AvReadPlay(s *CAVFormatContext) int
- func AvSdpCreate(ac []*CAVFormatContext, nFiles int, buf unsafe.Pointer, size int) int
- func AvSeekFrame(s *CAVFormatContext, streamIndex int, timestamp int64, flags int) int
- func AvStreamGetClass() *avutil.CAVClass
- func AvStreamGetCodecTimebase(st *CAVStream) avutil.CAVRational
- func AvStreamGetParser(s *CAVStream) *avcodec.CAVCodecParserContext
- func AvUrlSplit(proto unsafe.Pointer, protoSize int, authorization unsafe.Pointer, ...)
- func AvWriteFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
- func AvWriteTrailer(s *CAVFormatContext) int
- func AvWriteUncodedFrame(s *CAVFormatContext, streamIndex int, frame *avutil.CAVFrame) int
- func AvWriteUncodedFrameQuery(s *CAVFormatContext, streamIndex int) int
- func AvformatAllocOutputContext2(ctx **CAVFormatContext, oformat *CAVOutputFormat, format_name string, ...) int
- func AvformatCloseInput(s **CAVFormatContext)
- func AvformatConfiguration() string
- func AvformatFindStreamInfo(ic *CAVFormatContext, options **avutil.CAVDictionary) int
- func AvformatFlush(s *CAVFormatContext) int
- func AvformatFreeContext(s *CAVFormatContext)
- func AvformatGetClass() *avutil.CAVClass
- func AvformatIndexGetEntriesCount(st *CAVStream) int
- func AvformatInitOutput(s *CAVFormatContext, options **avutil.CAVDictionary) int
- func AvformatLicense() string
- func AvformatMatchStreamSpecifier(s *CAVFormatContext, st *CAVStream, spec string) int
- func AvformatNetworkDeinit() int
- func AvformatNetworkInit() int
- func AvformatOpenInput(ps **CAVFormatContext, url string, fmt *CAVInputFormat, ...) int
- func AvformatQueryCodec(ofmt *CAVOutputFormat, codecId avcodec.CAVCodecID, stdCompliance int) int
- func AvformatQueueAttachedPictures(s *CAVFormatContext) int
- func AvformatSeekFile(s *CAVFormatContext, streamIndex int, minTs int64, ts int64, maxTs int64, ...) int
- func AvformatTransferInternalStreamTimingInfo(ofmt *CAVOutputFormat, ost *CAVStream, ist *CAVStream, ...) int
- func AvformatVersion() uint
- func AvformatWriteHeader(s *CAVFormatContext, options **avutil.CAVDictionary) int
- func AvioAccept(s *CAVIOContext, c **CAVIOContext) int
- func AvioCheck(url string, flags int) int
- func AvioClose(s *CAVIOContext) int
- func AvioCloseDir(s **CAVIODirContext) int
- func AvioCloseDynBuf(s *CAVIOContext, pbuffer unsafe.Pointer) int
- func AvioClosep(s **CAVIOContext) int
- func AvioContextFree(s **CAVIOContext)
- func AvioEnumProtocols(opaque *unsafe.Pointer, output int) string
- func AvioFeof(s *CAVIOContext) int
- func AvioFindProtocolName(url string) string
- func AvioFlush(s *CAVIOContext)
- func AvioFreeDirectoryEntry(s **CAVIODirEntry)
- func AvioGetDynBuf(s *CAVIOContext, pbuffer unsafe.Pointer) int
- func AvioGetStr(pb *CAVIOContext, maxlen int, buf unsafe.Pointer, buflen int) int
- func AvioGetStr16be(pb *CAVIOContext, maxlen int, buf unsafe.Pointer, buflen int) int
- func AvioGetStr16le(pb *CAVIOContext, maxlen int, buf unsafe.Pointer, buflen int) int
- func AvioHandshake(c *CAVIOContext) int
- func AvioOpen(s **CAVIOContext, url string, flags int) int
- func AvioOpen2(s **CAVIOContext, url string, flags int, intCb *CAVIOInterruptCB, ...) int
- func AvioOpenDir(s **CAVIODirContext, url string, options **avutil.CAVDictionary) int
- func AvioOpenDynBuf(s **CAVIOContext) int
- func AvioPause(h *CAVIOContext, pause int) int
- func AvioPrintStringArray(s *CAVIOContext, strings []*C.char)
- func AvioProtocolGetClass(name string) *avutil.CAVClass
- func AvioPutStr(s *CAVIOContext, str string) int
- func AvioPutStr16be(s *CAVIOContext, str string) int
- func AvioPutStr16le(s *CAVIOContext, str string) int
- func AvioR8(s *CAVIOContext) int
- func AvioRb16(s *CAVIOContext) uint
- func AvioRb24(s *CAVIOContext) uint
- func AvioRb32(s *CAVIOContext) uint
- func AvioRb64(s *CAVIOContext) uint64
- func AvioRead(s *CAVIOContext, buf unsafe.Pointer, size int) int
- func AvioReadDir(s *CAVIODirContext, next **CAVIODirEntry) int
- func AvioReadPartial(s *CAVIOContext, buf unsafe.Pointer, size int) int
- func AvioReadToBprint(h *CAVIOContext, pb *CAVBPrint, maxSize ctypes.SizeT) int
- func AvioRl16(s *CAVIOContext) uint
- func AvioRl24(s *CAVIOContext) uint
- func AvioRl32(s *CAVIOContext) uint
- func AvioRl64(s *CAVIOContext) uint64
- func AvioSeek(s *CAVIOContext, offset int64, whence int) int64
- func AvioSeekTime(h *CAVIOContext, streamIndex int, timestamp int64, flags int) int64
- func AvioSize(s *CAVIOContext) int64
- func AvioSkip(s *CAVIOContext, offset int64) int64
- func AvioTell(s *CAVIOContext) int64
- func AvioVprintf(s *CAVIOContext, fmt string, ap *C.struct___va_list_tag) int
- func AvioW8(s *CAVIOContext, b int)
- func AvioWb16(s *CAVIOContext, val uint)
- func AvioWb24(s *CAVIOContext, val uint)
- func AvioWb32(s *CAVIOContext, val uint)
- func AvioWb64(s *CAVIOContext, val uint64)
- func AvioWl16(s *CAVIOContext, val uint)
- func AvioWl24(s *CAVIOContext, val uint)
- func AvioWl32(s *CAVIOContext, val uint)
- func AvioWl64(s *CAVIOContext, val uint64)
- func AvioWrite(s *CAVIOContext, buf unsafe.Pointer, size int)
- func AvioWriteMarker(s *CAVIOContext, time int64, _type CAVIODataMarkerType)
- type CAVBPrint
- type CAVChapter
- func (c *CAVChapter) GetEnd() int64
- func (c *CAVChapter) GetId() int64
- func (c *CAVChapter) GetMetadata() *avutil.CAVDictionary
- func (c *CAVChapter) GetStart() int64
- func (c *CAVChapter) GetTimeBase() avutil.CAVRational
- func (c *CAVChapter) SetEnd(end int64)
- func (c *CAVChapter) SetId(id int64)
- func (c *CAVChapter) SetMetadata(metadata *avutil.CAVDictionary)
- func (c *CAVChapter) SetStart(start int64)
- func (c *CAVChapter) SetTimeBase(timeBase avutil.CAVRational)
- type CAVCodecTag
- type CAVDurationEstimationMethod
- type CAVFormatContext
- func (fmtCtx *CAVFormatContext) GetAudioCodec() *avcodec.CAVCodec
- func (fmtCtx *CAVFormatContext) GetAudioCodecId() avcodec.CAVCodecID
- func (fmtCtx *CAVFormatContext) GetAudioPreload() int
- func (fmtCtx *CAVFormatContext) GetAvClass() *avutil.CAVClass
- func (fmtCtx *CAVFormatContext) GetAvioFlags() int
- func (fmtCtx *CAVFormatContext) GetAvoidNegativeTs() int
- func (fmtCtx *CAVFormatContext) GetBitRate() int64
- func (fmtCtx *CAVFormatContext) GetChapters() **CAVChapter
- func (fmtCtx *CAVFormatContext) GetCodecWhitelist() string
- func (fmtCtx *CAVFormatContext) GetControlMessageCb() CAvFormatControlMessage
- func (fmtCtx *CAVFormatContext) GetCorrectTsOverflow() uint
- func (fmtCtx *CAVFormatContext) GetCtxFlags() int
- func (fmtCtx *CAVFormatContext) GetDataCodec() *avcodec.CAVCodec
- func (fmtCtx *CAVFormatContext) GetDataCodecId() avcodec.CAVCodecID
- func (fmtCtx *CAVFormatContext) GetDebug() int
- func (fmtCtx *CAVFormatContext) GetDumpSeparator() string
- func (fmtCtx *CAVFormatContext) GetDuration() int64
- func (fmtCtx *CAVFormatContext) GetDurationEstimationMethod() CAVDurationEstimationMethod
- func (fmtCtx *CAVFormatContext) GetErrorRecognition() int
- func (fmtCtx *CAVFormatContext) GetEventFlags() int
- func (fmtCtx *CAVFormatContext) GetFlags() int
- func (fmtCtx *CAVFormatContext) GetFlushPackets() int
- func (fmtCtx *CAVFormatContext) GetFormatProbesize() int
- func (fmtCtx *CAVFormatContext) GetFormatWhitelist() string
- func (fmtCtx *CAVFormatContext) GetFpsProbeSize() int
- func (fmtCtx *CAVFormatContext) GetIformat() *CAVInputFormat
- func (fmtCtx *CAVFormatContext) GetInterruptCallback() CAVIOInterruptCB
- func (fmtCtx *CAVFormatContext) GetIoClose2() ctypes.CFunc
- func (fmtCtx *CAVFormatContext) GetIoOpen() ctypes.CFunc
- func (fmtCtx *CAVFormatContext) GetIoRespositioned() int
- func (fmtCtx *CAVFormatContext) GetKey() unsafe.Pointer
- func (fmtCtx *CAVFormatContext) GetKeylen() int
- func (fmtCtx *CAVFormatContext) GetMaxAnalyzeDuration() int64
- func (fmtCtx *CAVFormatContext) GetMaxChunkDuration() int
- func (fmtCtx *CAVFormatContext) GetMaxChunkSize() int
- func (fmtCtx *CAVFormatContext) GetMaxDelay() int
- func (fmtCtx *CAVFormatContext) GetMaxIndexSize() uint
- func (fmtCtx *CAVFormatContext) GetMaxInterleaveDelta() int64
- func (fmtCtx *CAVFormatContext) GetMaxPictureBuffer() uint
- func (fmtCtx *CAVFormatContext) GetMaxProbePackets() int
- func (fmtCtx *CAVFormatContext) GetMaxStreams() int
- func (fmtCtx *CAVFormatContext) GetMaxTsProbe() int
- func (fmtCtx *CAVFormatContext) GetMetadata() *avutil.CAVDictionary
- func (fmtCtx *CAVFormatContext) GetMetadataHeaderPadding() int
- func (fmtCtx *CAVFormatContext) GetNbChapters() uint
- func (fmtCtx *CAVFormatContext) GetNbPrograms() uint
- func (fmtCtx *CAVFormatContext) GetNbStreams() uint
- func (fmtCtx *CAVFormatContext) GetOformat() *CAVOutputFormat
- func (fmtCtx *CAVFormatContext) GetOpaque() unsafe.Pointer
- func (fmtCtx *CAVFormatContext) GetOutputTsOffset() int64
- func (fmtCtx *CAVFormatContext) GetPacketSize() uint
- func (fmtCtx *CAVFormatContext) GetPb() *CAVIOContext
- func (fmtCtx *CAVFormatContext) GetPbPtr() **CAVIOContext
- func (fmtCtx *CAVFormatContext) GetPrivData() unsafe.Pointer
- func (fmtCtx *CAVFormatContext) GetProbeScore() int
- func (fmtCtx *CAVFormatContext) GetProbesize() int64
- func (fmtCtx *CAVFormatContext) GetPrograms() **CAVProgram
- func (fmtCtx *CAVFormatContext) GetProtocolBlacklist() string
- func (fmtCtx *CAVFormatContext) GetProtocolWhitelist() string
- func (fmtCtx *CAVFormatContext) GetSeek2Any() int
- func (fmtCtx *CAVFormatContext) GetSkipEstimateDurationFromPts() int
- func (fmtCtx *CAVFormatContext) GetSkipInitialBytes() int64
- func (fmtCtx *CAVFormatContext) GetStartTime() int64
- func (fmtCtx *CAVFormatContext) GetStartTimeRealtime() int64
- func (fmtCtx *CAVFormatContext) GetStreams() **CAVStream
- func (fmtCtx *CAVFormatContext) GetStrictStdCompliance() int
- func (fmtCtx *CAVFormatContext) GetSubtitleCodec() *avcodec.CAVCodec
- func (fmtCtx *CAVFormatContext) GetSubtitleCodecId() avcodec.CAVCodecID
- func (fmtCtx *CAVFormatContext) GetTsId() int
- func (fmtCtx *CAVFormatContext) GetUrl() string
- func (fmtCtx *CAVFormatContext) GetUseWallclockAsTimestamps() int
- func (fmtCtx *CAVFormatContext) GetVideoCodec() *avcodec.CAVCodec
- func (fmtCtx *CAVFormatContext) GetVideoCodecId() avcodec.CAVCodecID
- func (fmtCtx *CAVFormatContext) SetAudioCodec(audioCodec *avcodec.CAVCodec)
- func (fmtCtx *CAVFormatContext) SetAudioCodecId(audioCodecId avcodec.CAVCodecID)
- func (fmtCtx *CAVFormatContext) SetAudioPreload(audioPreload int)
- func (fmtCtx *CAVFormatContext) SetAvioFlags(avioFlags int)
- func (fmtCtx *CAVFormatContext) SetAvoidNegativeTs(avoidNegativeTs int)
- func (fmtCtx *CAVFormatContext) SetBitRate(bitRate int64)
- func (fmtCtx *CAVFormatContext) SetChapters(chapters **CAVChapter)
- func (fmtCtx *CAVFormatContext) SetCodecWhitelist(codecWhitelist string)
- func (fmtCtx *CAVFormatContext) SetControlMessageCb(controlMessageCb CAvFormatControlMessage)
- func (fmtCtx *CAVFormatContext) SetCorrectTsOverflow(correctTsOverflow uint)
- func (fmtCtx *CAVFormatContext) SetCtxFlags(ctxFlags int)
- func (fmtCtx *CAVFormatContext) SetDataCodec(dataCodec *avcodec.CAVCodec)
- func (fmtCtx *CAVFormatContext) SetDataCodecId(dataCodecid avcodec.CAVCodecID)
- func (fmtCtx *CAVFormatContext) SetDebug(debug int)
- func (fmtCtx *CAVFormatContext) SetDumpSeparator(dumpSeparator string)
- func (fmtCtx *CAVFormatContext) SetDuration(duration int64)
- func (fmtCtx *CAVFormatContext) SetDurationEstimationMethod(durationEstimationMethod CAVDurationEstimationMethod)
- func (fmtCtx *CAVFormatContext) SetErrorRecognition(errorRecognition int)
- func (fmtCtx *CAVFormatContext) SetEventFlags(eventFlags int)
- func (fmtCtx *CAVFormatContext) SetFlags(flags int)
- func (fmtCtx *CAVFormatContext) SetFlushPackets(flushPackets int)
- func (fmtCtx *CAVFormatContext) SetFormatProbesize(formatProbeSize int)
- func (fmtCtx *CAVFormatContext) SetFormatWhitelist(formatWhitelist string)
- func (fmtCtx *CAVFormatContext) SetFpsProbeSize(fpsProbeSize int)
- func (fmtCtx *CAVFormatContext) SetInterruptCallback(interruptCall CAVIOInterruptCB)
- func (fmtCtx *CAVFormatContext) SetIoClose2(ioClose2 ctypes.CFunc)
- func (fmtCtx *CAVFormatContext) SetIoOpen(ioOpen ctypes.CFunc)
- func (fmtCtx *CAVFormatContext) SetIoRespositioned(ioRespositioned int)
- func (fmtCtx *CAVFormatContext) SetKey(key unsafe.Pointer)
- func (fmtCtx *CAVFormatContext) SetKeylen(keylen int)
- func (fmtCtx *CAVFormatContext) SetMaxAnalyzeDuration(maxAnalyzeDuration int64)
- func (fmtCtx *CAVFormatContext) SetMaxChunkDuration(maxChunkDuration int)
- func (fmtCtx *CAVFormatContext) SetMaxChunkSize(maxChunkSize int)
- func (fmtCtx *CAVFormatContext) SetMaxDelay(maxDelay int)
- func (fmtCtx *CAVFormatContext) SetMaxIndexSize(maxIndexSize uint)
- func (fmtCtx *CAVFormatContext) SetMaxInterleaveDelta(maxInterleaveDelta int64)
- func (fmtCtx *CAVFormatContext) SetMaxPictureBuffer(maxPictureBuffer uint)
- func (fmtCtx *CAVFormatContext) SetMaxProbePackets(maxProbePackets int)
- func (fmtCtx *CAVFormatContext) SetMaxStreams(maxStreams int)
- func (fmtCtx *CAVFormatContext) SetMaxTsProbe(maxTsProbe int)
- func (fmtCtx *CAVFormatContext) SetMetadata(metadata *avutil.CAVDictionary)
- func (fmtCtx *CAVFormatContext) SetMetadataHeaderPadding(metadataHeaderPadding int)
- func (fmtCtx *CAVFormatContext) SetNbChapters(nbChapter uint)
- func (fmtCtx *CAVFormatContext) SetNbPrograms(nbPrograms uint)
- func (fmtCtx *CAVFormatContext) SetNbStreams(nbStreams uint)
- func (fmtCtx *CAVFormatContext) SetOformat(oformat *CAVOutputFormat)
- func (fmtCtx *CAVFormatContext) SetOpaque(opaque unsafe.Pointer)
- func (fmtCtx *CAVFormatContext) SetOutputTsOffset(outputTsOffset int64)
- func (fmtCtx *CAVFormatContext) SetPacketSize(packetSize uint)
- func (fmtCtx *CAVFormatContext) SetPb(avioCtx *CAVIOContext)
- func (fmtCtx *CAVFormatContext) SetPrivData(privData unsafe.Pointer)
- func (fmtCtx *CAVFormatContext) SetProbeScore(probeScore int)
- func (fmtCtx *CAVFormatContext) SetProbesize(probesize int64)
- func (fmtCtx *CAVFormatContext) SetPrograms(programs **CAVProgram)
- func (fmtCtx *CAVFormatContext) SetProtocolBlacklist(protocolBlackList string)
- func (fmtCtx *CAVFormatContext) SetProtocolWhitelist(protocolWhitelist string)
- func (fmtCtx *CAVFormatContext) SetSeek2Any(seek2Any int)
- func (fmtCtx *CAVFormatContext) SetSkipEstimateDurationFromPts(skipEstimateDurationFromPts int)
- func (fmtCtx *CAVFormatContext) SetSkipInitialBytes(skipInitialBytes int64)
- func (fmtCtx *CAVFormatContext) SetStartTime(startTime int64)
- func (fmtCtx *CAVFormatContext) SetStartTimeRealtime(startTimeRealtime int64)
- func (fmtCtx *CAVFormatContext) SetStreams(streams **CAVStream)
- func (fmtCtx *CAVFormatContext) SetStrictStdCompliance(strictStdCompliance int)
- func (fmtCtx *CAVFormatContext) SetSubtitleCodec(subtitleCodec *avcodec.CAVCodec)
- func (fmtCtx *CAVFormatContext) SetSubtitleCodecId(subtitleCodecId avcodec.CAVCodecID)
- func (fmtCtx *CAVFormatContext) SetTsId(tsId int)
- func (fmtCtx *CAVFormatContext) SetUrl(url string)
- func (fmtCtx *CAVFormatContext) SetUseWallclockAsTimestamps(useWallclockAsTimestamps int)
- func (fmtCtx *CAVFormatContext) SetVideoCodec(videoCodec *avcodec.CAVCodec)
- func (fmtCtx *CAVFormatContext) SetVideoCodecId(videoCodecId avcodec.CAVCodecID)
- type CAVIOContext
- func (avioCtx *CAVIOContext) GetAvClass() *avutil.CAVClass
- func (avioCtx *CAVIOContext) GetBufEnd() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetBufPtr() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetBufPtrMax() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetBuffer() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetBufferSize() int
- func (avioCtx *CAVIOContext) GetBytesRead() int64
- func (avioCtx *CAVIOContext) GetBytesWritten() int64
- func (avioCtx *CAVIOContext) GetCheckSum() uint64
- func (avioCtx *CAVIOContext) GetCheckSumPtr() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetDirect() int
- func (avioCtx *CAVIOContext) GetEofReached() int
- func (avioCtx *CAVIOContext) GetError() int
- func (avioCtx *CAVIOContext) GetIgnoreBoundaryPoint() int
- func (avioCtx *CAVIOContext) GetMaxPacketSize() int
- func (avioCtx *CAVIOContext) GetMinPacketSize() int
- func (avioCtx *CAVIOContext) GetOpaque() unsafe.Pointer
- func (avioCtx *CAVIOContext) GetPos() int64
- func (avioCtx *CAVIOContext) GetProtocolBlacklist() string
- func (avioCtx *CAVIOContext) GetProtocolWhitelist() string
- func (avioCtx *CAVIOContext) GetReadPacket() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetReadPause() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetReadSeek() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetSeek() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetSeekable() int
- func (avioCtx *CAVIOContext) GetUpdateCheckSum() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetWriteDataType() ctypes.CFunc
- func (avioCtx *CAVIOContext) GetWriteFlag() int
- func (avioCtx *CAVIOContext) GetWritePacket() ctypes.CFunc
- func (avioCtx *CAVIOContext) SetBufEnd(bufEnd unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetBufPtr(bufPtr unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetBufPtrMax(bufPtrMax unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetBuffer(buffer unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetBufferSize(bufferSize int)
- func (avioCtx *CAVIOContext) SetCheckSum(checkSum uint64)
- func (avioCtx *CAVIOContext) SetCheckSumPtr(checkSumPtr unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetDirect(direct int)
- func (avioCtx *CAVIOContext) SetEofReached(eofReached int)
- func (avioCtx *CAVIOContext) SetError(_error int)
- func (avioCtx *CAVIOContext) SetIgnoreBoundaryPoint(ignoreBoundaryPoint int)
- func (avioCtx *CAVIOContext) SetMaxPacketSize(maxPacketSize int)
- func (avioCtx *CAVIOContext) SetMinPacketSize(minPacketSize int)
- func (avioCtx *CAVIOContext) SetOpaque(opaque unsafe.Pointer)
- func (avioCtx *CAVIOContext) SetPos(pos int64)
- func (avioCtx *CAVIOContext) SetProtocolBlacklist(protocolBlacklist string)
- func (avioCtx *CAVIOContext) SetProtocolWhitelist(protocolWhitelist string)
- func (avioCtx *CAVIOContext) SetReadPacket(readPacket ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetReadPause(readPause ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetReadSeek(readSeek ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetSeek(seek ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetSeekable(seekable int)
- func (avioCtx *CAVIOContext) SetUpdateCheckSum(updateCheckSum ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetWriteDataType(writeDataType ctypes.CFunc)
- func (avioCtx *CAVIOContext) SetWriteFlag(writeFlag int)
- func (avioCtx *CAVIOContext) SetWritePacket(writePacket ctypes.CFunc)
- type CAVIODataMarkerType
- type CAVIODirContext
- type CAVIODirEntry
- func (e *CAVIODirEntry) GetAccessTimestamp() int64
- func (e *CAVIODirEntry) GetFilemode() int64
- func (e *CAVIODirEntry) GetGroupId() int64
- func (e *CAVIODirEntry) GetModificationTimestamp() int64
- func (e *CAVIODirEntry) GetName() string
- func (e *CAVIODirEntry) GetSize() int64
- func (e *CAVIODirEntry) GetStatusChangeTimestamp() int64
- func (e *CAVIODirEntry) GetType() int
- func (e *CAVIODirEntry) GetUserId() int64
- func (e *CAVIODirEntry) GetUtf8() int
- func (e *CAVIODirEntry) SetAccessTimestamp(accessTimestamp int64)
- func (e *CAVIODirEntry) SetFilemode(filemode int64)
- func (e *CAVIODirEntry) SetGroupId(groupId int64)
- func (e *CAVIODirEntry) SetModificationTimestamp(modificationTimestamp int64)
- func (e *CAVIODirEntry) SetName(name string)
- func (e *CAVIODirEntry) SetSize(size int64)
- func (e *CAVIODirEntry) SetStatusChangeTimestamp(statusChangeTimestamp int64)
- func (e *CAVIODirEntry) SetType(_type int)
- func (e *CAVIODirEntry) SetUserId(userId int64)
- func (e *CAVIODirEntry) SetUtf8(utf8 int)
- type CAVIODirEntryType
- type CAVIOInterruptCB
- type CAVIndexEntry
- type CAVInputFormat
- func AvDeuxerIterate(opaque *unsafe.Pointer) *CAVInputFormat
- func AvFindInputFormat(shortName string) *CAVInputFormat
- func AvProbeInputFormat(pd *CAVProbeData, isOpened int) *CAVInputFormat
- func AvProbeInputFormat2(pd *CAVProbeData, isOpened int, scoreMax *ctypes.Int) *CAVInputFormat
- func AvProbeInputFormat3(pd *CAVProbeData, isOpened int, scoreRet *ctypes.Int) *CAVInputFormat
- func (iFormat *CAVInputFormat) GetCodecTag() **CAVCodecTag
- func (iFormat *CAVInputFormat) GetExtensions() string
- func (iFormat *CAVInputFormat) GetFlags() int
- func (iFormat *CAVInputFormat) GetFlagsInternal() int
- func (iFormat *CAVInputFormat) GetGetDeviceList() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetLongName() string
- func (iFormat *CAVInputFormat) GetMimeType() string
- func (iFormat *CAVInputFormat) GetName() string
- func (iFormat *CAVInputFormat) GetPrivClass() *avutil.CAVClass
- func (iFormat *CAVInputFormat) GetPrivDataSize() int
- func (iFormat *CAVInputFormat) GetRawCodecId() int
- func (iFormat *CAVInputFormat) GetReadClose() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadHeader() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadPacket() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadPause() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadPlay() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadProbe() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadSeek() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadSeek2() ctypes.CFunc
- func (iFormat *CAVInputFormat) GetReadTimestamp() ctypes.CFunc
- func (iFormat *CAVInputFormat) SetFlags(flags int)
- func (iFormat *CAVInputFormat) SetFlagsInternal(flagsInternal int)
- func (iFormat *CAVInputFormat) SetGetDeviceList(getDeviceList ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetPrivDataSize(privDataSize int)
- func (iFormat *CAVInputFormat) SetRawCodecId(rawCodecId int)
- func (iFormat *CAVInputFormat) SetReadClose(readClose ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadHeader(readHeader ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadPacket(readPacket ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadPause(readPause ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadPlay(readPlay ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadProbe(readProbe ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadSeek(readSeek ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadSeek2(readSeek2 ctypes.CFunc)
- func (iFormat *CAVInputFormat) SetReadTimestamp(readTimestamp ctypes.CFunc)
- type CAVOpenCallback
- type CAVOutputFormat
- func (oFormat *CAVOutputFormat) GetAudioCodec() avcodec.CAVCodecID
- func (oFormat *CAVOutputFormat) GetCodecTag() **CAVCodecTag
- func (oFormat *CAVOutputFormat) GetExtensions() string
- func (oFormat *CAVOutputFormat) GetFlags() int
- func (oFormat *CAVOutputFormat) GetLongName() string
- func (oFormat *CAVOutputFormat) GetMimeType() string
- func (oFormat *CAVOutputFormat) GetName() string
- func (oFormat *CAVOutputFormat) GetPrivClass() *avutil.CAVClass
- func (oFormat *CAVOutputFormat) GetSubtitleCodec() avcodec.CAVCodecID
- func (oFormat *CAVOutputFormat) GetVideoCodec() avcodec.CAVCodecID
- func (oFormat *CAVOutputFormat) SetAudioCodec(audioCodec avcodec.CAVCodecID)
- func (oFormat *CAVOutputFormat) SetFlags(flags int)
- func (oFormat *CAVOutputFormat) SetSubtitleCodec(subtitleCodec avcodec.CAVCodecID)
- func (oFormat *CAVOutputFormat) SetVideoCodec(videoCodec avcodec.CAVCodecID)
- type CAVProbeData
- type CAVProgram
- func (p *CAVProgram) GetDiscard() avcodec.CAVDiscard
- func (p *CAVProgram) GetEndTime() int64
- func (p *CAVProgram) GetFlags() int
- func (p *CAVProgram) GetId() int
- func (p *CAVProgram) GetMetadata() *avutil.CAVDictionary
- func (p *CAVProgram) GetNbStreamIndexes() uint
- func (p *CAVProgram) GetPcrPid() int
- func (p *CAVProgram) GetPmtPid() int
- func (p *CAVProgram) GetPmtVersion() int
- func (p *CAVProgram) GetProgramNum() int
- func (p *CAVProgram) GetPtsWrapBehavior() int
- func (p *CAVProgram) GetPtsWrapRefrence() int64
- func (p *CAVProgram) GetStartTime() int64
- func (p *CAVProgram) GetStreamIndex() *ctypes.UInt
- func (p *CAVProgram) SetDiscard(discard avcodec.CAVDiscard)
- func (p *CAVProgram) SetEndTime(endTime int64)
- func (p *CAVProgram) SetFlags(flags int)
- func (p *CAVProgram) SetId(id int)
- func (p *CAVProgram) SetMetadata(metadata *avutil.CAVDictionary)
- func (p *CAVProgram) SetNbStreamIndexes(nbStreamIndexs uint)
- func (p *CAVProgram) SetPcrPid(pcrPid int)
- func (p *CAVProgram) SetPmtPid(pmtPid int)
- func (p *CAVProgram) SetPmtVersion(pmtVersion int)
- func (p *CAVProgram) SetProgramNum(programNum int)
- func (p *CAVProgram) SetPtsWrapBehavior(ptsWrapBehavior int)
- func (p *CAVProgram) SetPtsWrapRefrence(ptsWrapReference int64)
- func (p *CAVProgram) SetStartTime(startTime int64)
- func (p *CAVProgram) SetStreamIndex(streamIndex *ctypes.UInt)
- type CAVStream
- func (st *CAVStream) GetAttachedPic() avcodec.CAVPacket
- func (st *CAVStream) GetAttachedPicPtr() *avcodec.CAVPacket
- func (st *CAVStream) GetAvClass() *avutil.CAVClass
- func (st *CAVStream) GetAvgFrameRate() avutil.CAVRational
- func (st *CAVStream) GetCodecPar() *avcodec.CAVCodecParameters
- func (st *CAVStream) GetDiscard() avcodec.CAVDiscard
- func (st *CAVStream) GetDisposition() int
- func (st *CAVStream) GetDuration() int64
- func (st *CAVStream) GetEventFlags() int
- func (st *CAVStream) GetId() int
- func (st *CAVStream) GetIndex() int
- func (st *CAVStream) GetMetadata() *avutil.CAVDictionary
- func (st *CAVStream) GetNbFrames() int64
- func (st *CAVStream) GetPrivData() unsafe.Pointer
- func (st *CAVStream) GetPtsWrapBits() int
- func (st *CAVStream) GetRFrameRate() avutil.CAVRational
- func (st *CAVStream) GetSampleAspectRatio() avutil.CAVRational
- func (st *CAVStream) GetStartTime() int64
- func (st *CAVStream) GetTimeBase() avutil.CAVRational
- func (st *CAVStream) GetTimeBasePtr() *avutil.CAVRational
- func (st *CAVStream) SetAvgFrameRate(avgFrameRate avutil.CAVRational)
- func (st *CAVStream) SetCodecPar(codecPar *avcodec.CAVCodecParameters)
- func (st *CAVStream) SetDiscard(discard avcodec.CAVDiscard)
- func (st *CAVStream) SetDisposition(disposition int)
- func (st *CAVStream) SetDuration(duration int64)
- func (st *CAVStream) SetEventFlags(eventFlags int)
- func (st *CAVStream) SetId(id int)
- func (st *CAVStream) SetIndex(index int)
- func (st *CAVStream) SetMetadata(metadata *avutil.CAVDictionary)
- func (st *CAVStream) SetNbFrames(nbFrames int64)
- func (st *CAVStream) SetPrivData(privData unsafe.Pointer)
- func (st *CAVStream) SetPtsWrapBits(ptsWrapBit int)
- func (st *CAVStream) SetRFrameRate(rFrameRate avutil.CAVRational)
- func (st *CAVStream) SetSampleAspectRatio(sampleAspectRatio avutil.CAVRational)
- func (st *CAVStream) SetStartTime(startTime int64)
- func (st *CAVStream) SetTimeBase(timeBase avutil.CAVRational)
- type CAVStreamParseType
- type CAVTimebaseSource
- type CAvFormatControlMessage
Constants ¶
const ( AVPROBE_SCORE_RETRY = C.AVPROBE_SCORE_RETRY AVPROBE_SCORE_STREAM_RETRY = C.AVPROBE_SCORE_STREAM_RETRY AVPROBE_SCORE_EXTENSION = C.AVPROBE_SCORE_EXTENSION ///< score for file extension AVPROBE_SCORE_MIME = C.AVPROBE_SCORE_MIME ///< score for file mime type AVPROBE_SCORE_MAX = C.AVPROBE_SCORE_MAX ///< maximum score )
const ( AVFMT_NOFILE = C.AVFMT_NOFILE AVFMT_NEEDNUMBER = C.AVFMT_NEEDNUMBER /**< Needs '%d' in filename. */ )
/ Demuxer will use avio_open, no opened file should be provided by the caller.
const ( AVFMT_EXPERIMENTAL = C.AVFMT_EXPERIMENTAL AVFMT_SHOW_IDS = C.AVFMT_SHOW_IDS /**< Show format stream IDs numbers. */ AVFMT_GLOBALHEADER = C.AVFMT_GLOBALHEADER /**< Format wants global header. */ AVFMT_NOTIMESTAMPS = C.AVFMT_NOTIMESTAMPS /**< Format does not need / have any timestamps. */ AVFMT_GENERIC_INDEX = C.AVFMT_GENERIC_INDEX /**< Use generic index building code. */ AVFMT_TS_DISCONT = C.AVFMT_TS_DISCONT /**< Format allows timestamp discontinuities. Note, muxers always require valid (monotone) timestamps */ AVFMT_VARIABLE_FPS = C.AVFMT_VARIABLE_FPS /**< Format allows variable fps. */ AVFMT_NODIMENSIONS = C.AVFMT_NODIMENSIONS /**< Format does not need width/height */ AVFMT_NOSTREAMS = C.AVFMT_NOSTREAMS /**< Format does not require any streams */ AVFMT_NOBINSEARCH = C.AVFMT_NOBINSEARCH /**< Format does not allow to fall back on binary search via read_timestamp */ AVFMT_NOGENSEARCH = C.AVFMT_NOGENSEARCH /**< Format does not allow to fall back on generic search */ AVFMT_NO_BYTE_SEEK = C.AVFMT_NO_BYTE_SEEK /**< Format does not allow seeking by bytes */ /**< Format does not require strictly increasing timestamps, but they must still be monotonic */ AVFMT_TS_NONSTRICT = C.AVFMT_TS_NONSTRICT /**< Format allows muxing negative timestamps. If not set the timestamp will be shifted in av_write_frame and av_interleaved_write_frame so they start from 0. The user or muxer can override this through AVFormatContext.avoid_negative_ts */ AVFMT_TS_NEGATIVE = C.AVFMT_TS_NEGATIVE AVFMT_SEEK_TO_PTS = C.AVFMT_SEEK_TO_PTS /**< Seeking is based on PTS */ )
*
- The muxer/demuxer is experimental and should be used with caution. *
- - demuxers: will not be selected automatically by probing, must be specified
- explicitly.
const ( /** * The stream should be chosen by default among other streams of the same type, * unless the user has explicitly specified otherwise. */ AV_DISPOSITION_DEFAULT = C.AV_DISPOSITION_DEFAULT /** * The stream is not in original language. * * @note AV_DISPOSITION_ORIGINAL is the inverse of this disposition. At most * one of them should be set in properly tagged streams. * @note This disposition may apply to any stream type, not just audio. */ AV_DISPOSITION_DUB = C.AV_DISPOSITION_DUB /** * The stream is in original language. * * @see the notes for AV_DISPOSITION_DUB */ AV_DISPOSITION_ORIGINAL = C.AV_DISPOSITION_ORIGINAL /** * The stream is a commentary track. */ AV_DISPOSITION_COMMENT = C.AV_DISPOSITION_COMMENT /** * The stream contains song lyrics. */ AV_DISPOSITION_LYRICS = C.AV_DISPOSITION_LYRICS /** * The stream contains karaoke audio. */ AV_DISPOSITION_KARAOKE = C.AV_DISPOSITION_KARAOKE /** * Track should be used during playback by default. * Useful for subtitle track that should be displayed * even when user did not explicitly ask for subtitles. */ AV_DISPOSITION_FORCED = C.AV_DISPOSITION_FORCED /** * The stream is intended for hearing impaired audiences. */ AV_DISPOSITION_HEARING_IMPAIRED = C.AV_DISPOSITION_HEARING_IMPAIRED /** * The stream is intended for visually impaired audiences. */ AV_DISPOSITION_VISUAL_IMPAIRED = C.AV_DISPOSITION_VISUAL_IMPAIRED /** * The audio stream contains music and sound effects without voice. */ AV_DISPOSITION_CLEAN_EFFECTS = C.AV_DISPOSITION_CLEAN_EFFECTS /** * The stream is stored in the file as an attached picture/"cover art" (e.g. * APIC frame in ID3v2). The first (usually only) packet associated with it * will be returned among the first few packets read from the file unless * seeking takes place. It can also be accessed at any time in * AVStream.attached_pic. */ AV_DISPOSITION_ATTACHED_PIC = C.AV_DISPOSITION_ATTACHED_PIC /** * The stream is sparse, and contains thumbnail images, often corresponding * to chapter markers. Only ever used with AV_DISPOSITION_ATTACHED_PIC. */ AV_DISPOSITION_TIMED_THUMBNAILS = C.AV_DISPOSITION_TIMED_THUMBNAILS /** * The stream is intended to be mixed with a spatial audio track. For example, * it could be used for narration or stereo music, and may remain unchanged by * listener head rotation. */ AV_DISPOSITION_NON_DIEGETIC = C.AV_DISPOSITION_NON_DIEGETIC /** * The subtitle stream contains captions, providing a transcription and possibly * a translation of audio. Typically intended for hearing-impaired audiences. */ AV_DISPOSITION_CAPTIONS = C.AV_DISPOSITION_CAPTIONS /** * The subtitle stream contains a textual description of the video content. * Typically intended for visually-impaired audiences or for the cases where the * video cannot be seen. */ AV_DISPOSITION_DESCRIPTIONS = C.AV_DISPOSITION_DESCRIPTIONS /** * The subtitle stream contains time-aligned metadata that is not intended to be * directly presented to the user. */ AV_DISPOSITION_METADATA = C.AV_DISPOSITION_METADATA /** * The audio stream is intended to be mixed with another stream before * presentation. * Corresponds to mix_type=0 in mpegts. */ AV_DISPOSITION_DEPENDENT = C.AV_DISPOSITION_DEPENDENT /** * The video stream contains still images. */ AV_DISPOSITION_STILL_IMAGE = C.AV_DISPOSITION_STILL_IMAGE )
const ( AV_PTS_WRAP_IGNORE = C.AV_PTS_WRAP_IGNORE ///< ignore the wrap AV_PTS_WRAP_ADD_OFFSET = C.AV_PTS_WRAP_ADD_OFFSET ///< add the format specific offset on wrap detection AV_PTS_WRAP_SUB_OFFSET = C.AV_PTS_WRAP_SUB_OFFSET ///< subtract the format specific offset on wrap detection )
*
- Options for behavior on timestamp wrap detection.
const ( AVFMT_FLAG_GENPTS = C.AVFMT_FLAG_GENPTS ///< Generate missing pts even if it requires parsing future frames. AVFMT_FLAG_IGNIDX = C.AVFMT_FLAG_IGNIDX ///< Ignore index. AVFMT_FLAG_NONBLOCK = C.AVFMT_FLAG_NONBLOCK ///< Do not block when reading packets from input. AVFMT_FLAG_IGNDTS = C.AVFMT_FLAG_IGNDTS ///< Ignore DTS on frames that contain both DTS & PTS AVFMT_FLAG_NOFILLIN = C.AVFMT_FLAG_NOFILLIN ///< Do not infer any values from other values, just return what is stored in the container AVFMT_FLAG_NOPARSE = C.AVFMT_FLAG_NOPARSE ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled AVFMT_FLAG_NOBUFFER = C.AVFMT_FLAG_NOBUFFER ///< Do not buffer frames when possible AVFMT_FLAG_CUSTOM_IO = C.AVFMT_FLAG_CUSTOM_IO ///< The caller has supplied a custom AVIOContext, don't avio_close() it. AVFMT_FLAG_DISCARD_CORRUPT = C.AVFMT_FLAG_DISCARD_CORRUPT ///< Discard frames marked corrupted AVFMT_FLAG_FLUSH_PACKETS = C.AVFMT_FLAG_FLUSH_PACKETS ///< Flush the AVIOContext every packet. /** * When muxing, try to avoid writing any random/volatile data to the output. * This includes any random IDs, real-time timestamps/dates, muxer version, etc. * * This flag is mainly intended for testing. */ AVFMT_FLAG_BITEXACT = C.AVFMT_FLAG_BITEXACT AVFMT_FLAG_SORT_DTS = C.AVFMT_FLAG_SORT_DTS ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) AVFMT_FLAG_FAST_SEEK = C.AVFMT_FLAG_FAST_SEEK ///< Enable fast, but inaccurate seeks for some formats // #if FF_API_LAVF_SHORTEST AVFMT_FLAG_SHORTEST = C.AVFMT_FLAG_SHORTEST ///< Stop muxing when the shortest stream stops. // #endif AVFMT_FLAG_AUTO_BSF = C.AVFMT_FLAG_AUTO_BSF ///< Add bitstream filters as requested by the muxer )
const ( AVFMT_AVOID_NEG_TS_AUTO = C.AVFMT_AVOID_NEG_TS_AUTO ///< Enabled when required by target format AVFMT_AVOID_NEG_TS_DISABLED = C.AVFMT_AVOID_NEG_TS_DISABLED ///< Do not shift timestamps even when they are negative. AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE = C.AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE ///< Shift timestamps so they are non negative AVFMT_AVOID_NEG_TS_MAKE_ZERO = C.AVFMT_AVOID_NEG_TS_MAKE_ZERO ///< Shift timestamps so that they start at 0 )
const ( AVSEEK_FLAG_BACKWARD = C.AVSEEK_FLAG_BACKWARD ///< seek backward AVSEEK_FLAG_BYTE = C.AVSEEK_FLAG_BYTE ///< seeking based on position in bytes AVSEEK_FLAG_ANY = C.AVSEEK_FLAG_ANY ///< seek to any frame, even non-keyframes AVSEEK_FLAG_FRAME = C.AVSEEK_FLAG_FRAME ///< seeking based on frame number )
const ( AVSTREAM_INIT_IN_WRITE_HEADER = C.AVSTREAM_INIT_IN_WRITE_HEADER ///< stream parameters initialized in avformat_write_header AVSTREAM_INIT_IN_INIT_OUTPUT = C.AVSTREAM_INIT_IN_INIT_OUTPUT ///< stream parameters initialized in avformat_init_output )
const ( AVIO_FLAG_READ = C.AVIO_FLAG_READ /**< read-only */ AVIO_FLAG_WRITE = C.AVIO_FLAG_WRITE /**< write-only */ AVIO_FLAG_READ_WRITE = C.AVIO_FLAG_READ_WRITE /**< read-write pseudo flag */ )
*
- @name URL open modes
- The flags argument to avio_open must be one of the following
- constants, optionally ORed with other flags.
- @{
const ( FF_API_COMPUTE_PKT_FIELDS2 = C.FF_API_COMPUTE_PKT_FIELDS2 FF_API_GET_END_PTS = C.FF_API_GET_END_PTS FF_API_AVIODIRCONTEXT = C.FF_API_AVIODIRCONTEXT FF_API_AVFORMAT_IO_CLOSE = C.FF_API_AVFORMAT_IO_CLOSE FF_API_AVIO_WRITE_NONCONST = C.FF_API_AVIO_WRITE_NONCONST FF_API_LAVF_SHORTEST = C.FF_API_LAVF_SHORTEST FF_API_ALLOW_FLUSH = C.FF_API_ALLOW_FLUSH FF_API_AVSTREAM_SIDE_DATA = C.FF_API_AVSTREAM_SIDE_DATA )
*
- FF_API_* defines may be placed below to indicate public API that will be
- dropped at a future version bump. The defines themselves are not part of
- the public API and may change, break or disappear at any time. *
- @note, when bumping the major version it is recommended to manually
- disable each FF_API_* in its own commit instead of disabling them all
- at once through the bump. This improves the git bisect-ability of the change. *
const AVFMTCTX_NOHEADER = C.AVFMTCTX_NOHEADER /**< signal that no header is present
(streams are added dynamically) */
const AVFMTCTX_UNSEEKABLE = C.AVFMTCTX_UNSEEKABLE /**< signal that the stream is definitely
not seekable, and attempts to call the
seek function will fail. For some
network protocols (e.g. HLS), this can
change dynamically at runtime. */
const AVFMT_EVENT_FLAG_METADATA_UPDATED = C.AVFMT_EVENT_FLAG_METADATA_UPDATED
*
- - demuxing: the demuxer read new metadata from the file and updated
- AVFormatContext.metadata accordingly
- - muxing: the user updated AVFormatContext.metadata and wishes the muxer to
- write it into the file
const AVINDEX_DISCARD_FRAME = C.AVINDEX_DISCARD_FRAME
*
- Flag is used to indicate which frame should be discarded after decoding.
const AVINDEX_KEYFRAME = C.AVINDEX_KEYFRAME
const AVIO_FLAG_DIRECT = C.AVIO_FLAG_DIRECT
*
- Use direct mode.
- avio_read and avio_write should if possible be satisfied directly
- instead of going through a buffer, and avio_seek will always
- call the underlying seek function directly.
const AVIO_FLAG_NONBLOCK = C.AVIO_FLAG_NONBLOCK
*
- Use non-blocking mode.
- If this flag is set, operations on the context will return
- AVERROR(EAGAIN) if they can not be performed immediately.
- If this flag is not set, operations on the context will never return
- AVERROR(EAGAIN).
- Note that this flag does not affect the opening/connecting of the
- context. Connecting a protocol will always block if necessary (e.g. on
- network protocols) but never hang (e.g. on busy devices).
- Warning: non-blocking protocols is work-in-progress; this flag may be
- silently ignored.
const AVIO_SEEKABLE_NORMAL = C.AVIO_SEEKABLE_NORMAL
*
- Seeking works like for a local file.
const AVIO_SEEKABLE_TIME = C.AVIO_SEEKABLE_TIME
*
- Seeking by timestamp with avio_seek_time() is possible.
const AVPROBE_PADDING_SIZE = C.AVPROBE_PADDING_SIZE ///< extra allocated bytes at the end of the probe buffer
const AVSEEK_FORCE = C.AVSEEK_FORCE
*
- Passing this flag as the "whence" parameter to a seek function causes it to
- seek by any means (like reopening and linear reading) or other normally unreasonable
- means that can be extremely slow.
- This may be ignored by the seek code.
const AVSEEK_SIZE = C.AVSEEK_SIZE
*
- ORing this as the "whence" parameter to a seek function causes it to
- return the filesize without seeking anywhere. Supporting this is optional.
- If it is not supported then the seek function will return <0.
const AVSTREAM_EVENT_FLAG_METADATA_UPDATED = C.AVSTREAM_EVENT_FLAG_METADATA_UPDATED
*
- - demuxing: the demuxer read new metadata from the file and updated
- AVStream.metadata accordingly
- - muxing: the user updated AVStream.metadata and wishes the muxer to write
- it into the file
const AVSTREAM_EVENT_FLAG_NEW_PACKETS = C.AVSTREAM_EVENT_FLAG_NEW_PACKETS
*
- - demuxing: new packets for this stream were read from the file. This
- event is informational only and does not guarantee that new packets
- for this stream will necessarily be returned from av_read_frame().
const AV_FRAME_FILENAME_FLAGS_MULTIPLE = C.AV_FRAME_FILENAME_FLAGS_MULTIPLE ///< Allow multiple %d
const AV_PROGRAM_RUNNING = C.AV_PROGRAM_RUNNING
const FF_API_R_FRAME_RATE = C.FF_API_R_FRAME_RATE
const FF_FDEBUG_TS = C.FF_FDEBUG_TS
const LIBAVFORMAT_BUILD = C.LIBAVFORMAT_BUILD
const LIBAVFORMAT_IDENT = C.LIBAVFORMAT_IDENT
const LIBAVFORMAT_VERSION_INT = C.LIBAVFORMAT_VERSION_INT
const LIBAVFORMAT_VERSION_MAJOR = C.LIBAVFORMAT_VERSION_MAJOR
Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) Also please add any ticket numbers that you believe might be affected here
const LIBAVFORMAT_VERSION_MICRO = C.LIBAVFORMAT_VERSION_MICRO
const LIBAVFORMAT_VERSION_MINOR = C.LIBAVFORMAT_VERSION_MINOR
Variables ¶
This section is empty.
Functions ¶
func AvAddIndexEntry ¶ added in v0.0.5
func AvAddIndexEntry(st *CAVStream, pos int64, timestamp int64, size int, distance int, flags int) int
*
- Add an index entry into a sorted list. Update the entry if the list
- already contains it. *
- @param timestamp timestamp in the time base of the given stream
func AvAppendPacket ¶
func AvAppendPacket(s *CAVIOContext, pkt *avcodec.CAVPacket, size int) int
*
- Read data and append it to the current content of the AVPacket.
- If pkt->size is 0 this is identical to av_get_packet.
- Note that this uses av_grow_packet and thus involves a realloc
- which is inefficient. Thus this function should only be used
- when there is no reasonable way to know (an upper bound of)
- the final size. *
- @param s associated IO context
- @param pkt packet
- @param size amount of data to read
- @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data
- will not be lost even if an error occurs.
func AvCodecGetId ¶
func AvCodecGetId(tags **CAVCodecTag, tag uint) avcodec.CAVCodecID
*
- Get the AVCodecID for the given codec tag tag.
- If no codec id is found returns AV_CODEC_ID_NONE. *
- @param tags list of supported codec_id-codec_tag pairs, as stored
- in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
- @param tag codec tag to match to a codec ID
func AvCodecGetTag ¶
func AvCodecGetTag(tags **CAVCodecTag, id avcodec.CAVCodecID) uint
*
- Get the codec tag for the given codec id id.
- If no codec tag is found returns 0. *
- @param tags list of supported codec_id-codec_tag pairs, as stored
- in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
- @param id codec ID to match to a codec tag
func AvCodecGetTag2 ¶
func AvCodecGetTag2(tags **CAVCodecTag, id avcodec.CAVCodecID, tag *ctypes.UInt) int
*
- Get the codec tag for the given codec id. *
- @param tags list of supported codec_id - codec_tag pairs, as stored
- in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
- @param id codec id that should be searched for in the list
- @param tag A pointer to the found tag
- @return 0 if id was not found in tags, > 0 if it was found
func AvDispositionFromString ¶
*
- @return The AV_DISPOSITION_* flag corresponding to disp or a negative error
- code if disp does not correspond to a known stream disposition.
func AvDispositionToString ¶
*
- @param disposition a combination of AV_DISPOSITION_* values
- @return The string description corresponding to the lowest set bit in
- disposition. NULL when the lowest set bit does not correspond
- to a known disposition or when disposition is 0.
func AvDumpFormat ¶
func AvDumpFormat(ic *CAVFormatContext, index int, url string, is_output int)
*
- Print detailed information about the input or output format, such as
- duration, bitrate, streams, container, programs, metadata, side data,
- codec and time base. *
- @param ic the context to analyze
- @param index index of the stream to dump information about
- @param url the URL to print, such as source or destination file
- @param is_output Select whether the specified context is an input(0) or output(1)
func AvFilenameNumberTest ¶ added in v0.0.5
*
- Check whether filename actually is a numbered sequence generator. *
- @param filename possible numbered sequence string
- @return 1 if a valid numbered sequence string, 0 otherwise
func AvFindBestStream ¶
func AvFindBestStream(ic *CAVFormatContext, _type avutil.CAVMediaType, wanted_stream_nb int, related_stream int, decoder_ret **avcodec.CAVCodec, flags int) int
*
- Find the "best" stream in the file.
- The best stream is determined according to various heuristics as the most
- likely to be what the user expects.
- If the decoder parameter is non-NULL, av_find_best_stream will find the
- default decoder for the stream's codec; streams for which no decoder can
- be found are ignored. *
- @param ic media file handle
- @param type stream type: video, audio, subtitles, etc.
- @param wanted_stream_nb user-requested stream number,
- or -1 for automatic selection
- @param related_stream try to find a stream related (eg. in the same
- program) to this one, or -1 if none
- @param decoder_ret if non-NULL, returns the decoder for the
- selected stream
- @param flags flags; none are currently defined *
- @return the non-negative stream number in case of success,
- AVERROR_STREAM_NOT_FOUND if no stream with the requested type
- could be found,
- AVERROR_DECODER_NOT_FOUND if streams were found but no decoder *
- @note If av_find_best_stream returns successfully and decoder_ret is not
- NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
func AvFindDefaultStreamIndex ¶
func AvFindDefaultStreamIndex(s *CAVFormatContext) int
func AvFormatInjectGlobalSideData ¶
func AvFormatInjectGlobalSideData(s *CAVFormatContext)
*
- This function will cause global side data to be injected in the next packet
- of each stream as well as after any subsequent seek. *
- @note global side data is always available in every AVStream's
- @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
- in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
- initialized with said stream's codecpar.
- @see av_packet_side_data_get()
func AvGetFrameFilename ¶ added in v0.0.5
func AvGetFrameFilename2 ¶ added in v0.0.5
*
- Return in 'buf' the path with '%d' replaced by a number. *
- Also handles the '%0nd' format where 'n' is the total number
- of digits and '%%'. *
- @param buf destination buffer
- @param buf_size destination buffer size
- @param path numbered sequence string
- @param number frame number
- @param flags AV_FRAME_FILENAME_FLAGS_*
- @return 0 if OK, -1 on format error
func AvGetOutputTimestamp ¶
func AvGetOutputTimestamp(s *CAVFormatContext, stream int, dts *ctypes.Int64, wall *ctypes.Int64) int
*
- Get timing information for the data currently output.
- The exact meaning of "currently output" depends on the format.
- It is mostly relevant for devices that have an internal buffer and/or
- work in real time.
- @param s media file handle
- @param stream stream in the media file
- @param[out] dts DTS of the last packet output for the stream, in stream
- time_base units
- @param[out] wall absolute time when that packet whas output,
- in microsecond
- @retval 0 Success
- @retval AVERROR(ENOSYS) The format does not support it *
- @note Some formats or devices may not allow to measure dts and wall
- atomically.
func AvGetPacket ¶
func AvGetPacket(s *CAVIOContext, pkt *avcodec.CAVPacket, size int) int
*
- Allocate and read the payload of a packet and initialize its
- fields with default values. *
- @param s associated IO context
- @param pkt packet
- @param size desired payload size
- @return >0 (read size) if OK, AVERROR_xxx otherwise
func AvGuessCodec ¶
func AvGuessCodec(fmt *CAVOutputFormat, shortName string, filename string, mimeType string, _type avutil.CAVMediaType) avcodec.CAVCodecID
*
- Guess the codec ID based upon muxer and filename.
func AvGuessFrameRate ¶ added in v0.0.5
func AvGuessFrameRate(ctx *CAVFormatContext, stream *CAVStream, frame *avutil.CAVFrame) avutil.CAVRational
*
- Guess the frame rate, based on both the container and codec information. *
- @param ctx the format context which the stream is part of
- @param stream the stream which the frame is part of
- @param frame the frame for which the frame rate should be determined, may be NULL
- @return the guessed (valid) frame rate, 0/1 if no idea
func AvGuessSampleAspectRatio ¶ added in v0.0.5
func AvGuessSampleAspectRatio(format *CAVFormatContext, stream *CAVStream, frame *avutil.CAVFrame) avutil.CAVRational
*
- Guess the sample aspect ratio of a frame, based on both the stream and the
- frame aspect ratio. *
- Since the frame aspect ratio is set by the codec but the stream aspect ratio
- is set by the demuxer, these two may not be equal. This function tries to
- return the value that you should use if you would like to display the frame. *
- Basic logic is to use the stream aspect ratio if it is set to something sane
- otherwise use the frame aspect ratio. This way a container setting, which is
- usually easy to modify can override the coded value in the frames. *
- @param format the format context which the stream is part of
- @param stream the stream which the frame is part of
- @param frame the frame with the aspect ratio to be determined
- @return the guessed (valid) sample_aspect_ratio, 0/1 if no idea
func AvHexDump ¶
*
- Send a nice hexadecimal dump of a buffer to the specified file stream. *
- @param f The file stream pointer where the dump should be sent to.
- @param buf buffer
- @param size buffer size *
- @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2
func AvHexDumpLog ¶
*
- Send a nice hexadecimal dump of a buffer to the log. *
- @param avcl A pointer to an arbitrary struct of which the first field is a
- pointer to an AVClass struct.
- @param level The importance level of the message, lower values signifying
- higher importance.
- @param buf buffer
- @param size buffer size *
- @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2
func AvIndexSearchTimestamp ¶
*
- Get the index for a specific timestamp. *
- @param st stream that the timestamp belongs to
- @param timestamp timestamp to retrieve the index for
- @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond
- to the timestamp which is <= the requested one, if backward
- is 0, then it will be >=
- if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise
- @return < 0 if no such timestamp could be found
func AvInterleavedWriteFrame ¶
func AvInterleavedWriteFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
*
- Write a packet to an output media file ensuring correct interleaving. *
- This function will buffer the packets internally as needed to make sure the
- packets in the output file are properly interleaved, usually ordered by
- increasing dts. Callers doing their own interleaving should call
- av_write_frame() instead of this function. *
- Using this function instead of av_write_frame() can give muxers advance
- knowledge of future packets, improving e.g. the behaviour of the mp4
- muxer for VFR content in fragmenting mode. *
- @param s media file handle
- @param pkt The packet containing the data to be written.
- <br>
- If the packet is reference-counted, this function will take
- ownership of this reference and unreference it later when it sees
- fit. If the packet is not reference-counted, libavformat will
- make a copy.
- The returned packet will be blank (as if returned from
- av_packet_alloc()), even on error.
- <br>
- This parameter can be NULL (at any time, not just at the end), to
- flush the interleaving queues.
- <br>
- Packet's @ref AVPacket.stream_index "stream_index" field must be
- set to the index of the corresponding stream in @ref
- AVFormatContext.streams "s->streams".
- <br>
- The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts")
- must be set to correct values in the stream's timebase (unless the
- output format is flagged with the AVFMT_NOTIMESTAMPS flag, then
- they can be set to AV_NOPTS_VALUE).
- The dts for subsequent packets in one stream must be strictly
- increasing (unless the output format is flagged with the
- AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing).
- @ref AVPacket.duration "duration" should also be set if known. *
- @return 0 on success, a negative AVERROR on error. *
- @see av_write_frame(), AVFormatContext.max_interleave_delta
func AvInterleavedWriteUncodedFrame ¶
func AvInterleavedWriteUncodedFrame(s *CAVFormatContext, streamIndex int, frame *avutil.CAVFrame) int
*
- Write an uncoded frame to an output media file. *
- If the muxer supports it, this function makes it possible to write an AVFrame
- structure directly, without encoding it into a packet.
- It is mostly useful for devices and similar special muxers that use raw
- video or PCM data and will not serialize it into a byte stream. *
- To test whether it is possible to use it with a given muxer and stream,
- use av_write_uncoded_frame_query(). *
- The caller gives up ownership of the frame and must not access it
- afterwards. *
- @return >=0 for success, a negative code on error
func AvMatchExt ¶ added in v0.0.5
*
- Return a positive value if the given filename has one of the given
- extensions, 0 otherwise. *
- @param filename file name to check against the given extensions
- @param extensions a comma-separated list of filename extensions
func AvPktDump2 ¶
*
- Send a nice dump of a packet to the specified file stream. *
- @param f The file stream pointer where the dump should be sent to.
- @param pkt packet to dump
- @param dump_payload True if the payload must be displayed, too.
- @param st AVStream that the packet belongs to
func AvPktDumpLog2 ¶
func AvPktDumpLog2(avcl unsafe.Pointer, level int, pkt *avcodec.CAVPacket, dumpPayload int, st *CAVStream)
*
- Send a nice dump of a packet to the log. *
- @param avcl A pointer to an arbitrary struct of which the first field is a
- pointer to an AVClass struct.
- @param level The importance level of the message, lower values signifying
- higher importance.
- @param pkt packet to dump
- @param dump_payload True if the payload must be displayed, too.
- @param st AVStream that the packet belongs to
func AvProbeInputBuffer ¶
func AvProbeInputBuffer(pd *CAVIOContext, fmt **CAVInputFormat, url string, logctx unsafe.Pointer, offset uint, maxProbeSize uint) int
*
- Like av_probe_input_buffer2() but returns 0 on success
func AvProbeInputBuffer2 ¶
func AvProbeInputBuffer2(pd *CAVIOContext, fmt **CAVInputFormat, url string, logctx unsafe.Pointer, offset uint, maxProbeSize uint) int
*
- Probe a bytestream to determine the input format. Each time a probe returns
- with a score that is too low, the probe buffer size is increased and another
- attempt is made. When the maximum probe size is reached, the input format
- with the highest score is returned. *
- @param pb the bytestream to probe
- @param fmt the input format is put here
- @param url the url of the stream
- @param logctx the log context
- @param offset the offset within the bytestream to probe from
- @param max_probe_size the maximum probe buffer size (zero for default) *
- @return the score in case of success, a negative value corresponding to an
- the maximal score is AVPROBE_SCORE_MAX
- AVERROR code otherwise
func AvProgramAddStreamIndex ¶
func AvProgramAddStreamIndex(ac *CAVFormatContext, progid int, idx uint)
func AvReadFrame ¶
func AvReadFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
*
- Return the next frame of a stream.
- This function returns what is stored in the file, and does not validate
- that what is there are valid frames for the decoder. It will split what is
- stored in the file into frames and return one for each call. It will not
- omit invalid data between valid frames so as to give the decoder the maximum
- information possible for decoding. *
- On success, the returned packet is reference-counted (pkt->buf is set) and
- valid indefinitely. The packet must be freed with av_packet_unref() when
- it is no longer needed. For video, the packet contains exactly one frame.
- For audio, it contains an integer number of frames if each frame has
- a known fixed size (e.g. PCM or ADPCM data). If the audio frames have
- a variable size (e.g. MPEG audio), then it contains one frame. *
- pkt->pts, pkt->dts and pkt->duration are always set to correct
- values in AVStream.time_base units (and guessed if the format cannot
- provide them). pkt->pts can be AV_NOPTS_VALUE if the video format
- has B-frames, so it is better to rely on pkt->dts if you do not
- decompress the payload. *
- @return 0 if OK, < 0 on error or end of file. On error, pkt will be blank
- (as if it came from av_packet_alloc()). *
- @note pkt will be initialized, so it may be uninitialized, but it must not
- contain data that needs to be freed.
func AvReadPause ¶
func AvReadPause(s *CAVFormatContext) int
* * Pause a network-based stream (e.g. RTSP stream). * * Use av_read_play() to resume it.
func AvReadPlay ¶
func AvReadPlay(s *CAVFormatContext) int
* * Start playing a network-based stream (e.g. RTSP stream) at the * current position.
func AvSdpCreate ¶ added in v0.0.5
*
- Generate an SDP for an RTP session. *
- Note, this overwrites the id values of AVStreams in the muxer contexts
- for getting unique dynamic payload types. *
- @param ac array of AVFormatContexts describing the RTP streams. If the
- array is composed by only one context, such context can contain
- multiple AVStreams (one AVStream per RTP stream). Otherwise,
- all the contexts in the array (an AVCodecContext per RTP stream)
- must contain only one AVStream.
- @param n_files number of AVCodecContexts contained in ac
- @param buf buffer where the SDP will be stored (must be allocated by
- the caller)
- @param size the size of the buffer
- @return 0 if OK, AVERROR_xxx on error
func AvSeekFrame ¶
func AvSeekFrame(s *CAVFormatContext, streamIndex int, timestamp int64, flags int) int
*
- Seek to the keyframe at timestamp.
- 'timestamp' in 'stream_index'. *
- @param s media file handle
- @param stream_index If stream_index is (-1), a default stream is selected,
- and timestamp is automatically converted from
- AV_TIME_BASE units to the stream specific time_base.
- @param timestamp Timestamp in AVStream.time_base units or, if no stream
- is specified, in AV_TIME_BASE units.
- @param flags flags which select direction and seeking mode *
- @return >= 0 on success
func AvStreamGetClass ¶
*
- Get the AVClass for AVStream. It can be used in combination with
- AV_OPT_SEARCH_FAKE_OBJ for examining options. *
- @see av_opt_find().
func AvStreamGetCodecTimebase ¶
func AvStreamGetCodecTimebase(st *CAVStream) avutil.CAVRational
*
- Get the internal codec timebase from a stream. *
- @param st input stream to extract the timebase from
func AvStreamGetParser ¶
func AvStreamGetParser(s *CAVStream) *avcodec.CAVCodecParserContext
func AvUrlSplit ¶ added in v0.0.5
func AvUrlSplit(proto unsafe.Pointer, protoSize int, authorization unsafe.Pointer, authorizationSize int, hostname unsafe.Pointer, hostnameSize int, portPtr *ctypes.Int, path unsafe.Pointer, pathSize int, url string)
*
- Split a URL string into components. *
- The pointers to buffers for storing individual components may be null,
- in order to ignore that component. Buffers for components not found are
- set to empty strings. If the port is not found, it is set to a negative
- value. *
- @param proto the buffer for the protocol
- @param proto_size the size of the proto buffer
- @param authorization the buffer for the authorization
- @param authorization_size the size of the authorization buffer
- @param hostname the buffer for the host name
- @param hostname_size the size of the hostname buffer
- @param port_ptr a pointer to store the port number in
- @param path the buffer for the path
- @param path_size the size of the path buffer
- @param url the URL to split
func AvWriteFrame ¶
func AvWriteFrame(s *CAVFormatContext, pkt *avcodec.CAVPacket) int
*
- Write a packet to an output media file. *
- This function passes the packet directly to the muxer, without any buffering
- or reordering. The caller is responsible for correctly interleaving the
- packets if the format requires it. Callers that want libavformat to handle
- the interleaving should call av_interleaved_write_frame() instead of this
- function. *
- @param s media file handle
- @param pkt The packet containing the data to be written. Note that unlike
- av_interleaved_write_frame(), this function does not take
- ownership of the packet passed to it (though some muxers may make
- an internal reference to the input packet).
- <br>
- This parameter can be NULL (at any time, not just at the end), in
- order to immediately flush data buffered within the muxer, for
- muxers that buffer up data internally before writing it to the
- output.
- <br>
- Packet's @ref AVPacket.stream_index "stream_index" field must be
- set to the index of the corresponding stream in @ref
- AVFormatContext.streams "s->streams".
- <br>
- The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts")
- must be set to correct values in the stream's timebase (unless the
- output format is flagged with the AVFMT_NOTIMESTAMPS flag, then
- they can be set to AV_NOPTS_VALUE).
- The dts for subsequent packets passed to this function must be strictly
- increasing when compared in their respective timebases (unless the
- output format is flagged with the AVFMT_TS_NONSTRICT, then they
- merely have to be nondecreasing). @ref AVPacket.duration
- "duration") should also be set if known.
- @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush *
- @see av_interleaved_write_frame()
func AvWriteTrailer ¶
func AvWriteTrailer(s *CAVFormatContext) int
*
- Write the stream trailer to an output media file and free the
- file private data. *
- May only be called after a successful call to avformat_write_header. *
- @param s media file handle
- @return 0 if OK, AVERROR_xxx on error
func AvWriteUncodedFrame ¶
func AvWriteUncodedFrame(s *CAVFormatContext, streamIndex int, frame *avutil.CAVFrame) int
*
- Write an uncoded frame to an output media file. *
- The frame must be correctly interleaved according to the container
- specification; if not, av_interleaved_write_uncoded_frame() must be used. *
- See av_interleaved_write_uncoded_frame() for details.
func AvWriteUncodedFrameQuery ¶
func AvWriteUncodedFrameQuery(s *CAVFormatContext, streamIndex int) int
*
- Test whether a muxer supports uncoded frame. *
- @return >=0 if an uncoded frame can be written to that muxer and stream,
- <0 if not
func AvformatAllocOutputContext2 ¶
func AvformatAllocOutputContext2(ctx **CAVFormatContext, oformat *CAVOutputFormat, format_name string, filename string) int
*
- Allocate an AVFormatContext for an output format.
- avformat_free_context() can be used to free the context and
- everything allocated by the framework within it. *
- @param ctx pointee is set to the created format context,
- or to NULL in case of failure
- @param oformat format to use for allocating the context, if NULL
- format_name and filename are used instead
- @param format_name the name of output format to use for allocating the
- context, if NULL filename is used instead
- @param filename the name of the filename to use for allocating the
- context, may be NULL *
- @return >= 0 in case of success, a negative AVERROR code in case of
- failure
func AvformatCloseInput ¶
func AvformatCloseInput(s **CAVFormatContext)
*
- Close an opened input AVFormatContext. Free it and all its contents
- and set *s to NULL.
func AvformatConfiguration ¶
func AvformatConfiguration() string
*
- Return the libavformat build-time configuration.
func AvformatFindStreamInfo ¶
func AvformatFindStreamInfo(ic *CAVFormatContext, options **avutil.CAVDictionary) int
*
- Read packets of a media file to get stream information. This
- is useful for file formats with no headers such as MPEG. This
- function also computes the real framerate in case of MPEG-2 repeat
- frame mode.
- The logical file position is not changed by this function;
- examined packets may be buffered for later processing. *
- @param ic media file handle
- @param options If non-NULL, an ic.nb_streams long array of pointers to
- dictionaries, where i-th member contains options for
- codec corresponding to i-th stream.
- On return each dictionary will be filled with options that were not found.
- @return >=0 if OK, AVERROR_xxx on error *
- @note this function isn't guaranteed to open all the codecs, so
- options being non-empty at return is a perfectly normal behavior. *
- @todo Let the user decide somehow what information is needed so that
- we do not waste time getting stuff the user does not need.
func AvformatFlush ¶
func AvformatFlush(s *CAVFormatContext) int
* * Discard all internally buffered data. This can be useful when dealing with * discontinuities in the byte stream. Generally works only with formats that * can resync. This includes headerless formats like MPEG-TS/TS but should also * work with NUT, Ogg and in a limited way AVI for example. * * The set of streams, the detected duration, stream parameters and codecs do * not change when calling this function. If you want a complete reset, it's * better to open a new AVFormatContext. * * This does not flush the AVIOContext (s->pb). If necessary, call * avio_flush(s->pb) before calling this function. * * @param s media file handle * @return >=0 on success, error code otherwise
func AvformatFreeContext ¶
func AvformatFreeContext(s *CAVFormatContext)
*
- Free an AVFormatContext and all its streams.
- @param s context to free
func AvformatGetClass ¶
*
- Get the AVClass for AVFormatContext. It can be used in combination with
- AV_OPT_SEARCH_FAKE_OBJ for examining options. *
- @see av_opt_find().
func AvformatIndexGetEntriesCount ¶
*
- Get the index entry count for the given AVStream. *
- @param st stream
- @return the number of index entries in the stream
func AvformatInitOutput ¶
func AvformatInitOutput(s *CAVFormatContext, options **avutil.CAVDictionary) int
*
- Allocate the stream private data and initialize the codec, but do not write the header.
- May optionally be used before avformat_write_header() to initialize stream parameters
- before actually writing the header.
- If using this function, do not pass the same options to avformat_write_header(). *
- @param s Media file handle, must be allocated with
- avformat_alloc_context().
- Its \ref AVFormatContext.oformat "oformat" field must be set
- to the desired output format;
- Its \ref AVFormatContext.pb "pb" field must be set to an
- already opened ::AVIOContext.
- @param options An ::AVDictionary filled with AVFormatContext and
- muxer-private options.
- On return this parameter will be destroyed and replaced with
- a dict containing options that were not found. May be NULL. *
- @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec requires
- avformat_write_header to fully initialize.
- @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec has been fully
- initialized.
- @retval AVERROR Anegative AVERROR on failure. *
- @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header.
func AvformatMatchStreamSpecifier ¶ added in v0.0.5
func AvformatMatchStreamSpecifier(s *CAVFormatContext, st *CAVStream, spec string) int
*
- Check if the stream st contained in s is matched by the stream specifier
- spec. *
- See the "stream specifiers" chapter in the documentation for the syntax
- of spec. *
- @return >0 if st is matched by spec;
- 0 if st is not matched by spec;
- AVERROR code if spec is invalid *
- @note A stream specifier can match several streams in the format.
func AvformatNetworkDeinit ¶
func AvformatNetworkDeinit() int
*
- Undo the initialization done by avformat_network_init. Call it only
- once for each time you called avformat_network_init.
func AvformatNetworkInit ¶
func AvformatNetworkInit() int
*
- Do global initialization of network libraries. This is optional,
- and not recommended anymore. *
- This functions only exists to work around thread-safety issues
- with older GnuTLS or OpenSSL libraries. If libavformat is linked
- to newer versions of those libraries, or if you do not use them,
- calling this function is unnecessary. Otherwise, you need to call
- this function before any other threads using them are started. *
- This function will be deprecated once support for older GnuTLS and
- OpenSSL libraries is removed, and this function has no purpose
- anymore.
func AvformatOpenInput ¶
func AvformatOpenInput(ps **CAVFormatContext, url string, fmt *CAVInputFormat, options **avutil.CAVDictionary) int
*
- Open an input stream and read the header. The codecs are not opened.
- The stream must be closed with avformat_close_input(). *
- @param ps Pointer to user-supplied AVFormatContext (allocated by
- avformat_alloc_context). May be a pointer to NULL, in
- which case an AVFormatContext is allocated by this
- function and written into ps.
- Note that a user-supplied AVFormatContext will be freed
- on failure.
- @param url URL of the stream to open.
- @param fmt If non-NULL, this parameter forces a specific input format.
- Otherwise the format is autodetected.
- @param options A dictionary filled with AVFormatContext and demuxer-private
- options.
- On return this parameter will be destroyed and replaced with
- a dict containing options that were not found. May be NULL. *
- @return 0 on success, a negative AVERROR on failure. *
- @note If you want to use custom IO, preallocate the format context and set its pb field.
func AvformatQueryCodec ¶ added in v0.0.5
func AvformatQueryCodec(ofmt *CAVOutputFormat, codecId avcodec.CAVCodecID, stdCompliance int) int
*
- Test if the given container can store a codec. *
- @param ofmt container to check for compatibility
- @param codec_id codec to potentially store in container
- @param std_compliance standards compliance level, one of FF_COMPLIANCE_* *
- @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.
- A negative number if this information is not available.
func AvformatQueueAttachedPictures ¶
func AvformatQueueAttachedPictures(s *CAVFormatContext) int
func AvformatSeekFile ¶
func AvformatSeekFile(s *CAVFormatContext, streamIndex int, minTs int64, ts int64, maxTs int64, flags int) int
* * Seek to timestamp ts. * Seeking will be done so that the point from which all active streams * can be presented successfully will be closest to ts and within min/max_ts. * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. * * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and * are the file position (this may not be supported by all demuxers). * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames * in the stream with stream_index (this may not be supported by all demuxers). * Otherwise all timestamps are in units of the stream selected by stream_index * or if stream_index is -1, in AV_TIME_BASE units. * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as * keyframes (this may not be supported by all demuxers). * If flags contain AVSEEK_FLAG_BACKWARD, it is ignored. * * @param s media file handle * @param stream_index index of the stream which is used as time base reference * @param min_ts smallest acceptable timestamp * @param ts target timestamp * @param max_ts largest acceptable timestamp * @param flags flags * @return >=0 on success, error code otherwise * * @note This is part of the new seek API which is still under construction.
func AvformatTransferInternalStreamTimingInfo ¶ added in v0.0.5
func AvformatTransferInternalStreamTimingInfo(ofmt *CAVOutputFormat, ost *CAVStream, ist *CAVStream, copyTb CAVTimebaseSource) int
*
- Transfer internal timing information from one stream to another. *
- This function is useful when doing stream copy. *
- @param ofmt target output format for ost
- @param ost output stream which needs timings copy and adjustments
- @param ist reference input stream to copy timings from
- @param copy_tb define from where the stream codec timebase needs to be imported
func AvformatWriteHeader ¶
func AvformatWriteHeader(s *CAVFormatContext, options **avutil.CAVDictionary) int
*
- Allocate the stream private data and write the stream header to
- an output media file. *
- @param s Media file handle, must be allocated with
- avformat_alloc_context().
- Its \ref AVFormatContext.oformat "oformat" field must be set
- to the desired output format;
- Its \ref AVFormatContext.pb "pb" field must be set to an
- already opened ::AVIOContext.
- @param options An ::AVDictionary filled with AVFormatContext and
- muxer-private options.
- On return this parameter will be destroyed and replaced with
- a dict containing options that were not found. May be NULL. *
- @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec had not already been
- fully initialized in avformat_init_output().
- @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec had already been fully
- initialized in avformat_init_output().
- @retval AVERROR A negative AVERROR on failure. *
- @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_init_output.
func AvioAccept ¶
func AvioAccept(s *CAVIOContext, c **CAVIOContext) int
*
- Accept and allocate a client context on a server context.
- @param s the server context
- @param c the client context, must be unallocated
- @return >= 0 on success or a negative value corresponding
- to an AVERROR on failure
func AvioCheck ¶
*
- Return AVIO_FLAG_* access flags corresponding to the access permissions
- of the resource in url, or a negative value corresponding to an
- AVERROR code in case of failure. The returned access flags are
- masked by the value in flags. *
- @note This function is intrinsically unsafe, in the sense that the
- checked resource may change its existence or permission status from
- one call to another. Thus you should not trust the returned value,
- unless you are sure that no other processes are accessing the
- checked resource.
func AvioClose ¶
func AvioClose(s *CAVIOContext) int
*
- Close the resource accessed by the AVIOContext s and free it.
- This function can only be used if s was opened by avio_open(). *
- The internal buffer is automatically flushed before closing the
- resource. *
- @return 0 on success, an AVERROR < 0 on error.
- @see avio_closep
func AvioCloseDir ¶
func AvioCloseDir(s **CAVIODirContext) int
*
- Close directory. *
- @note Entries created using avio_read_dir() are not deleted and must be
- freeded with avio_free_directory_entry(). *
- @param s directory read context.
- @return >=0 on success or negative on error.
func AvioCloseDynBuf ¶
func AvioCloseDynBuf(s *CAVIOContext, pbuffer unsafe.Pointer) int
*
- Return the written size and a pointer to the buffer. The buffer
- must be freed with av_free().
- Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer. *
- @param s IO context
- @param pbuffer pointer to a byte buffer
- @return the length of the byte buffer
func AvioClosep ¶
func AvioClosep(s **CAVIOContext) int
*
- Close the resource accessed by the AVIOContext *s, free it
- and set the pointer pointing to it to NULL.
- This function can only be used if s was opened by avio_open(). *
- The internal buffer is automatically flushed before closing the
- resource. *
- @return 0 on success, an AVERROR < 0 on error.
- @see avio_close
func AvioContextFree ¶
func AvioContextFree(s **CAVIOContext)
*
- Free the supplied IO context and everything associated with it. *
- @param s Double pointer to the IO context. This function will write NULL
- into s.
func AvioEnumProtocols ¶
*
- Iterate through names of available protocols. *
- @param opaque A private pointer representing current protocol.
- It must be a pointer to NULL on first iteration and will
- be updated by successive calls to avio_enum_protocols.
- @param output If set to 1, iterate over output protocols,
- otherwise over input protocols. *
- @return A static string containing the name of current protocol or NULL
func AvioFeof ¶
func AvioFeof(s *CAVIOContext) int
*
- Similar to feof() but also returns nonzero on read errors.
- @return non zero if and only if at end of file or a read error happened when reading.
func AvioFindProtocolName ¶
*
- Return the name of the protocol that will handle the passed URL. *
- NULL is returned if no protocol could be found for the given URL. *
- @return Name of the protocol or NULL.
func AvioFlush ¶
func AvioFlush(s *CAVIOContext)
*
- Force flushing of buffered data. *
- For write streams, force the buffered data to be immediately written to the output,
- without to wait to fill the internal buffer. *
- For read streams, discard all currently buffered data, and advance the
- reported file position to that of the underlying stream. This does not
- read new data, and does not perform any seeks.
func AvioFreeDirectoryEntry ¶
func AvioFreeDirectoryEntry(s **CAVIODirEntry)
*
- Free entry allocated by avio_read_dir(). *
- @param entry entry to be freed.
func AvioGetDynBuf ¶
func AvioGetDynBuf(s *CAVIOContext, pbuffer unsafe.Pointer) int
*
- Return the written size and a pointer to the buffer.
- The AVIOContext stream is left intact.
- The buffer must NOT be freed.
- No padding is added to the buffer. *
- @param s IO context
- @param pbuffer pointer to a byte buffer
- @return the length of the byte buffer
func AvioGetStr ¶
*
- Read a string from pb into buf. The reading will terminate when either
- a NULL character was encountered, maxlen bytes have been read, or nothing
- more can be read from pb. The result is guaranteed to be NULL-terminated, it
- will be truncated if buf is too small.
- Note that the string is not interpreted or validated in any way, it
- might get truncated in the middle of a sequence for multi-byte encodings. *
- @return number of bytes read (is always <= maxlen).
- If reading ends on EOF or error, the return value will be one more than
- bytes actually read.
func AvioGetStr16be ¶
func AvioGetStr16le ¶
*
- Read a UTF-16 string from pb and convert it to UTF-8.
- The reading will terminate when either a null or invalid character was
- encountered or maxlen bytes have been read.
- @return number of bytes read (is always <= maxlen)
func AvioHandshake ¶
func AvioHandshake(c *CAVIOContext) int
*
- Perform one step of the protocol handshake to accept a new client.
- This function must be called on a client returned by avio_accept() before
- using it as a read/write context.
- It is separate from avio_accept() because it may block.
- A step of the handshake is defined by places where the application may
- decide to change the proceedings.
- For example, on a protocol with a request header and a reply header, each
- one can constitute a step because the application may use the parameters
- from the request to change parameters in the reply; or each individual
- chunk of the request can constitute a step.
- If the handshake is already finished, avio_handshake() does nothing and
- returns 0 immediately. *
- @param c the client context to perform the handshake on
- @return 0 on a complete and successful handshake
- > 0 if the handshake progressed, but is not complete
- < 0 for an AVERROR code
func AvioOpen ¶
func AvioOpen(s **CAVIOContext, url string, flags int) int
*
- Create and initialize a AVIOContext for accessing the
- resource indicated by url.
- @note When the resource indicated by url has been opened in
- read+write mode, the AVIOContext can be used only for writing. *
- @param s Used to return the pointer to the created AVIOContext.
- In case of failure the pointed to value is set to NULL.
- @param url resource to access
- @param flags flags which control how the resource indicated by url
- is to be opened
- @return >= 0 in case of success, a negative value corresponding to an
- AVERROR code in case of failure
func AvioOpen2 ¶
func AvioOpen2(s **CAVIOContext, url string, flags int, intCb *CAVIOInterruptCB, options **avutil.CAVDictionary) int
*
- Create and initialize a AVIOContext for accessing the
- resource indicated by url.
- @note When the resource indicated by url has been opened in
- read+write mode, the AVIOContext can be used only for writing. *
- @param s Used to return the pointer to the created AVIOContext.
- In case of failure the pointed to value is set to NULL.
- @param url resource to access
- @param flags flags which control how the resource indicated by url
- is to be opened
- @param int_cb an interrupt callback to be used at the protocols level
- @param options A dictionary filled with protocol-private options. On return
- this parameter will be destroyed and replaced with a dict containing options
- that were not found. May be NULL.
- @return >= 0 in case of success, a negative value corresponding to an
- AVERROR code in case of failure
func AvioOpenDir ¶
func AvioOpenDir(s **CAVIODirContext, url string, options **avutil.CAVDictionary) int
*
- Open directory for reading. *
- @param s directory read context. Pointer to a NULL pointer must be passed.
- @param url directory to be listed.
- @param options A dictionary filled with protocol-private options. On return
- this parameter will be destroyed and replaced with a dictionary
- containing options that were not found. May be NULL.
- @return >=0 on success or negative on error.
func AvioOpenDynBuf ¶
func AvioOpenDynBuf(s **CAVIOContext) int
*
- Open a write only memory stream. *
- @param s new IO context
- @return zero if no error.
func AvioPause ¶
func AvioPause(h *CAVIOContext, pause int) int
*
- Pause and resume playing - only meaningful if using a network streaming
- protocol (e.g. MMS). *
- @param h IO context from which to call the read_pause function pointer
- @param pause 1 for pause, 0 for resume
func AvioPrintStringArray ¶ added in v0.0.5
func AvioPrintStringArray(s *CAVIOContext, strings []*C.char)
*
- Write a NULL terminated array of strings to the context.
- Usually you don't need to use this function directly but its macro wrapper,
- avio_print.
func AvioProtocolGetClass ¶
*
- Get AVClass by names of available protocols. *
- @return A AVClass of input protocol name or NULL
func AvioPutStr ¶
func AvioPutStr(s *CAVIOContext, str string) int
*
- Write a NULL-terminated string.
- @return number of bytes written.
func AvioPutStr16be ¶
func AvioPutStr16be(s *CAVIOContext, str string) int
*
- Convert an UTF-8 string to UTF-16BE and write it.
- @param s the AVIOContext
- @param str NULL-terminated UTF-8 string *
- @return number of bytes written.
func AvioPutStr16le ¶
func AvioPutStr16le(s *CAVIOContext, str string) int
*
- Convert an UTF-8 string to UTF-16LE and write it.
- @param s the AVIOContext
- @param str NULL-terminated UTF-8 string *
- @return number of bytes written.
func AvioR8 ¶
func AvioR8(s *CAVIOContext) int
func AvioRb16 ¶
func AvioRb16(s *CAVIOContext) uint
func AvioRb24 ¶
func AvioRb24(s *CAVIOContext) uint
func AvioRb32 ¶
func AvioRb32(s *CAVIOContext) uint
func AvioRb64 ¶
func AvioRb64(s *CAVIOContext) uint64
func AvioRead ¶
func AvioRead(s *CAVIOContext, buf unsafe.Pointer, size int) int
*
- Read size bytes from AVIOContext into buf.
- @return number of bytes read or AVERROR
func AvioReadDir ¶
func AvioReadDir(s *CAVIODirContext, next **CAVIODirEntry) int
*
- Get next directory entry. *
- Returned entry must be freed with avio_free_directory_entry(). In particular
- it may outlive AVIODirContext. *
- @param s directory read context.
- @param[out] next next entry or NULL when no more entries.
- @return >=0 on success or negative on error. End of list is not considered an
- error.
func AvioReadPartial ¶
func AvioReadPartial(s *CAVIOContext, buf unsafe.Pointer, size int) int
*
- Read size bytes from AVIOContext into buf. Unlike avio_read(), this is allowed
- to read fewer bytes than requested. The missing bytes can be read in the next
- call. This always tries to read at least 1 byte.
- Useful to reduce latency in certain cases.
- @return number of bytes read or AVERROR
func AvioReadToBprint ¶
func AvioReadToBprint(h *CAVIOContext, pb *CAVBPrint, maxSize ctypes.SizeT) int
*
- Read contents of h into print buffer, up to max_size bytes, or up to EOF. *
- @return 0 for success (max_size bytes read or EOF reached), negative error
- code otherwise
func AvioRl16 ¶
func AvioRl16(s *CAVIOContext) uint
func AvioRl24 ¶
func AvioRl24(s *CAVIOContext) uint
func AvioRl32 ¶
func AvioRl32(s *CAVIOContext) uint
func AvioRl64 ¶
func AvioRl64(s *CAVIOContext) uint64
func AvioSeek ¶
func AvioSeek(s *CAVIOContext, offset int64, whence int) int64
*
- fseek() equivalent for AVIOContext.
- @return new position or AVERROR.
func AvioSeekTime ¶
func AvioSeekTime(h *CAVIOContext, streamIndex int, timestamp int64, flags int) int64
*
- Seek to a given timestamp relative to some component stream.
- Only meaningful if using a network streaming protocol (e.g. MMS.). *
- @param h IO context from which to call the seek function pointers
- @param stream_index The stream index that the timestamp is relative to.
- If stream_index is (-1) the timestamp should be in AV_TIME_BASE
- units from the beginning of the presentation.
- If a stream_index >= 0 is used and the protocol does not support
- seeking based on component streams, the call will fail.
- @param timestamp timestamp in AVStream.time_base units
- or if there is no stream specified then in AV_TIME_BASE units.
- @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE
- and AVSEEK_FLAG_ANY. The protocol may silently ignore
- AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will
- fail if used and not supported.
- @return >= 0 on success
- @see AVInputFormat::read_seek
func AvioSize ¶
func AvioSize(s *CAVIOContext) int64
*
- Get the filesize.
- @return filesize or AVERROR
func AvioSkip ¶
func AvioSkip(s *CAVIOContext, offset int64) int64
*
- Skip given number of bytes forward
- @return new position or AVERROR.
func AvioTell ¶
func AvioTell(s *CAVIOContext) int64
*
- ftell() equivalent for AVIOContext.
- @return position or AVERROR.
func AvioVprintf ¶
func AvioVprintf(s *CAVIOContext, fmt string, ap *C.struct___va_list_tag) int
*
- Writes a formatted string to the context taking a va_list.
- @return number of bytes written, < 0 on error.
func AvioW8 ¶
func AvioW8(s *CAVIOContext, b int)
func AvioWb16 ¶
func AvioWb16(s *CAVIOContext, val uint)
func AvioWb24 ¶
func AvioWb24(s *CAVIOContext, val uint)
func AvioWb32 ¶
func AvioWb32(s *CAVIOContext, val uint)
func AvioWb64 ¶
func AvioWb64(s *CAVIOContext, val uint64)
func AvioWl16 ¶
func AvioWl16(s *CAVIOContext, val uint)
func AvioWl24 ¶
func AvioWl24(s *CAVIOContext, val uint)
func AvioWl32 ¶
func AvioWl32(s *CAVIOContext, val uint)
func AvioWl64 ¶
func AvioWl64(s *CAVIOContext, val uint64)
func AvioWriteMarker ¶
func AvioWriteMarker(s *CAVIOContext, time int64, _type CAVIODataMarkerType)
*
- Mark the written bytestream as a specific type. *
- Zero-length ranges are omitted from the output. *
- @param s the AVIOContext
- @param time the stream time the current bytestream pos corresponds to
- (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not
- applicable
- @param type the kind of data written starting at the current pos
Types ¶
type CAVBPrint ¶
type CAVBPrint C.struct_AVBPrint
Avoid a warning. The header can not be included because it breaks c++.
type CAVChapter ¶
func (*CAVChapter) GetEnd ¶
func (c *CAVChapter) GetEnd() int64
/< chapter start/end time in time_base units
func (*CAVChapter) GetMetadata ¶
func (c *CAVChapter) GetMetadata() *avutil.CAVDictionary
func (*CAVChapter) GetStart ¶
func (c *CAVChapter) GetStart() int64
/< chapter start/end time in time_base units
func (*CAVChapter) GetTimeBase ¶
func (c *CAVChapter) GetTimeBase() avutil.CAVRational
/< time base in which the start/end timestamps are specified
func (*CAVChapter) SetEnd ¶ added in v0.0.5
func (c *CAVChapter) SetEnd(end int64)
/< chapter start/end time in time_base units
func (*CAVChapter) SetId ¶ added in v0.0.5
func (c *CAVChapter) SetId(id int64)
/< unique ID to identify the chapter
func (*CAVChapter) SetMetadata ¶ added in v0.0.5
func (c *CAVChapter) SetMetadata(metadata *avutil.CAVDictionary)
func (*CAVChapter) SetStart ¶ added in v0.0.5
func (c *CAVChapter) SetStart(start int64)
/< chapter start/end time in time_base units
func (*CAVChapter) SetTimeBase ¶ added in v0.0.5
func (c *CAVChapter) SetTimeBase(timeBase avutil.CAVRational)
/< time base in which the start/end timestamps are specified
type CAVCodecTag ¶
type CAVCodecTag C.struct_AVCodecTag
func AvformatGetMovAudioTags ¶
func AvformatGetMovAudioTags() *CAVCodecTag
*
- @return the table mapping MOV FourCCs for audio to AVCodecID.
func AvformatGetMovVideoTags ¶
func AvformatGetMovVideoTags() *CAVCodecTag
*
- @return the table mapping MOV FourCCs for video to libavcodec AVCodecID.
func AvformatGetRiffAudioTags ¶
func AvformatGetRiffAudioTags() *CAVCodecTag
*
- @return the table mapping RIFF FourCCs for audio to AVCodecID.
func AvformatGetRiffVideoTags ¶
func AvformatGetRiffVideoTags() *CAVCodecTag
*
- @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID.
type CAVDurationEstimationMethod ¶
type CAVDurationEstimationMethod C.enum_AVDurationEstimationMethod
* * The duration of a video can be estimated through various ways, and this enum can be used * to know how the duration was estimated.
const ( AVFMT_DURATION_FROM_PTS CAVDurationEstimationMethod = C.AVFMT_DURATION_FROM_PTS ///< Duration accurately estimated from PTSes AVFMT_DURATION_FROM_STREAM CAVDurationEstimationMethod = C.AVFMT_DURATION_FROM_STREAM ///< Duration estimated from a stream with a known duration AVFMT_DURATION_FROM_BITRATE CAVDurationEstimationMethod = C.AVFMT_DURATION_FROM_BITRATE ///< Duration estimated from bitrate (less accurate) )
func AvFmtCtxGetDurationEstimationMethod ¶
func AvFmtCtxGetDurationEstimationMethod(ctx *CAVFormatContext) CAVDurationEstimationMethod
*
- Returns the method used to set ctx->duration. *
- @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
type CAVFormatContext ¶
type CAVFormatContext C.AVFormatContext
*
- Format I/O context.
- New fields can be added to the end with minor version bumps.
- Removal, reordering and changes to existing fields require a major
- version bump.
- sizeof(AVFormatContext) must not be used outside libav*, use
- avformat_alloc_context() to create an AVFormatContext. *
- Fields can be accessed through AVOptions (av_opt*),
- the name string used matches the associated command line parameter name and
- can be found in libavformat/options_table.h.
- The AVOption/command line parameter names differ in some cases from the C
- structure field names for historic reasons or brevity.
func AvformatAllocContext ¶
func AvformatAllocContext() *CAVFormatContext
*
- Allocate an AVFormatContext.
- avformat_free_context() can be used to free the context and everything
- allocated by the framework within it.
func (*CAVFormatContext) GetAudioCodec ¶
func (fmtCtx *CAVFormatContext) GetAudioCodec() *avcodec.CAVCodec
*
- Forced audio codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) GetAudioCodecId ¶
func (fmtCtx *CAVFormatContext) GetAudioCodecId() avcodec.CAVCodecID
*
- Forced audio codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) GetAudioPreload ¶
func (fmtCtx *CAVFormatContext) GetAudioPreload() int
*
- Audio preload in microseconds.
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) GetAvClass ¶
func (fmtCtx *CAVFormatContext) GetAvClass() *avutil.CAVClass
* * A class for logging and @ref avoptions. Set by avformat_alloc_context(). * Exports (de)muxer private options if they exist.
func (*CAVFormatContext) GetAvioFlags ¶
func (fmtCtx *CAVFormatContext) GetAvioFlags() int
*
- avio flags, used to force AVIO_FLAG_DIRECT.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) GetAvoidNegativeTs ¶
func (fmtCtx *CAVFormatContext) GetAvoidNegativeTs() int
*
- Avoid negative timestamps during muxing.
- Any value of the AVFMT_AVOID_NEG_TS_* constants.
- Note, this works better when using av_interleaved_write_frame().
- - muxing: Set by user
- - demuxing: unused
func (*CAVFormatContext) GetBitRate ¶
func (fmtCtx *CAVFormatContext) GetBitRate() int64
*
- Total stream bitrate in bit/s, 0 if not
- available. Never set it directly if the file_size and the
- duration are known as FFmpeg can compute it automatically.
func (*CAVFormatContext) GetChapters ¶
func (fmtCtx *CAVFormatContext) GetChapters() **CAVChapter
func (*CAVFormatContext) GetCodecWhitelist ¶
func (fmtCtx *CAVFormatContext) GetCodecWhitelist() string
*
- ',' separated list of allowed decoders.
- If NULL then all are allowed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetControlMessageCb ¶
func (fmtCtx *CAVFormatContext) GetControlMessageCb() CAvFormatControlMessage
*
- Callback used by devices to communicate with application.
func (*CAVFormatContext) GetCorrectTsOverflow ¶
func (fmtCtx *CAVFormatContext) GetCorrectTsOverflow() uint
*
- Correct single timestamp overflows
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) GetCtxFlags ¶
func (fmtCtx *CAVFormatContext) GetCtxFlags() int
*
- Flags signalling stream properties. A combination of AVFMTCTX_*.
- Set by libavformat.
func (*CAVFormatContext) GetDataCodec ¶
func (fmtCtx *CAVFormatContext) GetDataCodec() *avcodec.CAVCodec
*
- Forced data codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) GetDataCodecId ¶
func (fmtCtx *CAVFormatContext) GetDataCodecId() avcodec.CAVCodecID
*
- Forced Data codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) GetDebug ¶
func (fmtCtx *CAVFormatContext) GetDebug() int
*
- Flags to enable debugging.
func (*CAVFormatContext) GetDumpSeparator ¶
func (fmtCtx *CAVFormatContext) GetDumpSeparator() string
*
- dump format separator.
- can be ", " or "\n " or anything else
- - muxing: Set by user.
- - demuxing: Set by user.
func (*CAVFormatContext) GetDuration ¶
func (fmtCtx *CAVFormatContext) GetDuration() int64
*
- Duration of the stream, in AV_TIME_BASE fractional
- seconds. Only set this value if you know none of the individual stream
- durations and also do not set any of them. This is deduced from the
- AVStream values if not set. *
- Demuxing only, set by libavformat.
func (*CAVFormatContext) GetDurationEstimationMethod ¶
func (fmtCtx *CAVFormatContext) GetDurationEstimationMethod() CAVDurationEstimationMethod
*
- The duration field can be estimated through various ways, and this field can be used
- to know how the duration was estimated.
- - encoding: unused
- - decoding: Read by user
func (*CAVFormatContext) GetErrorRecognition ¶
func (fmtCtx *CAVFormatContext) GetErrorRecognition() int
*
- Error recognition; higher values will detect more errors but may
- misdetect some more or less valid parts as errors.
- Demuxing only, set by the caller before avformat_open_input().
func (*CAVFormatContext) GetEventFlags ¶
func (fmtCtx *CAVFormatContext) GetEventFlags() int
*
- Flags indicating events happening on the file, a combination of
- AVFMT_EVENT_FLAG_*. *
- - demuxing: may be set by the demuxer in avformat_open_input(),
- avformat_find_stream_info() and av_read_frame(). Flags must be cleared
- by the user once the event has been handled.
- - muxing: may be set by the user after avformat_write_header() to
- indicate a user-triggered event. The muxer will clear the flags for
- events it has handled in av_[interleaved]_write_frame().
func (*CAVFormatContext) GetFlags ¶
func (fmtCtx *CAVFormatContext) GetFlags() int
*
- Flags modifying the (de)muxer behaviour. A combination of AVFMT_FLAG_*.
- Set by the user before avformat_open_input() / avformat_write_header().
func (*CAVFormatContext) GetFlushPackets ¶
func (fmtCtx *CAVFormatContext) GetFlushPackets() int
*
- Flush the I/O context after each packet.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) GetFormatProbesize ¶
func (fmtCtx *CAVFormatContext) GetFormatProbesize() int
*
- Maximum number of bytes read from input in order to identify the
- \ref AVInputFormat "input format". Only used when the format is not set
- explicitly by the caller. *
- Demuxing only, set by the caller before avformat_open_input(). *
- @sa probesize
func (*CAVFormatContext) GetFormatWhitelist ¶
func (fmtCtx *CAVFormatContext) GetFormatWhitelist() string
*
- ',' separated list of allowed demuxers.
- If NULL then all are allowed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetFpsProbeSize ¶
func (fmtCtx *CAVFormatContext) GetFpsProbeSize() int
*
- The number of frames used for determining the framerate in
- avformat_find_stream_info().
- Demuxing only, set by the caller before avformat_find_stream_info().
func (*CAVFormatContext) GetIformat ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) GetIformat() *CAVInputFormat
*
- The input container format. *
- Demuxing only, set by avformat_open_input().
func (*CAVFormatContext) GetInterruptCallback ¶
func (fmtCtx *CAVFormatContext) GetInterruptCallback() CAVIOInterruptCB
*
- Custom interrupt callbacks for the I/O layer. *
- demuxing: set by the user before avformat_open_input().
- muxing: set by the user before avformat_write_header()
- (mainly useful for AVFMT_NOFILE formats). The callback
- should also be passed to avio_open2() if it's used to
- open the file.
func (*CAVFormatContext) GetIoClose2 ¶
func (fmtCtx *CAVFormatContext) GetIoClose2() ctypes.CFunc
*
A callback for closing the streams opened with AVFormatContext.io_open(). *
Using this is preferred over io_close, because this can return an error.
Therefore this callback is used instead of io_close by the generic
libavformat code if io_close is NULL or the default. *
@param s the format context
@param pb IO context to be closed and freed
@return 0 on success, a negative AVERROR code on failure
int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
func (*CAVFormatContext) GetIoOpen ¶
func (fmtCtx *CAVFormatContext) GetIoOpen() ctypes.CFunc
*
A callback for opening new IO streams. *
Whenever a muxer or a demuxer needs to open an IO stream (typically from
avformat_open_input() for demuxers, but for certain formats can happen at
other times as well), it will call this callback to obtain an IO context. *
@param s the format context
@param pb on success, the newly opened IO context should be returned here
@param url the url to open
@param flags a combination of AVIO_FLAG_*
@param options a dictionary of additional options, with the same
semantics as in avio_open2()
@return 0 on success, a negative AVERROR code on failure *
@note Certain muxers and demuxers do nesting, i.e. they open one or more
additional internal format contexts. Thus the AVFormatContext pointer
passed to this callback may be different from the one facing the caller.
It will, however, have the same 'opaque' field.
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options);
func (*CAVFormatContext) GetIoRespositioned ¶
func (fmtCtx *CAVFormatContext) GetIoRespositioned() int
*
- IO repositioned flag.
- This is set by avformat when the underlaying IO context read pointer
- is repositioned, for example when doing byte based seeking.
- Demuxers can use the flag to detect such changes.
func (*CAVFormatContext) GetKey ¶
func (fmtCtx *CAVFormatContext) GetKey() unsafe.Pointer
func (*CAVFormatContext) GetKeylen ¶
func (fmtCtx *CAVFormatContext) GetKeylen() int
func (*CAVFormatContext) GetMaxAnalyzeDuration ¶
func (fmtCtx *CAVFormatContext) GetMaxAnalyzeDuration() int64
*
- Maximum duration (in AV_TIME_BASE units) of the data read
- from input in avformat_find_stream_info().
- Demuxing only, set by the caller before avformat_find_stream_info().
- Can be set to 0 to let avformat choose using a heuristic.
func (*CAVFormatContext) GetMaxChunkDuration ¶
func (fmtCtx *CAVFormatContext) GetMaxChunkDuration() int
*
- Max chunk time in microseconds.
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) GetMaxChunkSize ¶
func (fmtCtx *CAVFormatContext) GetMaxChunkSize() int
*
- Max chunk size in bytes
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) GetMaxDelay ¶
func (fmtCtx *CAVFormatContext) GetMaxDelay() int
func (*CAVFormatContext) GetMaxIndexSize ¶
func (fmtCtx *CAVFormatContext) GetMaxIndexSize() uint
*
- Maximum amount of memory in bytes to use for the index of each stream.
- If the index exceeds this size, entries will be discarded as
- needed to maintain a smaller size. This can lead to slower or less
- accurate seeking (depends on demuxer).
- Demuxers for which a full in-memory index is mandatory will ignore
- this.
- - muxing: unused
- - demuxing: set by user
func (*CAVFormatContext) GetMaxInterleaveDelta ¶
func (fmtCtx *CAVFormatContext) GetMaxInterleaveDelta() int64
*
- Maximum buffering duration for interleaving. *
- To ensure all the streams are interleaved correctly,
- av_interleaved_write_frame() will wait until it has at least one packet
- for each stream before actually writing any packets to the output file.
- When some streams are "sparse" (i.e. there are large gaps between
- successive packets), this can result in excessive buffering. *
- This field specifies the maximum difference between the timestamps of the
- first and the last packet in the muxing queue, above which libavformat
- will output a packet regardless of whether it has queued a packet for all
- the streams. *
- Muxing only, set by the caller before avformat_write_header().
func (*CAVFormatContext) GetMaxPictureBuffer ¶
func (fmtCtx *CAVFormatContext) GetMaxPictureBuffer() uint
*
- Maximum amount of memory in bytes to use for buffering frames
- obtained from realtime capture devices.
func (*CAVFormatContext) GetMaxProbePackets ¶
func (fmtCtx *CAVFormatContext) GetMaxProbePackets() int
*
- Maximum number of packets that can be probed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetMaxStreams ¶
func (fmtCtx *CAVFormatContext) GetMaxStreams() int
*
- The maximum number of streams.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetMaxTsProbe ¶
func (fmtCtx *CAVFormatContext) GetMaxTsProbe() int
*
- Maximum number of packets to read while waiting for the first timestamp.
- Decoding only.
func (*CAVFormatContext) GetMetadata ¶
func (fmtCtx *CAVFormatContext) GetMetadata() *avutil.CAVDictionary
*
- Metadata that applies to the whole file. *
- - demuxing: set by libavformat in avformat_open_input()
- - muxing: may be set by the caller before avformat_write_header() *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) GetMetadataHeaderPadding ¶
func (fmtCtx *CAVFormatContext) GetMetadataHeaderPadding() int
*
- Number of bytes to be written as padding in a metadata header.
- Demuxing: Unused.
- Muxing: Set by user via av_format_set_metadata_header_padding.
func (*CAVFormatContext) GetNbChapters ¶
func (fmtCtx *CAVFormatContext) GetNbChapters() uint
*
- Number of chapters in AVChapter array.
- When muxing, chapters are normally written in the file header,
- so nb_chapters should normally be initialized before write_header
- is called. Some muxers (e.g. mov and mkv) can also write chapters
- in the trailer. To write chapters in the trailer, nb_chapters
- must be zero when write_header is called and non-zero when
- write_trailer is called.
- - muxing: set by user
- - demuxing: set by libavformat
func (*CAVFormatContext) GetNbPrograms ¶
func (fmtCtx *CAVFormatContext) GetNbPrograms() uint
func (*CAVFormatContext) GetNbStreams ¶
func (fmtCtx *CAVFormatContext) GetNbStreams() uint
*
- Number of elements in AVFormatContext.streams. *
- Set by avformat_new_stream(), must not be modified by any other code.
func (*CAVFormatContext) GetOformat ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) GetOformat() *CAVOutputFormat
*
- The output container format. *
- Muxing only, must be set by the caller before avformat_write_header().
func (*CAVFormatContext) GetOpaque ¶
func (fmtCtx *CAVFormatContext) GetOpaque() unsafe.Pointer
*
- User data.
- This is a place for some private data of the user.
func (*CAVFormatContext) GetOutputTsOffset ¶
func (fmtCtx *CAVFormatContext) GetOutputTsOffset() int64
*
- Output timestamp offset, in microseconds.
- Muxing: set by user
func (*CAVFormatContext) GetPacketSize ¶
func (fmtCtx *CAVFormatContext) GetPacketSize() uint
func (*CAVFormatContext) GetPb ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) GetPb() *CAVIOContext
*
- I/O context. *
- - demuxing: either set by the user before avformat_open_input() (then
- the user must close it manually) or set by avformat_open_input().
- - muxing: set by the user before avformat_write_header(). The caller must
- take care of closing / freeing the IO context. *
- Do NOT set this field if AVFMT_NOFILE flag is set in
- iformat/oformat.flags. In such a case, the (de)muxer will handle
- I/O in some other way and this field will be NULL.
func (*CAVFormatContext) GetPbPtr ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) GetPbPtr() **CAVIOContext
*
- I/O context. *
- - demuxing: either set by the user before avformat_open_input() (then
- the user must close it manually) or set by avformat_open_input().
- - muxing: set by the user before avformat_write_header(). The caller must
- take care of closing / freeing the IO context. *
- Do NOT set this field if AVFMT_NOFILE flag is set in
- iformat/oformat.flags. In such a case, the (de)muxer will handle
- I/O in some other way and this field will be NULL.
func (*CAVFormatContext) GetPrivData ¶
func (fmtCtx *CAVFormatContext) GetPrivData() unsafe.Pointer
*
- Format private data. This is an AVOptions-enabled struct
- if and only if iformat/oformat.priv_class is not NULL. *
- - muxing: set by avformat_write_header()
- - demuxing: set by avformat_open_input()
func (*CAVFormatContext) GetProbeScore ¶
func (fmtCtx *CAVFormatContext) GetProbeScore() int
*
- format probing score.
- The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes
- the format.
- - encoding: unused
- - decoding: set by avformat, read by user
func (*CAVFormatContext) GetProbesize ¶
func (fmtCtx *CAVFormatContext) GetProbesize() int64
*
- Maximum number of bytes read from input in order to determine stream
- properties. Used when reading the global header and in
- avformat_find_stream_info(). *
- Demuxing only, set by the caller before avformat_open_input(). *
- @note this is \e not used for determining the \ref AVInputFormat
- "input format"
- @sa format_probesize
func (*CAVFormatContext) GetPrograms ¶
func (fmtCtx *CAVFormatContext) GetPrograms() **CAVProgram
func (*CAVFormatContext) GetProtocolBlacklist ¶
func (fmtCtx *CAVFormatContext) GetProtocolBlacklist() string
*
- ',' separated list of disallowed protocols.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetProtocolWhitelist ¶
func (fmtCtx *CAVFormatContext) GetProtocolWhitelist() string
*
- ',' separated list of allowed protocols.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetSeek2Any ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) GetSeek2Any() int
*
- Force seeking to any (also non key) frames.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) GetSkipEstimateDurationFromPts ¶
func (fmtCtx *CAVFormatContext) GetSkipEstimateDurationFromPts() int
*
- Skip duration calcuation in estimate_timings_from_pts.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) GetSkipInitialBytes ¶
func (fmtCtx *CAVFormatContext) GetSkipInitialBytes() int64
*
- Skip initial bytes when opening stream
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) GetStartTime ¶
func (fmtCtx *CAVFormatContext) GetStartTime() int64
*
- Position of the first frame of the component, in
- AV_TIME_BASE fractional seconds. NEVER set this value directly:
- It is deduced from the AVStream values. *
- Demuxing only, set by libavformat.
func (*CAVFormatContext) GetStartTimeRealtime ¶
func (fmtCtx *CAVFormatContext) GetStartTimeRealtime() int64
*
- Start time of the stream in real world time, in microseconds
- since the Unix epoch (00:00 1st January 1970). That is, pts=0 in the
- stream was captured at this real world time.
- - muxing: Set by the caller before avformat_write_header(). If set to
- either 0 or AV_NOPTS_VALUE, then the current wall-time will
- be used.
- - demuxing: Set by libavformat. AV_NOPTS_VALUE if unknown. Note that
- the value may become known after some number of frames
- have been received.
func (*CAVFormatContext) GetStreams ¶
func (fmtCtx *CAVFormatContext) GetStreams() **CAVStream
*
- A list of all streams in the file. New streams are created with
- avformat_new_stream(). *
- - demuxing: streams are created by libavformat in avformat_open_input().
- If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also
- appear in av_read_frame().
- - muxing: streams are created by the user before avformat_write_header(). *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) GetStrictStdCompliance ¶
func (fmtCtx *CAVFormatContext) GetStrictStdCompliance() int
*
- Allow non-standard and experimental extension
- @see AVCodecContext.strict_std_compliance
func (*CAVFormatContext) GetSubtitleCodec ¶
func (fmtCtx *CAVFormatContext) GetSubtitleCodec() *avcodec.CAVCodec
*
- Forced subtitle codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) GetSubtitleCodecId ¶
func (fmtCtx *CAVFormatContext) GetSubtitleCodecId() avcodec.CAVCodecID
*
- Forced subtitle codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) GetTsId ¶
func (fmtCtx *CAVFormatContext) GetTsId() int
*
- Transport stream id.
- This will be moved into demuxer private options. Thus no API/ABI compatibility
func (*CAVFormatContext) GetUrl ¶
func (fmtCtx *CAVFormatContext) GetUrl() string
*
- input or output URL. Unlike the old filename field, this field has no
- length restriction. *
- - demuxing: set by avformat_open_input(), initialized to an empty
- string if url parameter was NULL in avformat_open_input().
- - muxing: may be set by the caller before calling avformat_write_header()
- (or avformat_init_output() if that is called first) to a string
- which is freeable by av_free(). Set to an empty string if it
- was NULL in avformat_init_output(). *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) GetUseWallclockAsTimestamps ¶
func (fmtCtx *CAVFormatContext) GetUseWallclockAsTimestamps() int
*
- forces the use of wallclock timestamps as pts/dts of packets
- This has undefined results in the presence of B frames.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) GetVideoCodec ¶
func (fmtCtx *CAVFormatContext) GetVideoCodec() *avcodec.CAVCodec
*
- Forced video codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) GetVideoCodecId ¶
func (fmtCtx *CAVFormatContext) GetVideoCodecId() avcodec.CAVCodecID
*
- Forced video codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) SetAudioCodec ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetAudioCodec(audioCodec *avcodec.CAVCodec)
*
- Forced audio codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) SetAudioCodecId ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetAudioCodecId(audioCodecId avcodec.CAVCodecID)
*
- Forced audio codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) SetAudioPreload ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetAudioPreload(audioPreload int)
*
- Audio preload in microseconds.
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) SetAvioFlags ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetAvioFlags(avioFlags int)
*
- avio flags, used to force AVIO_FLAG_DIRECT.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) SetAvoidNegativeTs ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetAvoidNegativeTs(avoidNegativeTs int)
*
- Avoid negative timestamps during muxing.
- Any value of the AVFMT_AVOID_NEG_TS_* constants.
- Note, this works better when using av_interleaved_write_frame().
- - muxing: Set by user
- - demuxing: unused
func (*CAVFormatContext) SetBitRate ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetBitRate(bitRate int64)
*
- Total stream bitrate in bit/s, 0 if not
- available. Never set it directly if the file_size and the
- duration are known as FFmpeg can compute it automatically.
func (*CAVFormatContext) SetChapters ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetChapters(chapters **CAVChapter)
func (*CAVFormatContext) SetCodecWhitelist ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetCodecWhitelist(codecWhitelist string)
*
- ',' separated list of allowed decoders.
- If NULL then all are allowed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetControlMessageCb ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetControlMessageCb(controlMessageCb CAvFormatControlMessage)
*
- Callback used by devices to communicate with application.
func (*CAVFormatContext) SetCorrectTsOverflow ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetCorrectTsOverflow(correctTsOverflow uint)
*
- Correct single timestamp overflows
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) SetCtxFlags ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetCtxFlags(ctxFlags int)
*
- Flags signalling stream properties. A combination of AVFMTCTX_*.
- Set by libavformat.
func (*CAVFormatContext) SetDataCodec ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDataCodec(dataCodec *avcodec.CAVCodec)
*
- Forced data codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) SetDataCodecId ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDataCodecId(dataCodecid avcodec.CAVCodecID)
*
- Forced Data codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) SetDebug ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDebug(debug int)
*
- Flags to enable debugging.
func (*CAVFormatContext) SetDumpSeparator ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDumpSeparator(dumpSeparator string)
*
- dump format separator.
- can be ", " or "\n " or anything else
- - muxing: Set by user.
- - demuxing: Set by user.
func (*CAVFormatContext) SetDuration ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDuration(duration int64)
*
- Duration of the stream, in AV_TIME_BASE fractional
- seconds. Only set this value if you know none of the individual stream
- durations and also do not set any of them. This is deduced from the
- AVStream values if not set. *
- Demuxing only, set by libavformat.
func (*CAVFormatContext) SetDurationEstimationMethod ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetDurationEstimationMethod(durationEstimationMethod CAVDurationEstimationMethod)
*
- The duration field can be estimated through various ways, and this field can be used
- to know how the duration was estimated.
- - encoding: unused
- - decoding: Read by user
func (*CAVFormatContext) SetErrorRecognition ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetErrorRecognition(errorRecognition int)
*
- Error recognition; higher values will detect more errors but may
- misdetect some more or less valid parts as errors.
- Demuxing only, set by the caller before avformat_open_input().
func (*CAVFormatContext) SetEventFlags ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetEventFlags(eventFlags int)
*
- Flags indicating events happening on the file, a combination of
- AVFMT_EVENT_FLAG_*. *
- - demuxing: may be set by the demuxer in avformat_open_input(),
- avformat_find_stream_info() and av_read_frame(). Flags must be cleared
- by the user once the event has been handled.
- - muxing: may be set by the user after avformat_write_header() to
- indicate a user-triggered event. The muxer will clear the flags for
- events it has handled in av_[interleaved]_write_frame().
func (*CAVFormatContext) SetFlags ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetFlags(flags int)
*
- Flags modifying the (de)muxer behaviour. A combination of AVFMT_FLAG_*.
- Set by the user before avformat_open_input() / avformat_write_header().
func (*CAVFormatContext) SetFlushPackets ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetFlushPackets(flushPackets int)
*
- Flush the I/O context after each packet.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) SetFormatProbesize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetFormatProbesize(formatProbeSize int)
*
- Maximum number of bytes read from input in order to identify the
- \ref AVInputFormat "input format". Only used when the format is not set
- explicitly by the caller. *
- Demuxing only, set by the caller before avformat_open_input(). *
- @sa probesize
func (*CAVFormatContext) SetFormatWhitelist ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetFormatWhitelist(formatWhitelist string)
*
- ',' separated list of allowed demuxers.
- If NULL then all are allowed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetFpsProbeSize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetFpsProbeSize(fpsProbeSize int)
*
- The number of frames used for determining the framerate in
- avformat_find_stream_info().
- Demuxing only, set by the caller before avformat_find_stream_info().
func (*CAVFormatContext) SetInterruptCallback ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetInterruptCallback(interruptCall CAVIOInterruptCB)
*
- Custom interrupt callbacks for the I/O layer. *
- demuxing: set by the user before avformat_open_input().
- muxing: set by the user before avformat_write_header()
- (mainly useful for AVFMT_NOFILE formats). The callback
- should also be passed to avio_open2() if it's used to
- open the file.
func (*CAVFormatContext) SetIoClose2 ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetIoClose2(ioClose2 ctypes.CFunc)
*
A callback for closing the streams opened with AVFormatContext.io_open(). *
Using this is preferred over io_close, because this can return an error.
Therefore this callback is used instead of io_close by the generic
libavformat code if io_close is NULL or the default. *
@param s the format context
@param pb IO context to be closed and freed
@return 0 on success, a negative AVERROR code on failure
int (*io_close2)(struct AVFormatContext *s, AVIOContext *pb);
func (*CAVFormatContext) SetIoOpen ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetIoOpen(ioOpen ctypes.CFunc)
*
A callback for opening new IO streams. *
Whenever a muxer or a demuxer needs to open an IO stream (typically from
avformat_open_input() for demuxers, but for certain formats can happen at
other times as well), it will call this callback to obtain an IO context. *
@param s the format context
@param pb on success, the newly opened IO context should be returned here
@param url the url to open
@param flags a combination of AVIO_FLAG_*
@param options a dictionary of additional options, with the same
semantics as in avio_open2()
@return 0 on success, a negative AVERROR code on failure *
@note Certain muxers and demuxers do nesting, i.e. they open one or more
additional internal format contexts. Thus the AVFormatContext pointer
passed to this callback may be different from the one facing the caller.
It will, however, have the same 'opaque' field.
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options);
func (*CAVFormatContext) SetIoRespositioned ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetIoRespositioned(ioRespositioned int)
*
- IO repositioned flag.
- This is set by avformat when the underlaying IO context read pointer
- is repositioned, for example when doing byte based seeking.
- Demuxers can use the flag to detect such changes.
func (*CAVFormatContext) SetKey ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetKey(key unsafe.Pointer)
func (*CAVFormatContext) SetKeylen ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetKeylen(keylen int)
func (*CAVFormatContext) SetMaxAnalyzeDuration ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxAnalyzeDuration(maxAnalyzeDuration int64)
*
- Maximum duration (in AV_TIME_BASE units) of the data read
- from input in avformat_find_stream_info().
- Demuxing only, set by the caller before avformat_find_stream_info().
- Can be set to 0 to let avformat choose using a heuristic.
func (*CAVFormatContext) SetMaxChunkDuration ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxChunkDuration(maxChunkDuration int)
*
- Max chunk time in microseconds.
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) SetMaxChunkSize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxChunkSize(maxChunkSize int)
*
- Max chunk size in bytes
- Note, not all formats support this and unpredictable things may happen if it is used when not supported.
- - encoding: Set by user
- - decoding: unused
func (*CAVFormatContext) SetMaxDelay ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxDelay(maxDelay int)
func (*CAVFormatContext) SetMaxIndexSize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxIndexSize(maxIndexSize uint)
*
- Maximum amount of memory in bytes to use for the index of each stream.
- If the index exceeds this size, entries will be discarded as
- needed to maintain a smaller size. This can lead to slower or less
- accurate seeking (depends on demuxer).
- Demuxers for which a full in-memory index is mandatory will ignore
- this.
- - muxing: unused
- - demuxing: set by user
func (*CAVFormatContext) SetMaxInterleaveDelta ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxInterleaveDelta(maxInterleaveDelta int64)
*
- Maximum buffering duration for interleaving. *
- To ensure all the streams are interleaved correctly,
- av_interleaved_write_frame() will wait until it has at least one packet
- for each stream before actually writing any packets to the output file.
- When some streams are "sparse" (i.e. there are large gaps between
- successive packets), this can result in excessive buffering. *
- This field specifies the maximum difference between the timestamps of the
- first and the last packet in the muxing queue, above which libavformat
- will output a packet regardless of whether it has queued a packet for all
- the streams. *
- Muxing only, set by the caller before avformat_write_header().
func (*CAVFormatContext) SetMaxPictureBuffer ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxPictureBuffer(maxPictureBuffer uint)
*
- Maximum amount of memory in bytes to use for buffering frames
- obtained from realtime capture devices.
func (*CAVFormatContext) SetMaxProbePackets ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxProbePackets(maxProbePackets int)
*
- Maximum number of packets that can be probed
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetMaxStreams ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxStreams(maxStreams int)
*
- The maximum number of streams.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetMaxTsProbe ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMaxTsProbe(maxTsProbe int)
*
- Maximum number of packets to read while waiting for the first timestamp.
- Decoding only.
func (*CAVFormatContext) SetMetadata ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMetadata(metadata *avutil.CAVDictionary)
*
- Metadata that applies to the whole file. *
- - demuxing: set by libavformat in avformat_open_input()
- - muxing: may be set by the caller before avformat_write_header() *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) SetMetadataHeaderPadding ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetMetadataHeaderPadding(metadataHeaderPadding int)
*
- Number of bytes to be written as padding in a metadata header.
- Demuxing: Unused.
- Muxing: Set by user via av_format_set_metadata_header_padding.
func (*CAVFormatContext) SetNbChapters ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetNbChapters(nbChapter uint)
*
- Number of chapters in AVChapter array.
- When muxing, chapters are normally written in the file header,
- so nb_chapters should normally be initialized before write_header
- is called. Some muxers (e.g. mov and mkv) can also write chapters
- in the trailer. To write chapters in the trailer, nb_chapters
- must be zero when write_header is called and non-zero when
- write_trailer is called.
- - muxing: set by user
- - demuxing: set by libavformat
func (*CAVFormatContext) SetNbPrograms ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetNbPrograms(nbPrograms uint)
func (*CAVFormatContext) SetNbStreams ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetNbStreams(nbStreams uint)
*
- Number of elements in AVFormatContext.streams. *
- Set by avformat_new_stream(), must not be modified by any other code.
func (*CAVFormatContext) SetOformat ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetOformat(oformat *CAVOutputFormat)
*
- The output container format. *
- Muxing only, must be set by the caller before avformat_write_header().
func (*CAVFormatContext) SetOpaque ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetOpaque(opaque unsafe.Pointer)
*
- User data.
- This is a place for some private data of the user.
func (*CAVFormatContext) SetOutputTsOffset ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetOutputTsOffset(outputTsOffset int64)
*
- Output timestamp offset, in microseconds.
- Muxing: set by user
func (*CAVFormatContext) SetPacketSize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetPacketSize(packetSize uint)
func (*CAVFormatContext) SetPb ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetPb(avioCtx *CAVIOContext)
*
- I/O context. *
- - demuxing: either set by the user before avformat_open_input() (then
- the user must close it manually) or set by avformat_open_input().
- - muxing: set by the user before avformat_write_header(). The caller must
- take care of closing / freeing the IO context. *
- Do NOT set this field if AVFMT_NOFILE flag is set in
- iformat/oformat.flags. In such a case, the (de)muxer will handle
- I/O in some other way and this field will be NULL.
func (*CAVFormatContext) SetPrivData ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetPrivData(privData unsafe.Pointer)
*
- Format private data. This is an AVOptions-enabled struct
- if and only if iformat/oformat.priv_class is not NULL. *
- - muxing: set by avformat_write_header()
- - demuxing: set by avformat_open_input()
func (*CAVFormatContext) SetProbeScore ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetProbeScore(probeScore int)
*
- format probing score.
- The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes
- the format.
- - encoding: unused
- - decoding: set by avformat, read by user
func (*CAVFormatContext) SetProbesize ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetProbesize(probesize int64)
*
- Maximum number of bytes read from input in order to determine stream
- properties. Used when reading the global header and in
- avformat_find_stream_info(). *
- Demuxing only, set by the caller before avformat_open_input(). *
- @note this is \e not used for determining the \ref AVInputFormat
- "input format"
- @sa format_probesize
func (*CAVFormatContext) SetPrograms ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetPrograms(programs **CAVProgram)
func (*CAVFormatContext) SetProtocolBlacklist ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetProtocolBlacklist(protocolBlackList string)
*
- ',' separated list of disallowed protocols.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetProtocolWhitelist ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetProtocolWhitelist(protocolWhitelist string)
*
- ',' separated list of allowed protocols.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetSeek2Any ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetSeek2Any(seek2Any int)
*
- Force seeking to any (also non key) frames.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) SetSkipEstimateDurationFromPts ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetSkipEstimateDurationFromPts(skipEstimateDurationFromPts int)
*
- Skip duration calcuation in estimate_timings_from_pts.
- - encoding: unused
- - decoding: set by user
func (*CAVFormatContext) SetSkipInitialBytes ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetSkipInitialBytes(skipInitialBytes int64)
*
- Skip initial bytes when opening stream
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) SetStartTime ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetStartTime(startTime int64)
*
- Position of the first frame of the component, in
- AV_TIME_BASE fractional seconds. NEVER set this value directly:
- It is deduced from the AVStream values. *
- Demuxing only, set by libavformat.
func (*CAVFormatContext) SetStartTimeRealtime ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetStartTimeRealtime(startTimeRealtime int64)
*
- Start time of the stream in real world time, in microseconds
- since the Unix epoch (00:00 1st January 1970). That is, pts=0 in the
- stream was captured at this real world time.
- - muxing: Set by the caller before avformat_write_header(). If set to
- either 0 or AV_NOPTS_VALUE, then the current wall-time will
- be used.
- - demuxing: Set by libavformat. AV_NOPTS_VALUE if unknown. Note that
- the value may become known after some number of frames
- have been received.
func (*CAVFormatContext) SetStreams ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetStreams(streams **CAVStream)
*
- A list of all streams in the file. New streams are created with
- avformat_new_stream(). *
- - demuxing: streams are created by libavformat in avformat_open_input().
- If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also
- appear in av_read_frame().
- - muxing: streams are created by the user before avformat_write_header(). *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) SetStrictStdCompliance ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetStrictStdCompliance(strictStdCompliance int)
*
- Allow non-standard and experimental extension
- @see AVCodecContext.strict_std_compliance
func (*CAVFormatContext) SetSubtitleCodec ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetSubtitleCodec(subtitleCodec *avcodec.CAVCodec)
*
- Forced subtitle codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) SetSubtitleCodecId ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetSubtitleCodecId(subtitleCodecId avcodec.CAVCodecID)
*
- Forced subtitle codec_id.
- Demuxing: Set by user.
func (*CAVFormatContext) SetTsId ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetTsId(tsId int)
*
- Transport stream id.
- This will be moved into demuxer private options. Thus no API/ABI compatibility
func (*CAVFormatContext) SetUrl ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetUrl(url string)
*
- input or output URL. Unlike the old filename field, this field has no
- length restriction. *
- - demuxing: set by avformat_open_input(), initialized to an empty
- string if url parameter was NULL in avformat_open_input().
- - muxing: may be set by the caller before calling avformat_write_header()
- (or avformat_init_output() if that is called first) to a string
- which is freeable by av_free(). Set to an empty string if it
- was NULL in avformat_init_output(). *
- Freed by libavformat in avformat_free_context().
func (*CAVFormatContext) SetUseWallclockAsTimestamps ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetUseWallclockAsTimestamps(useWallclockAsTimestamps int)
*
- forces the use of wallclock timestamps as pts/dts of packets
- This has undefined results in the presence of B frames.
- - encoding: unused
- - decoding: Set by user
func (*CAVFormatContext) SetVideoCodec ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetVideoCodec(videoCodec *avcodec.CAVCodec)
*
- Forced video codec.
- This allows forcing a specific decoder, even when there are multiple with
- the same codec_id.
- Demuxing: Set by user
func (*CAVFormatContext) SetVideoCodecId ¶ added in v0.0.5
func (fmtCtx *CAVFormatContext) SetVideoCodecId(videoCodecId avcodec.CAVCodecID)
*
- Forced video codec_id.
- Demuxing: Set by user.
type CAVIOContext ¶
type CAVIOContext C.AVIOContext
*
- Bytestream IO Context.
- New public fields can be added with minor version bumps.
- Removal, reordering and changes to existing public fields require
- a major version bump.
- sizeof(AVIOContext) must not be used outside libav*. *
- @note None of the function pointers in AVIOContext should be called
- directly, they should only be set by the client application
- when implementing custom I/O. Normally these are set to the
- function pointers specified in avio_alloc_context()
func AvioAllocContext ¶
func AvioAllocContext(buffer unsafe.Pointer, bufferSize int, writeFlag int, opaque unsafe.Pointer, readPacket ctypes.CFunc, writePacket ctypes.CFunc, seek ctypes.CFunc) *CAVIOContext
*
- Allocate and initialize an AVIOContext for buffered I/O. It must be later
- freed with avio_context_free(). *
- @param buffer Memory block for input/output operations via AVIOContext.
- The buffer must be allocated with av_malloc() and friends.
- It may be freed and replaced with a new buffer by libavformat.
- AVIOContext.buffer holds the buffer currently in use,
- which must be later freed with av_free().
- @param buffer_size The buffer size is very important for performance.
- For protocols with fixed blocksize it should be set to this blocksize.
- For others a typical size is a cache page, e.g. 4kb.
- @param write_flag Set to 1 if the buffer should be writable, 0 otherwise.
- @param opaque An opaque pointer to user-specific data.
- @param read_packet A function for refilling the buffer, may be NULL.
- For stream protocols, must never return 0 but rather
- a proper AVERROR code.
- @param write_packet A function for writing the buffer contents, may be NULL.
- The function may not change the input buffers content.
- @param seek A function for seeking to specified byte position, may be NULL. *
- @return Allocated AVIOContext or NULL on failure.
func (*CAVIOContext) GetAvClass ¶
func (avioCtx *CAVIOContext) GetAvClass() *avutil.CAVClass
*
- A class for private options. *
- If this AVIOContext is created by avio_open2(), av_class is set and
- passes the options down to protocols. *
- If this AVIOContext is manually allocated, then av_class may be set by
- the caller. *
- warning -- this field can be NULL, be sure to not pass this AVIOContext
- to any av_opt_* functions in that case.
func (*CAVIOContext) GetBufEnd ¶
func (avioCtx *CAVIOContext) GetBufEnd() unsafe.Pointer
*< End of the data, may be less than
buffer+buffer_size if the read function returned less data than requested, e.g. for streams where no more data has been received yet.
func (*CAVIOContext) GetBufPtr ¶
func (avioCtx *CAVIOContext) GetBufPtr() unsafe.Pointer
*< Current position in the buffer
func (*CAVIOContext) GetBufPtrMax ¶
func (avioCtx *CAVIOContext) GetBufPtrMax() unsafe.Pointer
*
- Maximum reached position before a backward seek in the write buffer,
- used keeping track of already written data for a later flush.
func (*CAVIOContext) GetBuffer ¶
func (avioCtx *CAVIOContext) GetBuffer() unsafe.Pointer
*< Start of the buffer.
func (*CAVIOContext) GetBufferSize ¶
func (avioCtx *CAVIOContext) GetBufferSize() int
*< Maximum buffer size
func (*CAVIOContext) GetBytesRead ¶
func (avioCtx *CAVIOContext) GetBytesRead() int64
*
- Read-only statistic of bytes read for this AVIOContext.
func (*CAVIOContext) GetBytesWritten ¶
func (avioCtx *CAVIOContext) GetBytesWritten() int64
*
- Read-only statistic of bytes written for this AVIOContext.
func (*CAVIOContext) GetCheckSum ¶
func (avioCtx *CAVIOContext) GetCheckSum() uint64
func (*CAVIOContext) GetCheckSumPtr ¶
func (avioCtx *CAVIOContext) GetCheckSumPtr() unsafe.Pointer
func (*CAVIOContext) GetDirect ¶
func (avioCtx *CAVIOContext) GetDirect() int
*
- avio_read and avio_write should if possible be satisfied directly
- instead of going through a buffer, and avio_seek will always
- call the underlying seek function directly.
func (*CAVIOContext) GetEofReached ¶
func (avioCtx *CAVIOContext) GetEofReached() int
*< true if was unable to read due to error or eof
func (*CAVIOContext) GetError ¶
func (avioCtx *CAVIOContext) GetError() int
*< contains the error code or 0 if no error happened
func (*CAVIOContext) GetIgnoreBoundaryPoint ¶
func (avioCtx *CAVIOContext) GetIgnoreBoundaryPoint() int
*
- If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,
- but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly
- small chunks of data returned from the callback).
func (*CAVIOContext) GetMaxPacketSize ¶
func (avioCtx *CAVIOContext) GetMaxPacketSize() int
func (*CAVIOContext) GetMinPacketSize ¶
func (avioCtx *CAVIOContext) GetMinPacketSize() int
*< Try to buffer at least this amount of data before flushing it.
func (*CAVIOContext) GetOpaque ¶
func (avioCtx *CAVIOContext) GetOpaque() unsafe.Pointer
*< A private pointer, passed to the read/write/seek/...
functions.
func (*CAVIOContext) GetPos ¶
func (avioCtx *CAVIOContext) GetPos() int64
*< position in the file of the current buffer
func (*CAVIOContext) GetProtocolBlacklist ¶
func (avioCtx *CAVIOContext) GetProtocolBlacklist() string
*
- ',' separated list of disallowed protocols.
func (*CAVIOContext) GetProtocolWhitelist ¶
func (avioCtx *CAVIOContext) GetProtocolWhitelist() string
*
- ',' separated list of allowed protocols.
func (*CAVIOContext) GetReadPacket ¶
func (avioCtx *CAVIOContext) GetReadPacket() ctypes.CFunc
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
func (*CAVIOContext) GetReadPause ¶
func (avioCtx *CAVIOContext) GetReadPause() ctypes.CFunc
*
- Pause or resume playback for network streaming protocols - e.g. MMS.
int (*read_pause)(void *opaque, int pause);
func (*CAVIOContext) GetReadSeek ¶
func (avioCtx *CAVIOContext) GetReadSeek() ctypes.CFunc
*
- Seek to a given timestamp in stream with the specified stream_index.
- Needed for some network streaming protocols which don't support seeking
- to byte position.
int64_t (*read_seek)(void *opaque, int stream_index, int64_t timestamp, int flags);
func (*CAVIOContext) GetSeek ¶
func (avioCtx *CAVIOContext) GetSeek() ctypes.CFunc
int64_t (*seek)(void *opaque, int64_t offset, int whence);
func (*CAVIOContext) GetSeekable ¶
func (avioCtx *CAVIOContext) GetSeekable() int
*
- A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
func (*CAVIOContext) GetUpdateCheckSum ¶
func (avioCtx *CAVIOContext) GetUpdateCheckSum() ctypes.CFunc
unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
func (*CAVIOContext) GetWriteDataType ¶
func (avioCtx *CAVIOContext) GetWriteDataType() ctypes.CFunc
int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time);
func (*CAVIOContext) GetWriteFlag ¶
func (avioCtx *CAVIOContext) GetWriteFlag() int
*< true if open for writing
func (*CAVIOContext) GetWritePacket ¶
func (avioCtx *CAVIOContext) GetWritePacket() ctypes.CFunc
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
func (*CAVIOContext) SetBufEnd ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetBufEnd(bufEnd unsafe.Pointer)
*< End of the data, may be less than
buffer+buffer_size if the read function returned less data than requested, e.g. for streams where no more data has been received yet.
func (*CAVIOContext) SetBufPtr ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetBufPtr(bufPtr unsafe.Pointer)
*< Current position in the buffer
func (*CAVIOContext) SetBufPtrMax ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetBufPtrMax(bufPtrMax unsafe.Pointer)
*
- Maximum reached position before a backward seek in the write buffer,
- used keeping track of already written data for a later flush.
func (*CAVIOContext) SetBuffer ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetBuffer(buffer unsafe.Pointer)
*< Start of the buffer.
func (*CAVIOContext) SetBufferSize ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetBufferSize(bufferSize int)
*< Maximum buffer size
func (*CAVIOContext) SetCheckSum ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetCheckSum(checkSum uint64)
func (*CAVIOContext) SetCheckSumPtr ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetCheckSumPtr(checkSumPtr unsafe.Pointer)
func (*CAVIOContext) SetDirect ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetDirect(direct int)
*
- avio_read and avio_write should if possible be satisfied directly
- instead of going through a buffer, and avio_seek will always
- call the underlying seek function directly.
func (*CAVIOContext) SetEofReached ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetEofReached(eofReached int)
*< true if was unable to read due to error or eof
func (*CAVIOContext) SetError ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetError(_error int)
*< contains the error code or 0 if no error happened
func (*CAVIOContext) SetIgnoreBoundaryPoint ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetIgnoreBoundaryPoint(ignoreBoundaryPoint int)
*
- If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,
- but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly
- small chunks of data returned from the callback).
func (*CAVIOContext) SetMaxPacketSize ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetMaxPacketSize(maxPacketSize int)
func (*CAVIOContext) SetMinPacketSize ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetMinPacketSize(minPacketSize int)
*< Try to buffer at least this amount of data before flushing it.
func (*CAVIOContext) SetOpaque ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetOpaque(opaque unsafe.Pointer)
*< A private pointer, passed to the read/write/seek/...
functions.
func (*CAVIOContext) SetPos ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetPos(pos int64)
*< position in the file of the current buffer
func (*CAVIOContext) SetProtocolBlacklist ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetProtocolBlacklist(protocolBlacklist string)
*
- ',' separated list of disallowed protocols.
func (*CAVIOContext) SetProtocolWhitelist ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetProtocolWhitelist(protocolWhitelist string)
*
- ',' separated list of allowed protocols.
func (*CAVIOContext) SetReadPacket ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetReadPacket(readPacket ctypes.CFunc)
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
func (*CAVIOContext) SetReadPause ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetReadPause(readPause ctypes.CFunc)
*
- Pause or resume playback for network streaming protocols - e.g. MMS.
int (*read_pause)(void *opaque, int pause);
func (*CAVIOContext) SetReadSeek ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetReadSeek(readSeek ctypes.CFunc)
*
- Seek to a given timestamp in stream with the specified stream_index.
- Needed for some network streaming protocols which don't support seeking
- to byte position.
int64_t (*read_seek)(void *opaque, int stream_index, int64_t timestamp, int flags);
func (*CAVIOContext) SetSeek ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetSeek(seek ctypes.CFunc)
int64_t (*seek)(void *opaque, int64_t offset, int whence);
func (*CAVIOContext) SetSeekable ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetSeekable(seekable int)
*
- A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
func (*CAVIOContext) SetUpdateCheckSum ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetUpdateCheckSum(updateCheckSum ctypes.CFunc)
unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
func (*CAVIOContext) SetWriteDataType ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetWriteDataType(writeDataType ctypes.CFunc)
int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size, enum AVIODataMarkerType type, int64_t time);
func (*CAVIOContext) SetWriteFlag ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetWriteFlag(writeFlag int)
*< true if open for writing
func (*CAVIOContext) SetWritePacket ¶ added in v0.0.5
func (avioCtx *CAVIOContext) SetWritePacket(writePacket ctypes.CFunc)
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
type CAVIODataMarkerType ¶
type CAVIODataMarkerType = C.enum_AVIODataMarkerType
*
- Different data types that can be returned via the AVIO
- write_data_type callback.
const ( /** * Header data; this needs to be present for the stream to be decodeable. */ AVIO_DATA_MARKER_HEADER CAVIODataMarkerType = C.AVIO_DATA_MARKER_HEADER /** * A point in the output bytestream where a decoder can start decoding * (i.e. a keyframe). A demuxer/decoder given the data flagged with * AVIO_DATA_MARKER_HEADER, followed by any AVIO_DATA_MARKER_SYNC_POINT, * should give decodeable results. */ AVIO_DATA_MARKER_SYNC_POINT CAVIODataMarkerType = C.AVIO_DATA_MARKER_SYNC_POINT /** * A point in the output bytestream where a demuxer can start parsing * (for non self synchronizing bytestream formats). That is, any * non-keyframe packet start point. */ AVIO_DATA_MARKER_BOUNDARY_POINT CAVIODataMarkerType = C.AVIO_DATA_MARKER_BOUNDARY_POINT /** * This is any, unlabelled data. It can either be a muxer not marking * any positions at all, it can be an actual boundary/sync point * that the muxer chooses not to mark, or a later part of a packet/fragment * that is cut into multiple write callbacks due to limited IO buffer size. */ AVIO_DATA_MARKER_UNKNOWN CAVIODataMarkerType = C.AVIO_DATA_MARKER_UNKNOWN /** * Trailer data, which doesn't contain actual content, but only for * finalizing the output file. */ AVIO_DATA_MARKER_TRAILER CAVIODataMarkerType = C.AVIO_DATA_MARKER_TRAILER /** * A point in the output bytestream where the underlying AVIOContext might * flush the buffer depending on latency or buffering requirements. Typically * means the end of a packet. */ AVIO_DATA_MARKER_FLUSH_POINT CAVIODataMarkerType = C.AVIO_DATA_MARKER_FLUSH_POINT )
type CAVIODirContext ¶
type CAVIODirContext C.AVIODirContext
#if FF_API_AVIODIRCONTEXT
func (*CAVIODirContext) GetUrlContext ¶
func (dc *CAVIODirContext) GetUrlContext() *C.struct_URLContext
type CAVIODirEntry ¶
type CAVIODirEntry C.AVIODirEntry
*
- Describes single entry of the directory. *
- Only name and type fields are guaranteed be set.
- Rest of fields are protocol or/and platform dependent and might be unknown.
func (*CAVIODirEntry) GetAccessTimestamp ¶
func (e *CAVIODirEntry) GetAccessTimestamp() int64
*< Time of last access in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) GetFilemode ¶
func (e *CAVIODirEntry) GetFilemode() int64
*< Unix file mode, -1 if unknown.
func (*CAVIODirEntry) GetGroupId ¶
func (e *CAVIODirEntry) GetGroupId() int64
*< Group ID of owner, -1 if unknown.
func (*CAVIODirEntry) GetModificationTimestamp ¶
func (e *CAVIODirEntry) GetModificationTimestamp() int64
*< Time of last modification in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) GetSize ¶
func (e *CAVIODirEntry) GetSize() int64
*< File size in bytes, -1 if unknown.
func (*CAVIODirEntry) GetStatusChangeTimestamp ¶
func (e *CAVIODirEntry) GetStatusChangeTimestamp() int64
*< Time of last status change in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) GetUserId ¶
func (e *CAVIODirEntry) GetUserId() int64
*< User ID of owner, -1 if unknown.
func (*CAVIODirEntry) GetUtf8 ¶
func (e *CAVIODirEntry) GetUtf8() int
*< Set to 1 when name is encoded with UTF-8, 0 otherwise. Name can be encoded with UTF-8 even though 0 is set.
func (*CAVIODirEntry) SetAccessTimestamp ¶ added in v0.0.5
func (e *CAVIODirEntry) SetAccessTimestamp(accessTimestamp int64)
*< Time of last access in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) SetFilemode ¶ added in v0.0.5
func (e *CAVIODirEntry) SetFilemode(filemode int64)
*< Unix file mode, -1 if unknown.
func (*CAVIODirEntry) SetGroupId ¶ added in v0.0.5
func (e *CAVIODirEntry) SetGroupId(groupId int64)
*< Group ID of owner, -1 if unknown.
func (*CAVIODirEntry) SetModificationTimestamp ¶ added in v0.0.5
func (e *CAVIODirEntry) SetModificationTimestamp(modificationTimestamp int64)
*< Time of last modification in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) SetName ¶ added in v0.0.5
func (e *CAVIODirEntry) SetName(name string)
*< Filename
func (*CAVIODirEntry) SetSize ¶ added in v0.0.5
func (e *CAVIODirEntry) SetSize(size int64)
*< File size in bytes, -1 if unknown.
func (*CAVIODirEntry) SetStatusChangeTimestamp ¶ added in v0.0.5
func (e *CAVIODirEntry) SetStatusChangeTimestamp(statusChangeTimestamp int64)
*< Time of last status change in microseconds since unix epoch, -1 if unknown.
func (*CAVIODirEntry) SetType ¶ added in v0.0.5
func (e *CAVIODirEntry) SetType(_type int)
*< Type of the entry
func (*CAVIODirEntry) SetUserId ¶ added in v0.0.5
func (e *CAVIODirEntry) SetUserId(userId int64)
*< User ID of owner, -1 if unknown.
func (*CAVIODirEntry) SetUtf8 ¶ added in v0.0.5
func (e *CAVIODirEntry) SetUtf8(utf8 int)
*< Set to 1 when name is encoded with UTF-8, 0 otherwise. Name can be encoded with UTF-8 even though 0 is set.
type CAVIODirEntryType ¶
type CAVIODirEntryType C.enum_AVIODirEntryType
*
- Directory entry types.
const ( AVIO_ENTRY_UNKNOWN CAVIODirEntryType = C.AVIO_ENTRY_UNKNOWN AVIO_ENTRY_BLOCK_DEVICE CAVIODirEntryType = C.AVIO_ENTRY_BLOCK_DEVICE AVIO_ENTRY_CHARACTER_DEVICE CAVIODirEntryType = C.AVIO_ENTRY_CHARACTER_DEVICE AVIO_ENTRY_DIRECTORY CAVIODirEntryType = C.AVIO_ENTRY_DIRECTORY AVIO_ENTRY_NAMED_PIPE CAVIODirEntryType = C.AVIO_ENTRY_NAMED_PIPE AVIO_ENTRY_SYMBOLIC_LINK CAVIODirEntryType = C.AVIO_ENTRY_SYMBOLIC_LINK AVIO_ENTRY_SOCKET CAVIODirEntryType = C.AVIO_ENTRY_SOCKET AVIO_ENTRY_FILE CAVIODirEntryType = C.AVIO_ENTRY_FILE AVIO_ENTRY_SERVER CAVIODirEntryType = C.AVIO_ENTRY_SERVER AVIO_ENTRY_SHARE CAVIODirEntryType = C.AVIO_ENTRY_SHARE AVIO_ENTRY_WORKGROUP CAVIODirEntryType = C.AVIO_ENTRY_WORKGROUP )
type CAVIOInterruptCB ¶
type CAVIOInterruptCB C.AVIOInterruptCB
*
- Callback for checking whether to abort blocking functions.
- AVERROR_EXIT is returned in this case by the interrupted
- function. During blocking operations, callback is called with
- opaque as parameter. If the callback returns 1, the
- blocking operation will be aborted. *
- No members can be added to this struct without a major bump, if
- new elements have been added after this struct in AVFormatContext
- or AVIOContext.
func (*CAVIOInterruptCB) GetCallback ¶
func (intCb *CAVIOInterruptCB) GetCallback() ctypes.CFunc
int (*callback)(void*)
func (*CAVIOInterruptCB) GetOpaque ¶
func (intCb *CAVIOInterruptCB) GetOpaque() unsafe.Pointer
func (*CAVIOInterruptCB) SetCallback ¶
func (intCb *CAVIOInterruptCB) SetCallback(callback ctypes.CFunc)
int (*callback)(void*)
func (*CAVIOInterruptCB) SetOpaque ¶
func (intCb *CAVIOInterruptCB) SetOpaque(opaque unsafe.Pointer)
type CAVIndexEntry ¶
type CAVIndexEntry C.AVIndexEntry
func AvformatIndexGetEntry ¶
func AvformatIndexGetEntry(st *CAVStream, idx int) *CAVIndexEntry
*
- Get the AVIndexEntry corresponding to the given index. *
- @param st Stream containing the requested AVIndexEntry.
- @param idx The desired index.
- @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise. *
- @note The pointer returned by this function is only guaranteed to be valid
- until any function that takes the stream or the parent AVFormatContext
- as input argument is called.
func AvformatIndexGetEntryFromTimestamp ¶
func AvformatIndexGetEntryFromTimestamp(st *CAVStream, wantedTimestamp int64, flags int) *CAVIndexEntry
*
- Get the AVIndexEntry corresponding to the given timestamp. *
- @param st Stream containing the requested AVIndexEntry.
- @param wanted_timestamp Timestamp to retrieve the index entry for.
- @param flags If AVSEEK_FLAG_BACKWARD then the returned entry will correspond
- to the timestamp which is <= the requested one, if backward
- is 0, then it will be >=
- if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise.
- @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise. *
- @note The pointer returned by this function is only guaranteed to be valid
- until any function that takes the stream or the parent AVFormatContext
- as input argument is called.
func (*CAVIndexEntry) GetMinDistance ¶
func (e *CAVIndexEntry) GetMinDistance() int
*< Minimum distance between this and the previous keyframe, used to avoid unneeded searching.
func (*CAVIndexEntry) GetPos ¶
func (e *CAVIndexEntry) GetPos() int64
func (*CAVIndexEntry) GetTimestamp ¶ added in v0.0.5
func (e *CAVIndexEntry) GetTimestamp() int64
*<
- Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are available
- when seeking to this entry. That means preferable PTS on keyframe based formats.
- But demuxers can choose to store a different timestamp, if it is more convenient for the implementation or nothing better
- is known
func (*CAVIndexEntry) SetMinDistance ¶ added in v0.0.5
func (e *CAVIndexEntry) SetMinDistance(minDistance int)
*< Minimum distance between this and the previous keyframe, used to avoid unneeded searching.
func (*CAVIndexEntry) SetPos ¶ added in v0.0.5
func (e *CAVIndexEntry) SetPos(pos int64)
func (*CAVIndexEntry) SetTimestamp ¶ added in v0.0.5
func (e *CAVIndexEntry) SetTimestamp(timestamp int64)
*<
- Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are available
- when seeking to this entry. That means preferable PTS on keyframe based formats.
- But demuxers can choose to store a different timestamp, if it is more convenient for the implementation or nothing better
- is known
type CAVInputFormat ¶
type CAVInputFormat C.AVInputFormat
*
- @addtogroup lavf_decoding
- @{
func AvDeuxerIterate ¶
func AvDeuxerIterate(opaque *unsafe.Pointer) *CAVInputFormat
*
- Iterate over all registered demuxers. *
- @param opaque a pointer where libavformat will store the iteration state.
- Must point to NULL to start the iteration. *
- @return the next registered demuxer or NULL when the iteration is
- finished
func AvFindInputFormat ¶
func AvFindInputFormat(shortName string) *CAVInputFormat
*
- Find AVInputFormat based on the short name of the input format.
func AvProbeInputFormat ¶
func AvProbeInputFormat(pd *CAVProbeData, isOpened int) *CAVInputFormat
*
- Guess the file format. *
- @param pd data to be probed
- @param is_opened Whether the file is already opened; determines whether
- demuxers with or without AVFMT_NOFILE are probed.
func AvProbeInputFormat2 ¶
func AvProbeInputFormat2(pd *CAVProbeData, isOpened int, scoreMax *ctypes.Int) *CAVInputFormat
*
- Guess the file format. *
- @param pd data to be probed
- @param is_opened Whether the file is already opened; determines whether
- demuxers with or without AVFMT_NOFILE are probed.
- @param score_max A probe score larger that this is required to accept a
- detection, the variable is set to the actual detection
- score afterwards.
- If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended
- to retry with a larger probe buffer.
func AvProbeInputFormat3 ¶ added in v0.0.5
func AvProbeInputFormat3(pd *CAVProbeData, isOpened int, scoreRet *ctypes.Int) *CAVInputFormat
*
- Guess the file format. *
- @param is_opened Whether the file is already opened; determines whether
- demuxers with or without AVFMT_NOFILE are probed.
- @param score_ret The score of the best detection.
func (*CAVInputFormat) GetCodecTag ¶
func (iFormat *CAVInputFormat) GetCodecTag() **CAVCodecTag
func (*CAVInputFormat) GetExtensions ¶
func (iFormat *CAVInputFormat) GetExtensions() string
*
- If extensions are defined, then no probe is done. You should
- usually not use extension format guessing because it is not
- reliable enough
func (*CAVInputFormat) GetFlags ¶
func (iFormat *CAVInputFormat) GetFlags() int
*
- Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS,
- AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,
- AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.
func (*CAVInputFormat) GetFlagsInternal ¶
func (iFormat *CAVInputFormat) GetFlagsInternal() int
*
- Internal flags. See FF_FMT_FLAG_* in internal.h.
func (*CAVInputFormat) GetGetDeviceList ¶ added in v0.0.5
func (iFormat *CAVInputFormat) GetGetDeviceList() ctypes.CFunc
*
- Returns device list with it properties.
- @see avdevice_list_devices() for more details.
int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
func (*CAVInputFormat) GetLongName ¶
func (iFormat *CAVInputFormat) GetLongName() string
*
- Descriptive name for the format, meant to be more human-readable
- than name. You should use the NULL_IF_CONFIG_SMALL() macro
- to define it.
func (*CAVInputFormat) GetMimeType ¶
func (iFormat *CAVInputFormat) GetMimeType() string
*
- Comma-separated list of mime types.
- It is used check for matching mime types while probing.
- @see av_probe_input_format2
func (*CAVInputFormat) GetName ¶
func (iFormat *CAVInputFormat) GetName() string
#region CAVInputFormat *
- A comma separated list of short names for the format. New names
- may be appended with a minor bump.
func (*CAVInputFormat) GetPrivClass ¶
func (iFormat *CAVInputFormat) GetPrivClass() *avutil.CAVClass
/< AVClass for the private context
func (*CAVInputFormat) GetPrivDataSize ¶
func (iFormat *CAVInputFormat) GetPrivDataSize() int
*
- Size of private data so that it can be allocated in the wrapper.
func (*CAVInputFormat) GetRawCodecId ¶
func (iFormat *CAVInputFormat) GetRawCodecId() int
*
- Raw demuxers store their codec ID here.
func (*CAVInputFormat) GetReadClose ¶
func (iFormat *CAVInputFormat) GetReadClose() ctypes.CFunc
*
- Close the stream. The AVFormatContext and AVStreams are not
- freed by this function
int (*read_close)(struct AVFormatContext *);
func (*CAVInputFormat) GetReadHeader ¶
func (iFormat *CAVInputFormat) GetReadHeader() ctypes.CFunc
*
- Read the format header and initialize the AVFormatContext
- structure. Return 0 if OK. 'avformat_new_stream' should be
- called to create new streams.
int (*read_header)(struct AVFormatContext *);
func (*CAVInputFormat) GetReadPacket ¶
func (iFormat *CAVInputFormat) GetReadPacket() ctypes.CFunc
*
- Read one packet and put it in 'pkt'. pts and flags are also
- set. 'avformat_new_stream' can be called only if the flag
- AVFMTCTX_NOHEADER is used and only in the calling thread (not in a
- background thread).
- @return 0 on success, < 0 on error.
- Upon returning an error, pkt must be unreferenced by the caller.
int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
func (*CAVInputFormat) GetReadPause ¶
func (iFormat *CAVInputFormat) GetReadPause() ctypes.CFunc
*
- Pause playing - only meaningful if using a network-based format
- (RTSP).
int (*read_pause)(struct AVFormatContext *);
func (*CAVInputFormat) GetReadPlay ¶
func (iFormat *CAVInputFormat) GetReadPlay() ctypes.CFunc
*
- Start/resume playing - only meaningful if using a network-based format
- (RTSP).
int (*read_play)(struct AVFormatContext *);
func (*CAVInputFormat) GetReadProbe ¶
func (iFormat *CAVInputFormat) GetReadProbe() ctypes.CFunc
*
- Tell if a given file has a chance of being parsed as this format.
- The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
- big so you do not have to check for that unless you need more.
int (*read_probe)(const AVProbeData *);
func (*CAVInputFormat) GetReadSeek ¶
func (iFormat *CAVInputFormat) GetReadSeek() ctypes.CFunc
*
- Seek to a given timestamp relative to the frames in
- stream component stream_index.
- @param stream_index Must not be -1.
- @param flags Selects which direction should be preferred if no exact
- match is available.
- @return >= 0 on success (but not necessarily the new offset)
int (*read_seek)(struct AVFormatContext *,
int stream_index, int64_t timestamp, int flags);
func (*CAVInputFormat) GetReadSeek2 ¶
func (iFormat *CAVInputFormat) GetReadSeek2() ctypes.CFunc
*
- Seek to timestamp ts.
- Seeking will be done so that the point from which all active streams
- can be presented successfully will be closest to ts and within min/max_ts.
- Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
func (*CAVInputFormat) GetReadTimestamp ¶
func (iFormat *CAVInputFormat) GetReadTimestamp() ctypes.CFunc
*
- Get the next timestamp in stream[stream_index].time_base units.
- @return the timestamp or AV_NOPTS_VALUE if an error occurred
int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
int64_t *pos, int64_t pos_limit);
func (*CAVInputFormat) SetFlags ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetFlags(flags int)
*
- Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS,
- AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH,
- AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS.
func (*CAVInputFormat) SetFlagsInternal ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetFlagsInternal(flagsInternal int)
*
- Internal flags. See FF_FMT_FLAG_* in internal.h.
func (*CAVInputFormat) SetGetDeviceList ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetGetDeviceList(getDeviceList ctypes.CFunc)
*
- Returns device list with it properties.
- @see avdevice_list_devices() for more details.
int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
func (*CAVInputFormat) SetPrivDataSize ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetPrivDataSize(privDataSize int)
*
- Size of private data so that it can be allocated in the wrapper.
func (*CAVInputFormat) SetRawCodecId ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetRawCodecId(rawCodecId int)
*
- Raw demuxers store their codec ID here.
func (*CAVInputFormat) SetReadClose ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadClose(readClose ctypes.CFunc)
*
- Close the stream. The AVFormatContext and AVStreams are not
- freed by this function
int (*read_close)(struct AVFormatContext *);
func (*CAVInputFormat) SetReadHeader ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadHeader(readHeader ctypes.CFunc)
*
- Read the format header and initialize the AVFormatContext
- structure. Return 0 if OK. 'avformat_new_stream' should be
- called to create new streams.
int (*read_header)(struct AVFormatContext *);
func (*CAVInputFormat) SetReadPacket ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadPacket(readPacket ctypes.CFunc)
*
- Read one packet and put it in 'pkt'. pts and flags are also
- set. 'avformat_new_stream' can be called only if the flag
- AVFMTCTX_NOHEADER is used and only in the calling thread (not in a
- background thread).
- @return 0 on success, < 0 on error.
- Upon returning an error, pkt must be unreferenced by the caller.
int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);
func (*CAVInputFormat) SetReadPause ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadPause(readPause ctypes.CFunc)
*
- Pause playing - only meaningful if using a network-based format
- (RTSP).
int (*read_pause)(struct AVFormatContext *);
func (*CAVInputFormat) SetReadPlay ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadPlay(readPlay ctypes.CFunc)
*
- Start/resume playing - only meaningful if using a network-based format
- (RTSP).
int (*read_play)(struct AVFormatContext *);
func (*CAVInputFormat) SetReadProbe ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadProbe(readProbe ctypes.CFunc)
*
- Tell if a given file has a chance of being parsed as this format.
- The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
- big so you do not have to check for that unless you need more.
int (*read_probe)(const AVProbeData *);
func (*CAVInputFormat) SetReadSeek ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadSeek(readSeek ctypes.CFunc)
*
- Seek to a given timestamp relative to the frames in
- stream component stream_index.
- @param stream_index Must not be -1.
- @param flags Selects which direction should be preferred if no exact
- match is available.
- @return >= 0 on success (but not necessarily the new offset)
int (*read_seek)(struct AVFormatContext *,
int stream_index, int64_t timestamp, int flags);
func (*CAVInputFormat) SetReadSeek2 ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadSeek2(readSeek2 ctypes.CFunc)
*
- Seek to timestamp ts.
- Seeking will be done so that the point from which all active streams
- can be presented successfully will be closest to ts and within min/max_ts.
- Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
func (*CAVInputFormat) SetReadTimestamp ¶ added in v0.0.5
func (iFormat *CAVInputFormat) SetReadTimestamp(readTimestamp ctypes.CFunc)
*
- Get the next timestamp in stream[stream_index].time_base units.
- @return the timestamp or AV_NOPTS_VALUE if an error occurred
int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,
int64_t *pos, int64_t pos_limit);
type CAVOpenCallback ¶
typedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options);
type CAVOutputFormat ¶
type CAVOutputFormat C.AVOutputFormat
*
- @addtogroup lavf_encoding
- @{
func AvGuessFormat ¶
func AvGuessFormat(shortName string, filename string, mimeType string) *CAVOutputFormat
*
- Return the output format in the list of registered output formats
- which best matches the provided parameters, or return NULL if
- there is no match. *
- @param short_name if non-NULL checks if short_name matches with the
- names of the registered formats
- @param filename if non-NULL checks if filename terminates with the
- extensions of the registered formats
- @param mime_type if non-NULL checks if mime_type matches with the
- MIME type of the registered formats
func AvMuxerIterate ¶
func AvMuxerIterate(opaque *unsafe.Pointer) *CAVOutputFormat
*
- Iterate over all registered muxers. *
- @param opaque a pointer where libavformat will store the iteration state. Must
- point to NULL to start the iteration. *
- @return the next registered muxer or NULL when the iteration is
- finished
func (*CAVOutputFormat) GetAudioCodec ¶
func (oFormat *CAVOutputFormat) GetAudioCodec() avcodec.CAVCodecID
*< default audio codec
func (*CAVOutputFormat) GetCodecTag ¶
func (oFormat *CAVOutputFormat) GetCodecTag() **CAVCodecTag
*
- List of supported codec_id-codec_tag pairs, ordered by "better
- choice first". The arrays are all terminated by AV_CODEC_ID_NONE.
func (*CAVOutputFormat) GetExtensions ¶
func (oFormat *CAVOutputFormat) GetExtensions() string
*< comma-separated filename extensions
func (*CAVOutputFormat) GetFlags ¶
func (oFormat *CAVOutputFormat) GetFlags() int
*
- can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER,
- AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
- AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS,
- AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE
func (*CAVOutputFormat) GetLongName ¶
func (oFormat *CAVOutputFormat) GetLongName() string
*
- Descriptive name for the format, meant to be more human-readable
- than name. You should use the NULL_IF_CONFIG_SMALL() macro
- to define it.
func (*CAVOutputFormat) GetMimeType ¶
func (oFormat *CAVOutputFormat) GetMimeType() string
func (*CAVOutputFormat) GetName ¶
func (oFormat *CAVOutputFormat) GetName() string
func (*CAVOutputFormat) GetPrivClass ¶
func (oFormat *CAVOutputFormat) GetPrivClass() *avutil.CAVClass
/< AVClass for the private context
func (*CAVOutputFormat) GetSubtitleCodec ¶
func (oFormat *CAVOutputFormat) GetSubtitleCodec() avcodec.CAVCodecID
*< default subtitle codec
func (*CAVOutputFormat) GetVideoCodec ¶
func (oFormat *CAVOutputFormat) GetVideoCodec() avcodec.CAVCodecID
*< default video codec
func (*CAVOutputFormat) SetAudioCodec ¶ added in v0.0.5
func (oFormat *CAVOutputFormat) SetAudioCodec(audioCodec avcodec.CAVCodecID)
*< default audio codec
func (*CAVOutputFormat) SetFlags ¶ added in v0.0.5
func (oFormat *CAVOutputFormat) SetFlags(flags int)
*
- can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER,
- AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
- AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS,
- AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE
func (*CAVOutputFormat) SetSubtitleCodec ¶ added in v0.0.5
func (oFormat *CAVOutputFormat) SetSubtitleCodec(subtitleCodec avcodec.CAVCodecID)
*< default subtitle codec
func (*CAVOutputFormat) SetVideoCodec ¶ added in v0.0.5
func (oFormat *CAVOutputFormat) SetVideoCodec(videoCodec avcodec.CAVCodecID)
*< default video codec
type CAVProbeData ¶
type CAVProbeData C.AVProbeData
*
- This structure contains the data a format has to probe a file.
func (*CAVProbeData) GetBuf ¶
func (pd *CAVProbeData) GetBuf() unsafe.Pointer
*< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
func (*CAVProbeData) GetBufSize ¶
func (pd *CAVProbeData) GetBufSize() int
*< Size of buf except extra allocated bytes
func (*CAVProbeData) GetFilename ¶
func (pd *CAVProbeData) GetFilename() string
func (*CAVProbeData) GetMimeType ¶
func (pd *CAVProbeData) GetMimeType() string
*< mime_type, when known.
func (*CAVProbeData) SetBuf ¶ added in v0.0.5
func (pd *CAVProbeData) SetBuf(buf unsafe.Pointer)
*< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
func (*CAVProbeData) SetBufSize ¶ added in v0.0.5
func (pd *CAVProbeData) SetBufSize(bufSize int)
*< Size of buf except extra allocated bytes
type CAVProgram ¶
*
- New fields can be added to the end with minor version bumps.
- Removal, reordering and changes to existing fields require a major
- version bump.
- sizeof(AVProgram) must not be used outside libav*.
func AvFindProgramFromStream ¶
func AvFindProgramFromStream(ic *CAVFormatContext, last *CAVProgram, s int) *CAVProgram
*
- Find the programs which belong to a given stream. *
- @param ic media file handle
- @param last the last found program, the search will start after this
- program, or from the beginning if it is NULL
- @param s stream index *
- @return the next program which belongs to s, NULL if no program is found or
- the last program is not among the programs of ic.
func AvNewProgram ¶
func AvNewProgram(s *CAVFormatContext, id int) *CAVProgram
func (*CAVProgram) GetDiscard ¶
func (p *CAVProgram) GetDiscard() avcodec.CAVDiscard
/< selects which program to discard and which to feed to the caller
func (*CAVProgram) GetEndTime ¶
func (p *CAVProgram) GetEndTime() int64
func (*CAVProgram) GetFlags ¶
func (p *CAVProgram) GetFlags() int
func (*CAVProgram) GetId ¶
func (p *CAVProgram) GetId() int
func (*CAVProgram) GetMetadata ¶
func (p *CAVProgram) GetMetadata() *avutil.CAVDictionary
func (*CAVProgram) GetNbStreamIndexes ¶
func (p *CAVProgram) GetNbStreamIndexes() uint
func (*CAVProgram) GetPcrPid ¶
func (p *CAVProgram) GetPcrPid() int
func (*CAVProgram) GetPmtPid ¶
func (p *CAVProgram) GetPmtPid() int
func (*CAVProgram) GetPmtVersion ¶ added in v0.0.5
func (p *CAVProgram) GetPmtVersion() int
func (*CAVProgram) GetProgramNum ¶
func (p *CAVProgram) GetProgramNum() int
func (*CAVProgram) GetPtsWrapBehavior ¶ added in v0.0.5
func (p *CAVProgram) GetPtsWrapBehavior() int
/< behavior on wrap detection
func (*CAVProgram) GetPtsWrapRefrence ¶
func (p *CAVProgram) GetPtsWrapRefrence() int64
/< reference dts for wrap detection
func (*CAVProgram) GetStartTime ¶
func (p *CAVProgram) GetStartTime() int64
func (*CAVProgram) GetStreamIndex ¶
func (p *CAVProgram) GetStreamIndex() *ctypes.UInt
func (*CAVProgram) SetDiscard ¶ added in v0.0.5
func (p *CAVProgram) SetDiscard(discard avcodec.CAVDiscard)
/< selects which program to discard and which to feed to the caller
func (*CAVProgram) SetEndTime ¶ added in v0.0.5
func (p *CAVProgram) SetEndTime(endTime int64)
func (*CAVProgram) SetFlags ¶ added in v0.0.5
func (p *CAVProgram) SetFlags(flags int)
func (*CAVProgram) SetId ¶ added in v0.0.5
func (p *CAVProgram) SetId(id int)
func (*CAVProgram) SetMetadata ¶ added in v0.0.5
func (p *CAVProgram) SetMetadata(metadata *avutil.CAVDictionary)
func (*CAVProgram) SetNbStreamIndexes ¶ added in v0.0.5
func (p *CAVProgram) SetNbStreamIndexes(nbStreamIndexs uint)
func (*CAVProgram) SetPcrPid ¶ added in v0.0.5
func (p *CAVProgram) SetPcrPid(pcrPid int)
func (*CAVProgram) SetPmtPid ¶ added in v0.0.5
func (p *CAVProgram) SetPmtPid(pmtPid int)
func (*CAVProgram) SetPmtVersion ¶ added in v0.0.5
func (p *CAVProgram) SetPmtVersion(pmtVersion int)
func (*CAVProgram) SetProgramNum ¶ added in v0.0.5
func (p *CAVProgram) SetProgramNum(programNum int)
func (*CAVProgram) SetPtsWrapBehavior ¶ added in v0.0.5
func (p *CAVProgram) SetPtsWrapBehavior(ptsWrapBehavior int)
/< behavior on wrap detection
func (*CAVProgram) SetPtsWrapRefrence ¶ added in v0.0.5
func (p *CAVProgram) SetPtsWrapRefrence(ptsWrapReference int64)
/< reference dts for wrap detection
func (*CAVProgram) SetStartTime ¶ added in v0.0.5
func (p *CAVProgram) SetStartTime(startTime int64)
func (*CAVProgram) SetStreamIndex ¶ added in v0.0.5
func (p *CAVProgram) SetStreamIndex(streamIndex *ctypes.UInt)
type CAVStream ¶
*
- Stream structure.
- New fields can be added to the end with minor version bumps.
- Removal, reordering and changes to existing fields require a major
- version bump.
- sizeof(AVStream) must not be used outside libav*.
func AvformatNewStream ¶
func AvformatNewStream(s *CAVFormatContext, c *avcodec.CAVCodec) *CAVStream
*
- Add a new stream to a media file. *
- When demuxing, it is called by the demuxer in read_header(). If the
- flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also
- be called in read_packet(). *
- When muxing, should be called by the user before avformat_write_header(). *
- User is required to call avformat_free_context() to clean up the allocation
- by avformat_new_stream(). *
- @param s media file handle
- @param c unused, does nothing *
- @return newly created stream or NULL on error.
func (*CAVStream) GetAttachedPic ¶
*
- For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet
- will contain the attached picture. *
- decoding: set by libavformat, must not be modified by the caller.
- encoding: unused
func (*CAVStream) GetAttachedPicPtr ¶ added in v0.0.5
*
- For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet
- will contain the attached picture. *
- decoding: set by libavformat, must not be modified by the caller.
- encoding: unused
func (*CAVStream) GetAvgFrameRate ¶
func (st *CAVStream) GetAvgFrameRate() avutil.CAVRational
*
- Average framerate *
- - demuxing: May be set by libavformat when creating the stream or in
- avformat_find_stream_info().
- - muxing: May be set by the caller before avformat_write_header().
func (*CAVStream) GetCodecPar ¶
func (st *CAVStream) GetCodecPar() *avcodec.CAVCodecParameters
*
- Codec parameters associated with this stream. Allocated and freed by
- libavformat in avformat_new_stream() and avformat_free_context()
- respectively. *
- - demuxing: filled by libavformat on stream creation or in
- avformat_find_stream_info()
- - muxing: filled by the caller before avformat_write_header()
func (*CAVStream) GetDiscard ¶
func (st *CAVStream) GetDiscard() avcodec.CAVDiscard
/< Selects which packets can be discarded at will and do not need to be demuxed.
func (*CAVStream) GetDisposition ¶
*
- Stream disposition - a combination of AV_DISPOSITION_* flags.
- - demuxing: set by libavformat when creating the stream or in
- avformat_find_stream_info().
- - muxing: may be set by the caller before avformat_write_header().
func (*CAVStream) GetDuration ¶
*
- Decoding: duration of the stream, in stream time base.
- If a source file does not specify a duration, but does specify
- a bitrate, this value will be estimated from bitrate and file size. *
- Encoding: May be set by the caller before avformat_write_header() to
- provide a hint to the muxer about the estimated duration.
func (*CAVStream) GetEventFlags ¶
*
- Flags indicating events happening on the stream, a combination of
- AVSTREAM_EVENT_FLAG_*. *
- - demuxing: may be set by the demuxer in avformat_open_input(),
- avformat_find_stream_info() and av_read_frame(). Flags must be cleared
- by the user once the event has been handled.
- - muxing: may be set by the user after avformat_write_header(). to
- indicate a user-triggered event. The muxer will clear the flags for
- events it has handled in av_[interleaved]_write_frame().
func (*CAVStream) GetId ¶
*
- Format-specific stream ID.
- decoding: set by libavformat
- encoding: set by the user, replaced by libavformat if left unset
func (*CAVStream) GetMetadata ¶
func (st *CAVStream) GetMetadata() *avutil.CAVDictionary
func (*CAVStream) GetNbFrames ¶
/< number of frames in this stream if known or 0
func (*CAVStream) GetPrivData ¶
func (*CAVStream) GetPtsWrapBits ¶
*
- Number of bits in timestamps. Used for wrapping control. *
- - demuxing: set by libavformat
- - muxing: set by libavformat *
func (*CAVStream) GetRFrameRate ¶
func (st *CAVStream) GetRFrameRate() avutil.CAVRational
*
- Real base framerate of the stream.
- This is the lowest framerate with which all timestamps can be
- represented accurately (it is the least common multiple of all
- framerates in the stream). Note, this value is just a guess!
- For example, if the time base is 1/90000 and all frames have either
- approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
func (*CAVStream) GetSampleAspectRatio ¶
func (st *CAVStream) GetSampleAspectRatio() avutil.CAVRational
*
- sample aspect ratio (0 if unknown)
- - encoding: Set by user.
- - decoding: Set by libavformat.
func (*CAVStream) GetStartTime ¶
*
- Decoding: pts of the first frame of the stream in presentation order, in stream time base.
- Only set this if you are absolutely 100% sure that the value you set
- it to really is the pts of the first frame.
- This may be undefined (AV_NOPTS_VALUE).
- @note The ASF header does NOT contain a correct start_time the ASF
- demuxer must NOT set this.
func (*CAVStream) GetTimeBase ¶
func (st *CAVStream) GetTimeBase() avutil.CAVRational
*
- This is the fundamental unit of time (in seconds) in terms
- of which frame timestamps are represented. *
- decoding: set by libavformat
- encoding: May be set by the caller before avformat_write_header() to
- provide a hint to the muxer about the desired timebase. In
- avformat_write_header(), the muxer will overwrite this field
- with the timebase that will actually be used for the timestamps
- written into the file (which may or may not be related to the
- user-provided one, depending on the format).
func (*CAVStream) GetTimeBasePtr ¶
func (st *CAVStream) GetTimeBasePtr() *avutil.CAVRational
*
- This is the fundamental unit of time (in seconds) in terms
- of which frame timestamps are represented. *
- decoding: set by libavformat
- encoding: May be set by the caller before avformat_write_header() to
- provide a hint to the muxer about the desired timebase. In
- avformat_write_header(), the muxer will overwrite this field
- with the timebase that will actually be used for the timestamps
- written into the file (which may or may not be related to the
- user-provided one, depending on the format).
func (*CAVStream) SetAvgFrameRate ¶ added in v0.0.5
func (st *CAVStream) SetAvgFrameRate(avgFrameRate avutil.CAVRational)
*
- Average framerate *
- - demuxing: May be set by libavformat when creating the stream or in
- avformat_find_stream_info().
- - muxing: May be set by the caller before avformat_write_header().
func (*CAVStream) SetCodecPar ¶ added in v0.0.5
func (st *CAVStream) SetCodecPar(codecPar *avcodec.CAVCodecParameters)
*
- Codec parameters associated with this stream. Allocated and freed by
- libavformat in avformat_new_stream() and avformat_free_context()
- respectively. *
- - demuxing: filled by libavformat on stream creation or in
- avformat_find_stream_info()
- - muxing: filled by the caller before avformat_write_header()
func (*CAVStream) SetDiscard ¶ added in v0.0.5
func (st *CAVStream) SetDiscard(discard avcodec.CAVDiscard)
/< Selects which packets can be discarded at will and do not need to be demuxed.
func (*CAVStream) SetDisposition ¶ added in v0.0.5
*
- Stream disposition - a combination of AV_DISPOSITION_* flags.
- - demuxing: set by libavformat when creating the stream or in
- avformat_find_stream_info().
- - muxing: may be set by the caller before avformat_write_header().
func (*CAVStream) SetDuration ¶ added in v0.0.5
*
- Decoding: duration of the stream, in stream time base.
- If a source file does not specify a duration, but does specify
- a bitrate, this value will be estimated from bitrate and file size. *
- Encoding: May be set by the caller before avformat_write_header() to
- provide a hint to the muxer about the estimated duration.
func (*CAVStream) SetEventFlags ¶ added in v0.0.5
*
- Flags indicating events happening on the stream, a combination of
- AVSTREAM_EVENT_FLAG_*. *
- - demuxing: may be set by the demuxer in avformat_open_input(),
- avformat_find_stream_info() and av_read_frame(). Flags must be cleared
- by the user once the event has been handled.
- - muxing: may be set by the user after avformat_write_header(). to
- indicate a user-triggered event. The muxer will clear the flags for
- events it has handled in av_[interleaved]_write_frame().
func (*CAVStream) SetId ¶
*
- Format-specific stream ID.
- decoding: set by libavformat
- encoding: set by the user, replaced by libavformat if left unset
func (*CAVStream) SetMetadata ¶ added in v0.0.5
func (st *CAVStream) SetMetadata(metadata *avutil.CAVDictionary)
func (*CAVStream) SetNbFrames ¶ added in v0.0.5
/< number of frames in this stream if known or 0
func (*CAVStream) SetPrivData ¶ added in v0.0.5
func (*CAVStream) SetPtsWrapBits ¶ added in v0.0.5
*
- Number of bits in timestamps. Used for wrapping control. *
- - demuxing: set by libavformat
- - muxing: set by libavformat *
func (*CAVStream) SetRFrameRate ¶ added in v0.0.5
func (st *CAVStream) SetRFrameRate(rFrameRate avutil.CAVRational)
*
- Real base framerate of the stream.
- This is the lowest framerate with which all timestamps can be
- represented accurately (it is the least common multiple of all
- framerates in the stream). Note, this value is just a guess!
- For example, if the time base is 1/90000 and all frames have either
- approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
func (*CAVStream) SetSampleAspectRatio ¶ added in v0.0.5
func (st *CAVStream) SetSampleAspectRatio(sampleAspectRatio avutil.CAVRational)
*
- sample aspect ratio (0 if unknown)
- - encoding: Set by user.
- - decoding: Set by libavformat.
func (*CAVStream) SetStartTime ¶ added in v0.0.5
*
- Decoding: pts of the first frame of the stream in presentation order, in stream time base.
- Only set this if you are absolutely 100% sure that the value you set
- it to really is the pts of the first frame.
- This may be undefined (AV_NOPTS_VALUE).
- @note The ASF header does NOT contain a correct start_time the ASF
- demuxer must NOT set this.
func (*CAVStream) SetTimeBase ¶
func (st *CAVStream) SetTimeBase(timeBase avutil.CAVRational)
*
- This is the fundamental unit of time (in seconds) in terms
- of which frame timestamps are represented. *
- decoding: set by libavformat
- encoding: May be set by the caller before avformat_write_header() to
- provide a hint to the muxer about the desired timebase. In
- avformat_write_header(), the muxer will overwrite this field
- with the timebase that will actually be used for the timestamps
- written into the file (which may or may not be related to the
- user-provided one, depending on the format).
type CAVStreamParseType ¶
type CAVStreamParseType C.enum_AVStreamParseType
const ( AVSTREAM_PARSE_NONE CAVStreamParseType = C.AVSTREAM_PARSE_NONE AVSTREAM_PARSE_FULL CAVStreamParseType = C.AVSTREAM_PARSE_FULL /**< full parsing and repack */ AVSTREAM_PARSE_HEADERS CAVStreamParseType = C.AVSTREAM_PARSE_HEADERS /**< Only parse headers, do not repack. */ AVSTREAM_PARSE_TIMESTAMPS CAVStreamParseType = C.AVSTREAM_PARSE_TIMESTAMPS /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */ AVSTREAM_PARSE_FULL_ONCE CAVStreamParseType = C.AVSTREAM_PARSE_FULL_ONCE /**< full parsing and repack of the first frame only, only implemented for H.264 currently */ AVSTREAM_PARSE_FULL_RAW CAVStreamParseType = C.AVSTREAM_PARSE_FULL_RAW /**< full parsing and repack with timestamp and position generation by parser for raw this assumes that each packet in the file contains no demuxer level headers and just codec level data, otherwise position generation would fail */ )
type CAVTimebaseSource ¶
type CAVTimebaseSource = C.enum_AVTimebaseSource
const ( AVFMT_TBCF_AUTO CAVTimebaseSource = C.AVFMT_TBCF_AUTO AVFMT_TBCF_DECODER CAVTimebaseSource = C.AVFMT_TBCF_DECODER AVFMT_TBCF_DEMUXER CAVTimebaseSource = C.AVFMT_TBCF_DEMUXER AVFMT_TBCF_R_FRAMERATE CAVTimebaseSource = C.AVFMT_TBCF_R_FRAMERATE )
type CAvFormatControlMessage ¶
type CAvFormatControlMessage C.av_format_control_message
typedef int (*av_format_control_message)(struct AVFormatContext *s, int type, void *data, size_t data_size);