mirror of
https://github.com/giorgisio/goav.git
synced 2024-04-21 12:31:56 +00:00
Go like naming, formating, ... and other minor updates
This commit is contained in:
+50
-90
@@ -28,241 +28,207 @@ import (
|
||||
|
||||
type (
|
||||
AvProbeData C.struct_AVProbeData
|
||||
AvOutputFormat C.struct_AVOutputFormat
|
||||
AvInputFormat C.struct_AVInputFormat
|
||||
InputFormat C.struct_AVInputFormat
|
||||
OutputFormat C.struct_AVOutputFormat
|
||||
Context C.struct_AVFormatContext
|
||||
Frame C.struct_AVFrame
|
||||
CodecContext C.struct_AVCodecContext
|
||||
Dictionary C.struct_AVDictionary
|
||||
AvIndexEntry C.struct_AVIndexEntry
|
||||
AvStream C.struct_AVStream
|
||||
Stream C.struct_AVStream
|
||||
AvProgram C.struct_AVProgram
|
||||
AvChapter C.struct_AVChapter
|
||||
Context C.struct_AVFormatContext
|
||||
AvPacketList C.struct_AVPacketList
|
||||
AvPacket C.struct_AVPacket
|
||||
AvCodecParserContext C.struct_AVCodecParserContext
|
||||
Packet C.struct_AVPacket
|
||||
CodecParserContext C.struct_AVCodecParserContext
|
||||
AvIOContext C.struct_AVIOContext
|
||||
AvRational C.struct_AVRational
|
||||
Rational C.struct_AVRational
|
||||
AvCodec C.struct_AVCodec
|
||||
AvCodecTag C.struct_AVCodecTag
|
||||
AvDictionary C.struct_AVDictionary
|
||||
AvFrame C.struct_AVFrame
|
||||
AvClass C.struct_AVClass
|
||||
AvCodecContext C.struct_AVCodecContext
|
||||
AvFormatInternal C.struct_AVFormatInternal
|
||||
AvIOInterruptCB C.struct_AVIOInterruptCB
|
||||
AvPacketSideData C.struct_AVPacketSideData
|
||||
FFFrac C.struct_FFFrac
|
||||
AvStreamParseType C.enum_AVStreamParseType
|
||||
AvDiscard C.enum_AVDiscard
|
||||
AvMediaType C.enum_AVMediaType
|
||||
MediaType C.enum_AVMediaType
|
||||
AvDurationEstimationMethod C.enum_AVDurationEstimationMethod
|
||||
AvPacketSideDataType C.enum_AVPacketSideDataType
|
||||
AvCodecId C.enum_AVCodecID
|
||||
CodecId C.enum_AVCodecID
|
||||
)
|
||||
|
||||
type File C.FILE
|
||||
|
||||
//int av_get_packet (AvIOContext *s, AvPacket *pkt, int size)
|
||||
//Allocate and read the payload of a packet and initialize its fields with default values.
|
||||
func (ctxt *AvIOContext) AvGetPacket(pkt *AvPacket, s int) int {
|
||||
func (ctxt *AvIOContext) AvGetPacket(pkt *Packet, s int) int {
|
||||
return int(C.av_get_packet((*C.struct_AVIOContext)(ctxt), (*C.struct_AVPacket)(pkt), C.int(s)))
|
||||
}
|
||||
|
||||
//int av_append_packet (AvIOContext *s, AvPacket *pkt, int size)
|
||||
//Read data and append it to the current content of the AvPacket.
|
||||
func (ctxt *AvIOContext) AvAppendPacket(pkt *AvPacket, s int) int {
|
||||
//Read data and append it to the current content of the Packet.
|
||||
func (ctxt *AvIOContext) AvAppendPacket(pkt *Packet, s int) int {
|
||||
return int(C.av_append_packet((*C.struct_AVIOContext)(ctxt), (*C.struct_AVPacket)(pkt), C.int(s)))
|
||||
}
|
||||
|
||||
//unsigned avformat_version (void)
|
||||
//Return the LIBAvFORMAT_VERSION_INT constant.
|
||||
func AvformatVersion() uint {
|
||||
return uint(C.avformat_version())
|
||||
}
|
||||
|
||||
//const char * avformat_configuration (void)
|
||||
//Return the libavformat build-time configuration.
|
||||
func AvformatConfiguration() string {
|
||||
return C.GoString(C.avformat_configuration())
|
||||
}
|
||||
|
||||
//const char * avformat_license (void)
|
||||
//Return the libavformat license.
|
||||
func AvformatLicense() string {
|
||||
return C.GoString(C.avformat_license())
|
||||
}
|
||||
|
||||
//void av_register_all (void)
|
||||
//Initialize libavformat and register all the muxers, demuxers and protocols.
|
||||
func AvRegisterAll() {
|
||||
C.av_register_all()
|
||||
}
|
||||
|
||||
//void av_register_input_format (AvInputFormat *format)
|
||||
func AvRegisterInputFormat(f *AvInputFormat) {
|
||||
func AvRegisterInputFormat(f *InputFormat) {
|
||||
C.av_register_input_format((*C.struct_AVInputFormat)(f))
|
||||
}
|
||||
|
||||
//void av_register_output_format (AvOutputFormat *format)
|
||||
func (f *AvOutputFormat) AvRegisterOutputFormat() {
|
||||
func (f *OutputFormat) AvRegisterOutputFormat() {
|
||||
C.av_register_output_format((*C.struct_AVOutputFormat)(f))
|
||||
}
|
||||
|
||||
//int avformat_network_init (void)
|
||||
//Do global initialization of network components.
|
||||
func AvformatNetworkInit() int {
|
||||
return int(C.avformat_network_init())
|
||||
}
|
||||
|
||||
//int avformat_network_deinit (void)
|
||||
//Undo the initialization done by avformat_network_init.
|
||||
func AvformatNetworkDeinit() int {
|
||||
return int(C.avformat_network_deinit())
|
||||
}
|
||||
|
||||
//AvInputFormat * av_iformat_next (const AvInputFormat *f)
|
||||
//If f is NULL, returns the first registered input format, if f is non-NULL, returns the next registered input format after f or NULL if f is the last one.
|
||||
func (f *AvInputFormat) AvIformatNext() *AvInputFormat {
|
||||
return (*AvInputFormat)(C.av_iformat_next((*C.struct_AVInputFormat)(f)))
|
||||
func (f *InputFormat) AvIformatNext() *InputFormat {
|
||||
return (*InputFormat)(C.av_iformat_next((*C.struct_AVInputFormat)(f)))
|
||||
}
|
||||
|
||||
//AvOutputFormat * av_oformat_next (const AvOutputFormat *f)
|
||||
//If f is NULL, returns the first registered output format, if f is non-NULL, returns the next registered output format after f or NULL if f is the last one.
|
||||
func (f *AvOutputFormat) AvOformatNext() *AvOutputFormat {
|
||||
return (*AvOutputFormat)(C.av_oformat_next((*C.struct_AVOutputFormat)(f)))
|
||||
func (f *OutputFormat) AvOformatNext() *OutputFormat {
|
||||
return (*OutputFormat)(C.av_oformat_next((*C.struct_AVOutputFormat)(f)))
|
||||
}
|
||||
|
||||
//Context * avformat_alloc_context (void)
|
||||
//Allocate an Context.
|
||||
func AvformatAllocContext() *Context {
|
||||
return (*Context)(C.avformat_alloc_context())
|
||||
}
|
||||
|
||||
//const AvClass * avformat_get_class (void)
|
||||
//Get the AvClass for Context.
|
||||
func AvformatGetClass() *AvClass {
|
||||
return (*AvClass)(C.avformat_get_class())
|
||||
}
|
||||
|
||||
//uint8_t * av_stream_get_side_data (AvStream *stream, enum AvPacketSideDataType type, int *size)
|
||||
//Get side information from stream.
|
||||
func (s *AvStream) AvStreamGetSideData(t AvPacketSideDataType, z int) *uint8 {
|
||||
func (s *Stream) AvStreamGetSideData(t AvPacketSideDataType, z int) *uint8 {
|
||||
return (*uint8)(C.av_stream_get_side_data((*C.struct_AVStream)(s), (C.enum_AVPacketSideDataType)(t), (*C.int)(unsafe.Pointer(&z))))
|
||||
}
|
||||
|
||||
//int avformat_alloc_output_context2 (Context **ctx, AvOutputFormat *oformat, const char *format_name, const char *filename)
|
||||
//Allocate an Context for an output format.
|
||||
func AvformatAllocOutputContext2(ctx **Context, o *AvOutputFormat, fo, fi string) int {
|
||||
func AvformatAllocOutputContext2(ctx **Context, o *OutputFormat, fo, fi string) int {
|
||||
return int(C.avformat_alloc_output_context2((**C.struct_AVFormatContext)(unsafe.Pointer(ctx)), (*C.struct_AVOutputFormat)(o), C.CString(fo), C.CString(fi)))
|
||||
}
|
||||
|
||||
//AvInputFormat * av_find_input_format (const char *short_name)
|
||||
//Find AvInputFormat based on the short name of the input format.
|
||||
func AvFindInputFormat(s string) *AvInputFormat {
|
||||
return (*AvInputFormat)(C.av_find_input_format(C.CString(s)))
|
||||
//Find InputFormat based on the short name of the input format.
|
||||
func AvFindInputFormat(s string) *InputFormat {
|
||||
return (*InputFormat)(C.av_find_input_format(C.CString(s)))
|
||||
}
|
||||
|
||||
//AvInputFormat * av_probe_input_format (AvProbeData *pd, int is_opened)
|
||||
//Guess the file format.
|
||||
func AvProbeInputFormat(pd *AvProbeData, i int) *AvInputFormat {
|
||||
return (*AvInputFormat)(C.av_probe_input_format((*C.struct_AVProbeData)(pd), C.int(i)))
|
||||
func AvProbeInputFormat(pd *AvProbeData, i int) *InputFormat {
|
||||
return (*InputFormat)(C.av_probe_input_format((*C.struct_AVProbeData)(pd), C.int(i)))
|
||||
}
|
||||
|
||||
//AvInputFormat * av_probe_input_format2 (AvProbeData *pd, int is_opened, int *score_max)
|
||||
//Guess the file format.
|
||||
func AvProbeInputFormat2(pd *AvProbeData, o int, sm *int) *AvInputFormat {
|
||||
return (*AvInputFormat)(C.av_probe_input_format2((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sm))))
|
||||
func AvProbeInputFormat2(pd *AvProbeData, o int, sm *int) *InputFormat {
|
||||
return (*InputFormat)(C.av_probe_input_format2((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sm))))
|
||||
}
|
||||
|
||||
//AvInputFormat * av_probe_input_format3 (AvProbeData *pd, int is_opened, int *score_ret)
|
||||
//Guess the file format.
|
||||
func AvProbeInputFormat3(pd *AvProbeData, o int, sl *int) *AvInputFormat {
|
||||
return (*AvInputFormat)(C.av_probe_input_format3((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sl))))
|
||||
func AvProbeInputFormat3(pd *AvProbeData, o int, sl *int) *InputFormat {
|
||||
return (*InputFormat)(C.av_probe_input_format3((*C.struct_AVProbeData)(pd), C.int(o), (*C.int)(unsafe.Pointer(sl))))
|
||||
}
|
||||
|
||||
//int av_probe_input_buffer2 (AvIOContext *pb, AvInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size)
|
||||
//Probe a bytestream to determine the input format.
|
||||
func AvProbeInputBuffer2(pb *AvIOContext, f **AvInputFormat, fi string, l int, o, m uint) int {
|
||||
func AvProbeInputBuffer2(pb *AvIOContext, f **InputFormat, fi string, l int, o, m uint) int {
|
||||
return int(C.av_probe_input_buffer2((*C.struct_AVIOContext)(pb), (**C.struct_AVInputFormat)(unsafe.Pointer(f)), C.CString(fi), unsafe.Pointer(&l), C.uint(o), C.uint(m)))
|
||||
}
|
||||
|
||||
//int av_probe_input_buffer (AvIOContext *pb, AvInputFormat **fmt, const char *filename, void *logctx, unsigned int offset, unsigned int max_probe_size)
|
||||
//Like av_probe_input_buffer2() but returns 0 on success.
|
||||
func AvProbeInputBuffer(pb *AvIOContext, f **AvInputFormat, fi string, l int, o, m uint) int {
|
||||
func AvProbeInputBuffer(pb *AvIOContext, f **InputFormat, fi string, l int, o, m uint) int {
|
||||
return int(C.av_probe_input_buffer((*C.struct_AVIOContext)(pb), (**C.struct_AVInputFormat)(unsafe.Pointer(f)), C.CString(fi), unsafe.Pointer(&l), C.uint(o), C.uint(m)))
|
||||
}
|
||||
|
||||
//int avformat_open_input (Context **ps, const char *filename, AvInputFormat *fmt, AvDictionary **options)
|
||||
//Open an input stream and read the header.
|
||||
func AvformatOpenInput(ps **Context, fi string, fmt *AvInputFormat, d **AvDictionary) int {
|
||||
func AvformatOpenInput(ps **Context, fi string, fmt *InputFormat, d **Dictionary) int {
|
||||
return int(C.avformat_open_input((**C.struct_AVFormatContext)(unsafe.Pointer(ps)), C.CString(fi), (*C.struct_AVInputFormat)(fmt), (**C.struct_AVDictionary)(unsafe.Pointer(d))))
|
||||
}
|
||||
|
||||
//AvOutputFormat * av_guess_format (const char *short_name, const char *filename, const char *mime_type)
|
||||
//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.
|
||||
func AvGuessFormat(sn, f, mt string) *AvOutputFormat {
|
||||
return (*AvOutputFormat)(C.av_guess_format(C.CString(sn), C.CString(f), C.CString(mt)))
|
||||
func AvGuessFormat(sn, f, mt string) *OutputFormat {
|
||||
return (*OutputFormat)(C.av_guess_format(C.CString(sn), C.CString(f), C.CString(mt)))
|
||||
}
|
||||
|
||||
//enum AvCodecId av_guess_codec (AvOutputFormat *fmt, const char *short_name, const char *filename, const char *mime_type, enum AvMediaType type)
|
||||
//Guess the codec ID based upon muxer and filename.
|
||||
func AvGuessCodec(fmt *AvOutputFormat, sn, f, mt string, t AvMediaType) AvCodecId {
|
||||
return (AvCodecId)(C.av_guess_codec((*C.struct_AVOutputFormat)(fmt), C.CString(sn), C.CString(f), C.CString(mt), (C.enum_AVMediaType)(t)))
|
||||
func AvGuessCodec(fmt *OutputFormat, sn, f, mt string, t MediaType) CodecId {
|
||||
return (CodecId)(C.av_guess_codec((*C.struct_AVOutputFormat)(fmt), C.CString(sn), C.CString(f), C.CString(mt), (C.enum_AVMediaType)(t)))
|
||||
}
|
||||
|
||||
//void av_hex_dump (FILE *f, const uint8_t *buf, int size)
|
||||
//Send a nice hexadecimal dump of a buffer to the specified file stream.
|
||||
func AvHexDump(f *File, b *uint8, s int) {
|
||||
C.av_hex_dump((*C.FILE)(f), (*C.uint8_t)(b), C.int(s))
|
||||
}
|
||||
|
||||
//void av_hex_dump_log (void *avcl, int level, const uint8_t *buf, int size)
|
||||
//Send a nice hexadecimal dump of a buffer to the log.
|
||||
func AvHexDumpLog(a, l int, b *uint8, s int) {
|
||||
C.av_hex_dump_log(unsafe.Pointer(&a), C.int(l), (*C.uint8_t)(b), C.int(s))
|
||||
}
|
||||
|
||||
//void av_pkt_dump2 (FILE *f, const AvPacket *pkt, int dump_payload, const AvStream *st)
|
||||
//Send a nice dump of a packet to the specified file stream.
|
||||
func AvPktDump2(f *File, pkt *AvPacket, dp int, st *AvStream) {
|
||||
func AvPktDump2(f *File, pkt *Packet, dp int, st *Stream) {
|
||||
C.av_pkt_dump2((*C.FILE)(f), (*C.struct_AVPacket)(pkt), C.int(dp), (*C.struct_AVStream)(st))
|
||||
}
|
||||
|
||||
//void av_pkt_dump_log2 (void *avcl, int level, const AvPacket *pkt, int dump_payload, const AvStream *st)
|
||||
//Send a nice dump of a packet to the log.
|
||||
func AvPktDumpLog2(a int, l int, pkt *AvPacket, dp int, st *AvStream) {
|
||||
func AvPktDumpLog2(a int, l int, pkt *Packet, dp int, st *Stream) {
|
||||
C.av_pkt_dump_log2(unsafe.Pointer(&a), C.int(l), (*C.struct_AVPacket)(pkt), C.int(dp), (*C.struct_AVStream)(st))
|
||||
}
|
||||
|
||||
//enum AvCodecId av_codec_get_id (const struct AvCodecTag *const *tags, unsigned int tag)
|
||||
//Get the AvCodecId for the given codec tag tag.
|
||||
func AvCodecGetId(t **AvCodecTag, tag uint) AvCodecId {
|
||||
return (AvCodecId)(C.av_codec_get_id((**C.struct_AVCodecTag)(unsafe.Pointer(t)), C.uint(tag)))
|
||||
//enum CodecId av_codec_get_id (const struct AvCodecTag *const *tags, unsigned int tag)
|
||||
//Get the CodecId for the given codec tag tag.
|
||||
func AvCodecGetId(t **AvCodecTag, tag uint) CodecId {
|
||||
return (CodecId)(C.av_codec_get_id((**C.struct_AVCodecTag)(unsafe.Pointer(t)), C.uint(tag)))
|
||||
}
|
||||
|
||||
//unsigned int av_codec_get_tag (const struct AvCodecTag *const *tags, enum AvCodecId id)
|
||||
//Get the codec tag for the given codec id id.
|
||||
func AvCodecGetTag(t **AvCodecTag, id AvCodecId) uint {
|
||||
func AvCodecGetTag(t **AvCodecTag, id CodecId) uint {
|
||||
return uint(C.av_codec_get_tag((**C.struct_AVCodecTag)(unsafe.Pointer(t)), (C.enum_AVCodecID)(id)))
|
||||
}
|
||||
|
||||
//int av_codec_get_tag2 (const struct AvCodecTag *const *tags, enum AvCodecId id, unsigned int *tag)
|
||||
//Get the codec tag for the given codec id.
|
||||
func AvCodecGetTag2(t **AvCodecTag, id AvCodecId, tag *uint) int {
|
||||
func AvCodecGetTag2(t **AvCodecTag, id CodecId, tag *uint) int {
|
||||
return int(C.av_codec_get_tag2((**C.struct_AVCodecTag)(unsafe.Pointer(t)), (C.enum_AVCodecID)(id), (*C.uint)(unsafe.Pointer(tag))))
|
||||
}
|
||||
|
||||
//int av_index_search_timestamp (AvStream *st, int64_t timestamp, int flags)
|
||||
//Get the index for a specific timestamp.
|
||||
func AvIndexSearchTimestamp(st *AvStream, t int64, f int) int {
|
||||
func AvIndexSearchTimestamp(st *Stream, t int64, f int) int {
|
||||
return int(C.av_index_search_timestamp((*C.struct_AVStream)(st), C.int64_t(t), C.int(f)))
|
||||
}
|
||||
|
||||
//int av_add_index_entry (AvStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
|
||||
//Add an index entry into a sorted list.
|
||||
func AvAddIndexEntry(st *AvStream, pos, t, int64, s, d, f int) int {
|
||||
func AvAddIndexEntry(st *Stream, pos, t, int64, s, d, f int) int {
|
||||
return int(C.av_add_index_entry((*C.struct_AVStream)(st), C.int64_t(pos), C.int64_t(t), C.int(s), C.int(d), C.int(f)))
|
||||
}
|
||||
|
||||
//void av_url_split (char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
|
||||
//Split a URL string into components.
|
||||
func AvUrlSplit(p string, ps int, a string, as int, h string, hs int, pp *int, path string, psize int, url string) {
|
||||
C.av_url_split(C.CString(p), C.int(ps), C.CString(a), C.int(as), C.CString(h), C.int(hs), (*C.int)(unsafe.Pointer(pp)), C.CString(path), C.int(psize), C.CString(url))
|
||||
@@ -274,13 +240,11 @@ func AvGetFrameFilename(b string, bs int, pa string, n int) int {
|
||||
return int(C.av_get_frame_filename(C.CString(b), C.int(bs), C.CString(pa), C.int(n)))
|
||||
}
|
||||
|
||||
//int av_filename_number_test (const char *filename)
|
||||
//Check whether filename actually is a numbered sequence generator.
|
||||
func AvFilenameNumberTest(f string) int {
|
||||
return int(C.av_filename_number_test(C.CString(f)))
|
||||
}
|
||||
|
||||
//int av_sdp_create (Context *ac[], int n_files, char *buf, int size)
|
||||
//Generate an SDP for an RTP session.
|
||||
func AvSdpCreate(ac **Context, nf int, b string, s int) int {
|
||||
return int(C.av_sdp_create((**C.struct_AVFormatContext)(unsafe.Pointer(ac)), C.int(nf), C.CString(b), C.int(s)))
|
||||
@@ -292,13 +256,11 @@ func AvMatchExt(f, e string) int {
|
||||
return int(C.av_match_ext(C.CString(f), C.CString(e)))
|
||||
}
|
||||
|
||||
//int avformat_query_codec (const AvOutputFormat *ofmt, enum AvCodecId codec_id, int std_compliance)
|
||||
//Test if the given container can store a codec.
|
||||
func AvformatQueryCodec(o *AvOutputFormat, cd AvCodecId, sc int) int {
|
||||
func AvformatQueryCodec(o *OutputFormat, cd CodecId, sc int) int {
|
||||
return int(C.avformat_query_codec((*C.struct_AVOutputFormat)(o), (C.enum_AVCodecID)(cd), C.int(sc)))
|
||||
}
|
||||
|
||||
//struct AvCodecTag * avformat_get_riff_video_tags (void)
|
||||
func AvformatGetRiffVideoTags() *AvCodecTag {
|
||||
return (*AvCodecTag)(C.avformat_get_riff_video_tags())
|
||||
}
|
||||
@@ -308,12 +270,10 @@ func AvformatGetRiffAudioTags() *AvCodecTag {
|
||||
return (*AvCodecTag)(C.avformat_get_riff_audio_tags())
|
||||
}
|
||||
|
||||
//struct AvCodecTag * avformat_get_mov_video_tags (void)
|
||||
func AvformatGetMovVideoTags() *AvCodecTag {
|
||||
return (*AvCodecTag)(C.avformat_get_mov_video_tags())
|
||||
}
|
||||
|
||||
//struct AvCodecTag * avformat_get_mov_audio_tags (void)
|
||||
func AvformatGetMovAudioTags() *AvCodecTag {
|
||||
return (*AvCodecTag)(C.avformat_get_mov_audio_tags())
|
||||
}
|
||||
|
||||
+27
-27
@@ -104,10 +104,10 @@ func (s *Context) AvformatFreeContext() {
|
||||
C.avformat_free_context((*C.struct_AVFormatContext)(s))
|
||||
}
|
||||
|
||||
//AvStream * avformat_new_stream (Context *s, const AvCodec *c)
|
||||
//Stream * avformat_new_stream (Context *s, const AvCodec *c)
|
||||
//Add a new stream to a media file.
|
||||
func (s *Context) AvformatNewStream(c *AvCodec) *AvStream {
|
||||
return (*AvStream)(C.avformat_new_stream((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)))
|
||||
func (s *Context) AvformatNewStream(c *AvCodec) *Stream {
|
||||
return (*Stream)(C.avformat_new_stream((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)))
|
||||
}
|
||||
|
||||
//AvProgram * av_new_program (Context *s, int id)
|
||||
@@ -115,9 +115,9 @@ func (s *Context) AvNewProgram(id int) *AvProgram {
|
||||
return (*AvProgram)(C.av_new_program((*C.struct_AVFormatContext)(s), C.int(id)))
|
||||
}
|
||||
|
||||
//int avformat_find_stream_info (Context *ic, AvDictionary **options)
|
||||
//int avformat_find_stream_info (Context *ic, Dictionary **options)
|
||||
//Read packets of a media file to get stream information.
|
||||
func (ic *Context) AvformatFindStreamInfo(d **AvDictionary) int {
|
||||
func (ic *Context) AvformatFindStreamInfo(d **Dictionary) int {
|
||||
return int(C.avformat_find_stream_info((*C.struct_AVFormatContext)(ic), (**C.struct_AVDictionary)(unsafe.Pointer(d))))
|
||||
}
|
||||
|
||||
@@ -127,15 +127,15 @@ func (ic *Context) AvFindProgramFromStream(l *AvProgram, s int) *AvProgram {
|
||||
return (*AvProgram)(C.av_find_program_from_stream((*C.struct_AVFormatContext)(ic), (*C.struct_AVProgram)(l), C.int(s)))
|
||||
}
|
||||
|
||||
//int av_find_best_stream (Context *ic, enum AvMediaType type, int wanted_stream_nb, int related_stream, AvCodec **decoder_ret, int flags)
|
||||
//int av_find_best_stream (Context *ic, enum MediaType type, int wanted_stream_nb, int related_stream, AvCodec **decoder_ret, int flags)
|
||||
//Find the "best" stream in the file.
|
||||
func AvFindBestStream(ic *Context, t AvMediaType, ws, rs int, c **AvCodec, f int) int {
|
||||
func AvFindBestStream(ic *Context, t MediaType, ws, rs int, c **AvCodec, f int) int {
|
||||
return int(C.av_find_best_stream((*C.struct_AVFormatContext)(ic), (C.enum_AVMediaType)(t), C.int(ws), C.int(rs), (**C.struct_AVCodec)(unsafe.Pointer(c)), C.int(f)))
|
||||
}
|
||||
|
||||
//int av_read_frame (Context *s, AvPacket *pkt)
|
||||
//int av_read_frame (Context *s, Packet *pkt)
|
||||
//Return the next frame of a stream.
|
||||
func (s *Context) AvReadFrame(pkt *avcodec.AvPacket) int {
|
||||
func (s *Context) AvReadFrame(pkt *avcodec.Packet) int {
|
||||
return int(C.av_read_frame((*C.struct_AVFormatContext)(unsafe.Pointer(s)), (*C.struct_AVPacket)(unsafe.Pointer(pkt))))
|
||||
}
|
||||
|
||||
@@ -169,33 +169,33 @@ func (s *Context) AvformatCloseInput() {
|
||||
C.avformat_close_input((**C.struct_AVFormatContext)(unsafe.Pointer(s)))
|
||||
}
|
||||
|
||||
//int avformat_write_header (Context *s, AvDictionary **options)
|
||||
//int avformat_write_header (Context *s, Dictionary **options)
|
||||
//Allocate the stream private data and write the stream header to an output media file.
|
||||
func (s *Context) AvformatWriteHeader(o **AvDictionary) int {
|
||||
func (s *Context) AvformatWriteHeader(o **Dictionary) int {
|
||||
return int(C.avformat_write_header((*C.struct_AVFormatContext)(s), (**C.struct_AVDictionary)(unsafe.Pointer(o))))
|
||||
}
|
||||
|
||||
//int av_write_frame (Context *s, AvPacket *pkt)
|
||||
//int av_write_frame (Context *s, Packet *pkt)
|
||||
//Write a packet to an output media file.
|
||||
func (s *Context) AvWriteFrame(pkt *AvPacket) int {
|
||||
func (s *Context) AvWriteFrame(pkt *Packet) int {
|
||||
return int(C.av_write_frame((*C.struct_AVFormatContext)(s), (*C.struct_AVPacket)(pkt)))
|
||||
}
|
||||
|
||||
//int av_interleaved_write_frame (Context *s, AvPacket *pkt)
|
||||
//int av_interleaved_write_frame (Context *s, Packet *pkt)
|
||||
//Write a packet to an output media file ensuring correct interleaving.
|
||||
func (s *Context) AvInterleavedWriteFrame(pkt *AvPacket) int {
|
||||
func (s *Context) AvInterleavedWriteFrame(pkt *Packet) int {
|
||||
return int(C.av_interleaved_write_frame((*C.struct_AVFormatContext)(s), (*C.struct_AVPacket)(pkt)))
|
||||
}
|
||||
|
||||
//int av_write_uncoded_frame (Context *s, int stream_index, AvFrame *frame)
|
||||
//int av_write_uncoded_frame (Context *s, int stream_index, Frame *frame)
|
||||
//Write a uncoded frame to an output media file.
|
||||
func (s *Context) AvWriteUncodedFrame(si int, f *AvFrame) int {
|
||||
func (s *Context) AvWriteUncodedFrame(si int, f *Frame) int {
|
||||
return int(C.av_write_uncoded_frame((*C.struct_AVFormatContext)(s), C.int(si), (*C.struct_AVFrame)(f)))
|
||||
}
|
||||
|
||||
//int av_interleaved_write_uncoded_frame (Context *s, int stream_index, AvFrame *frame)
|
||||
//int av_interleaved_write_uncoded_frame (Context *s, int stream_index, Frame *frame)
|
||||
//Write a uncoded frame to an output media file.
|
||||
func (s *Context) AvInterleavedWriteUncodedFrame(si int, f *AvFrame) int {
|
||||
func (s *Context) AvInterleavedWriteUncodedFrame(si int, f *Frame) int {
|
||||
return int(C.av_interleaved_write_uncoded_frame((*C.struct_AVFormatContext)(s), C.int(si), (*C.struct_AVFrame)(f)))
|
||||
}
|
||||
|
||||
@@ -228,21 +228,21 @@ func (ic *Context) AvDumpFormat(i int, url string, io int) {
|
||||
C.av_dump_format((*C.struct_AVFormatContext)(unsafe.Pointer(ic)), C.int(i), C.CString(url), C.int(io))
|
||||
}
|
||||
|
||||
//AvRational av_guess_sample_aspect_ratio (Context *format, AvStream *stream, AvFrame *frame)
|
||||
//Rational av_guess_sample_aspect_ratio (Context *format, Stream *stream, Frame *frame)
|
||||
//Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.
|
||||
func (f *Context) AvGuessSampleAspectRatio(st *AvStream, fr *AvFrame) AvRational {
|
||||
return (AvRational)(C.av_guess_sample_aspect_ratio((*C.struct_AVFormatContext)(f), (*C.struct_AVStream)(st), (*C.struct_AVFrame)(fr)))
|
||||
func (f *Context) AvGuessSampleAspectRatio(st *Stream, fr *Frame) Rational {
|
||||
return (Rational)(C.av_guess_sample_aspect_ratio((*C.struct_AVFormatContext)(f), (*C.struct_AVStream)(st), (*C.struct_AVFrame)(fr)))
|
||||
}
|
||||
|
||||
//AvRational av_guess_frame_rate (Context *ctx, AvStream *stream, AvFrame *frame)
|
||||
//Rational av_guess_frame_rate (Context *ctx, Stream *stream, Frame *frame)
|
||||
//Guess the frame rate, based on both the container and codec information.
|
||||
func (ctx *Context) AvGuessFrameRate(st *AvStream, fr *AvFrame) AvRational {
|
||||
return (AvRational)(C.av_guess_frame_rate((*C.struct_AVFormatContext)(ctx), (*C.struct_AVStream)(st), (*C.struct_AVFrame)(fr)))
|
||||
func (ctx *Context) AvGuessFrameRate(st *Stream, fr *Frame) Rational {
|
||||
return (Rational)(C.av_guess_frame_rate((*C.struct_AVFormatContext)(ctx), (*C.struct_AVStream)(st), (*C.struct_AVFrame)(fr)))
|
||||
}
|
||||
|
||||
//int avformat_match_stream_specifier (Context *s, AvStream *st, const char *spec)
|
||||
//int avformat_match_stream_specifier (Context *s, Stream *st, const char *spec)
|
||||
//Check if the stream st contained in s is matched by the stream specifier spec.
|
||||
func (s *Context) AvformatMatchStreamSpecifier(st *AvStream, spec string) int {
|
||||
func (s *Context) AvformatMatchStreamSpecifier(st *Stream, spec string) int {
|
||||
return int(C.avformat_match_stream_specifier((*C.struct_AVFormatContext)(s), (*C.struct_AVStream)(st), C.CString(spec)))
|
||||
}
|
||||
|
||||
|
||||
+16
-16
@@ -27,8 +27,8 @@ func (ctxt *Context) VideoCodec() *AvCodec {
|
||||
return (*AvCodec)(unsafe.Pointer(ctxt.video_codec))
|
||||
}
|
||||
|
||||
func (ctxt *Context) Metadata() *AvDictionary {
|
||||
return (*AvDictionary)(unsafe.Pointer(ctxt.metadata))
|
||||
func (ctxt *Context) Metadata() *Dictionary {
|
||||
return (*Dictionary)(unsafe.Pointer(ctxt.metadata))
|
||||
}
|
||||
|
||||
func (ctxt *Context) Internal() *AvFormatInternal {
|
||||
@@ -47,12 +47,12 @@ func (ctxt *Context) Programs() **AvProgram {
|
||||
return (**AvProgram)(unsafe.Pointer(ctxt.programs))
|
||||
}
|
||||
|
||||
func (ctxt *Context) OffsetTimebase() AvRational {
|
||||
return AvRational(ctxt.offset_timebase)
|
||||
func (ctxt *Context) OffsetTimebase() Rational {
|
||||
return Rational(ctxt.offset_timebase)
|
||||
}
|
||||
|
||||
func (ctxt *Context) Streams() *AvStream {
|
||||
return (*AvStream)(unsafe.Pointer(ctxt.streams))
|
||||
func (ctxt *Context) Streams() *Stream {
|
||||
return (*Stream)(unsafe.Pointer(ctxt.streams))
|
||||
}
|
||||
|
||||
func (ctxt *Context) Filename() string {
|
||||
@@ -67,16 +67,16 @@ func (ctxt *Context) Filename() string {
|
||||
// return C.GoString(ctxt.format_whitelist)
|
||||
// }
|
||||
|
||||
func (ctxt *Context) AudioCodecId() AvCodecId {
|
||||
return AvCodecId(ctxt.audio_codec_id)
|
||||
func (ctxt *Context) AudioCodecId() CodecId {
|
||||
return CodecId(ctxt.audio_codec_id)
|
||||
}
|
||||
|
||||
func (ctxt *Context) SubtitleCodecId() AvCodecId {
|
||||
return AvCodecId(ctxt.subtitle_codec_id)
|
||||
func (ctxt *Context) SubtitleCodecId() CodecId {
|
||||
return CodecId(ctxt.subtitle_codec_id)
|
||||
}
|
||||
|
||||
func (ctxt *Context) VideoCodecId() AvCodecId {
|
||||
return AvCodecId(ctxt.video_codec_id)
|
||||
func (ctxt *Context) VideoCodecId() CodecId {
|
||||
return CodecId(ctxt.video_codec_id)
|
||||
}
|
||||
|
||||
func (ctxt *Context) DurationEstimationMethod() AvDurationEstimationMethod {
|
||||
@@ -223,12 +223,12 @@ func (ctxt *Context) StartTimeRealtime() int64 {
|
||||
return int64(ctxt.start_time_realtime)
|
||||
}
|
||||
|
||||
func (ctxt *Context) Iformat() *AvInputFormat {
|
||||
return (*AvInputFormat)(unsafe.Pointer(ctxt.iformat))
|
||||
func (ctxt *Context) Iformat() *InputFormat {
|
||||
return (*InputFormat)(unsafe.Pointer(ctxt.iformat))
|
||||
}
|
||||
|
||||
func (ctxt *Context) Oformat() *AvOutputFormat {
|
||||
return (*AvOutputFormat)(unsafe.Pointer(ctxt.oformat))
|
||||
func (ctxt *Context) Oformat() *OutputFormat {
|
||||
return (*OutputFormat)(unsafe.Pointer(ctxt.oformat))
|
||||
}
|
||||
|
||||
func (ctxt *Context) PacketBuffer() *AvPacketList {
|
||||
|
||||
+14
-14
@@ -7,33 +7,33 @@ package avformat
|
||||
//#include <libavformat/avformat.h>
|
||||
import "C"
|
||||
|
||||
//AvRational av_stream_get_r_frame_rate (const AvStream *s)
|
||||
func (s *AvStream) AvStreamGetRFrameRate() AvRational {
|
||||
return (AvRational)(C.av_stream_get_r_frame_rate((*C.struct_AVStream)(s)))
|
||||
//Rational av_stream_get_r_frame_rate (const Stream *s)
|
||||
func (s *Stream) AvStreamGetRFrameRate() Rational {
|
||||
return (Rational)(C.av_stream_get_r_frame_rate((*C.struct_AVStream)(s)))
|
||||
}
|
||||
|
||||
//void av_stream_set_r_frame_rate (AvStream *s, AvRational r)
|
||||
func (s *AvStream) AvStreamSetRFrameRate(r AvRational) {
|
||||
//void av_stream_set_r_frame_rate (Stream *s, Rational r)
|
||||
func (s *Stream) AvStreamSetRFrameRate(r Rational) {
|
||||
C.av_stream_set_r_frame_rate((*C.struct_AVStream)(s), (C.struct_AVRational)(r))
|
||||
}
|
||||
|
||||
//struct AvCodecParserContext * av_stream_get_parser (const AvStream *s)
|
||||
func (s *AvStream) AvStreamGetParser() *AvCodecParserContext {
|
||||
return (*AvCodecParserContext)(C.av_stream_get_parser((*C.struct_AVStream)(s)))
|
||||
//struct CodecParserContext * av_stream_get_parser (const Stream *s)
|
||||
func (s *Stream) AvStreamGetParser() *CodecParserContext {
|
||||
return (*CodecParserContext)(C.av_stream_get_parser((*C.struct_AVStream)(s)))
|
||||
}
|
||||
|
||||
// //char * av_stream_get_recommended_encoder_configuration (const AvStream *s)
|
||||
// func (s *AvStream) AvStreamGetRecommendedEncoderConfiguration() string {
|
||||
// //char * av_stream_get_recommended_encoder_configuration (const Stream *s)
|
||||
// func (s *Stream) AvStreamGetRecommendedEncoderConfiguration() string {
|
||||
// return C.GoString(C.av_stream_get_recommended_encoder_configuration((*C.struct_AVStream)(s)))
|
||||
// }
|
||||
|
||||
// //void av_stream_set_recommended_encoder_configuration (AvStream *s, char *configuration)
|
||||
// func (s *AvStream) AvStreamSetRecommendedEncoderConfiguration( c string) {
|
||||
// //void av_stream_set_recommended_encoder_configuration (Stream *s, char *configuration)
|
||||
// func (s *Stream) AvStreamSetRecommendedEncoderConfiguration( c string) {
|
||||
// C.av_stream_set_recommended_encoder_configuration((*C.struct_AVStream)(s), C.CString(c))
|
||||
// }
|
||||
|
||||
//int64_t av_stream_get_end_pts (const AvStream *st)
|
||||
//int64_t av_stream_get_end_pts (const Stream *st)
|
||||
//Returns the pts of the last muxed packet + its duration.
|
||||
func (s *AvStream) AvStreamGetEndPts() int64 {
|
||||
func (s *Stream) AvStreamGetEndPts() int64 {
|
||||
return int64(C.av_stream_get_end_pts((*C.struct_AVStream)(s)))
|
||||
}
|
||||
|
||||
+63
-63
@@ -11,218 +11,218 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func (avs *AvStream) Codec() *AvCodecContext {
|
||||
return (*AvCodecContext)(unsafe.Pointer(avs.codec))
|
||||
func (avs *Stream) Codec() *CodecContext {
|
||||
return (*CodecContext)(unsafe.Pointer(avs.codec))
|
||||
}
|
||||
|
||||
func (avs *AvStream) Metadata() *AvDictionary {
|
||||
return (*AvDictionary)(unsafe.Pointer(avs.metadata))
|
||||
func (avs *Stream) Metadata() *Dictionary {
|
||||
return (*Dictionary)(unsafe.Pointer(avs.metadata))
|
||||
}
|
||||
|
||||
func (avs *AvStream) IndexEntries() *AvIndexEntry {
|
||||
func (avs *Stream) IndexEntries() *AvIndexEntry {
|
||||
return (*AvIndexEntry)(unsafe.Pointer(avs.index_entries))
|
||||
}
|
||||
|
||||
func (avs *AvStream) AttachedPic() AvPacket {
|
||||
return AvPacket(avs.attached_pic)
|
||||
func (avs *Stream) AttachedPic() Packet {
|
||||
return Packet(avs.attached_pic)
|
||||
}
|
||||
|
||||
func (avs *AvStream) SideData() *AvPacketSideData {
|
||||
func (avs *Stream) SideData() *AvPacketSideData {
|
||||
return (*AvPacketSideData)(unsafe.Pointer(avs.side_data))
|
||||
}
|
||||
|
||||
func (avs *AvStream) ProbeData() AvProbeData {
|
||||
func (avs *Stream) ProbeData() AvProbeData {
|
||||
return AvProbeData(avs.probe_data)
|
||||
}
|
||||
|
||||
func (avs *AvStream) AvgFrameRate() AvRational {
|
||||
return AvRational(avs.avg_frame_rate)
|
||||
func (avs *Stream) AvgFrameRate() Rational {
|
||||
return Rational(avs.avg_frame_rate)
|
||||
}
|
||||
|
||||
// func (avs *AvStream) DisplayAspectRatio() *AvRational {
|
||||
// return (*AvRational)(unsafe.Pointer(avs.display_aspect_ratio))
|
||||
// func (avs *Stream) DisplayAspectRatio() *Rational {
|
||||
// return (*Rational)(unsafe.Pointer(avs.display_aspect_ratio))
|
||||
// }
|
||||
|
||||
func (avs *AvStream) RFrameRate() AvRational {
|
||||
return AvRational(avs.r_frame_rate)
|
||||
func (avs *Stream) RFrameRate() Rational {
|
||||
return Rational(avs.r_frame_rate)
|
||||
}
|
||||
|
||||
func (avs *AvStream) SampleAspectRatio() AvRational {
|
||||
return AvRational(avs.sample_aspect_ratio)
|
||||
func (avs *Stream) SampleAspectRatio() Rational {
|
||||
return Rational(avs.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
func (avs *AvStream) TimeBase() AvRational {
|
||||
return AvRational(avs.time_base)
|
||||
func (avs *Stream) TimeBase() Rational {
|
||||
return Rational(avs.time_base)
|
||||
}
|
||||
|
||||
// func (avs *AvStream) RecommendedEncoderConfiguration() string {
|
||||
// func (avs *Stream) RecommendedEncoderConfiguration() string {
|
||||
// return C.GoString(avs.recommended_encoder_configuration)
|
||||
// }
|
||||
|
||||
func (avs *AvStream) Discard() AvDiscard {
|
||||
func (avs *Stream) Discard() AvDiscard {
|
||||
return AvDiscard(avs.discard)
|
||||
}
|
||||
|
||||
func (avs *AvStream) NeedParsing() AvStreamParseType {
|
||||
func (avs *Stream) NeedParsing() AvStreamParseType {
|
||||
return AvStreamParseType(avs.need_parsing)
|
||||
}
|
||||
|
||||
func (avs *AvStream) CodecInfoNbFrames() int {
|
||||
func (avs *Stream) CodecInfoNbFrames() int {
|
||||
return int(avs.codec_info_nb_frames)
|
||||
}
|
||||
|
||||
func (avs *AvStream) Disposition() int {
|
||||
func (avs *Stream) Disposition() int {
|
||||
return int(avs.disposition)
|
||||
}
|
||||
|
||||
func (avs *AvStream) EventFlags() int {
|
||||
func (avs *Stream) EventFlags() int {
|
||||
return int(avs.event_flags)
|
||||
}
|
||||
|
||||
func (avs *AvStream) Id() int {
|
||||
func (avs *Stream) Id() int {
|
||||
return int(avs.id)
|
||||
}
|
||||
|
||||
func (avs *AvStream) Index() int {
|
||||
func (avs *Stream) Index() int {
|
||||
return int(avs.index)
|
||||
}
|
||||
|
||||
func (avs *AvStream) InjectGlobalSideData() int {
|
||||
func (avs *Stream) InjectGlobalSideData() int {
|
||||
return int(avs.inject_global_side_data)
|
||||
}
|
||||
|
||||
func (avs *AvStream) LastIpDuration() int {
|
||||
func (avs *Stream) LastIpDuration() int {
|
||||
return int(avs.last_IP_duration)
|
||||
}
|
||||
|
||||
func (avs *AvStream) NbDecodedFrames() int {
|
||||
func (avs *Stream) NbDecodedFrames() int {
|
||||
return int(avs.nb_decoded_frames)
|
||||
}
|
||||
|
||||
func (avs *AvStream) NbIndexEntries() int {
|
||||
func (avs *Stream) NbIndexEntries() int {
|
||||
return int(avs.nb_index_entries)
|
||||
}
|
||||
|
||||
func (avs *AvStream) NbSideData() int {
|
||||
func (avs *Stream) NbSideData() int {
|
||||
return int(avs.nb_side_data)
|
||||
}
|
||||
|
||||
func (avs *AvStream) ProbePackets() int {
|
||||
func (avs *Stream) ProbePackets() int {
|
||||
return int(avs.probe_packets)
|
||||
}
|
||||
|
||||
func (avs *AvStream) PtsWrapBehavior() int {
|
||||
func (avs *Stream) PtsWrapBehavior() int {
|
||||
return int(avs.pts_wrap_behavior)
|
||||
}
|
||||
|
||||
func (avs *AvStream) RequestProbe() int {
|
||||
func (avs *Stream) RequestProbe() int {
|
||||
return int(avs.request_probe)
|
||||
}
|
||||
|
||||
func (avs *AvStream) SkipSamples() int {
|
||||
func (avs *Stream) SkipSamples() int {
|
||||
return int(avs.skip_samples)
|
||||
}
|
||||
|
||||
func (avs *AvStream) SkipToKeyframe() int {
|
||||
func (avs *Stream) SkipToKeyframe() int {
|
||||
return int(avs.skip_to_keyframe)
|
||||
}
|
||||
|
||||
func (avs *AvStream) StreamIdentifier() int {
|
||||
func (avs *Stream) StreamIdentifier() int {
|
||||
return int(avs.stream_identifier)
|
||||
}
|
||||
|
||||
func (avs *AvStream) UpdateInitialDurationsDone() int {
|
||||
func (avs *Stream) UpdateInitialDurationsDone() int {
|
||||
return int(avs.update_initial_durations_done)
|
||||
}
|
||||
|
||||
func (avs *AvStream) CurDts() int64 {
|
||||
func (avs *Stream) CurDts() int64 {
|
||||
return int64(avs.cur_dts)
|
||||
}
|
||||
|
||||
func (avs *AvStream) Duration() int64 {
|
||||
func (avs *Stream) Duration() int64 {
|
||||
return int64(avs.duration)
|
||||
}
|
||||
|
||||
// func (avs *AvStream) FirstDiscardSample() int64 {
|
||||
// func (avs *Stream) FirstDiscardSample() int64 {
|
||||
// return int64(avs.first_discard_sample)
|
||||
// }
|
||||
|
||||
func (avs *AvStream) FirstDts() int64 {
|
||||
func (avs *Stream) FirstDts() int64 {
|
||||
return int64(avs.first_dts)
|
||||
}
|
||||
|
||||
func (avs *AvStream) InterleaverChunkDuration() int64 {
|
||||
func (avs *Stream) InterleaverChunkDuration() int64 {
|
||||
return int64(avs.interleaver_chunk_duration)
|
||||
}
|
||||
|
||||
func (avs *AvStream) InterleaverChunkSize() int64 {
|
||||
func (avs *Stream) InterleaverChunkSize() int64 {
|
||||
return int64(avs.interleaver_chunk_size)
|
||||
}
|
||||
|
||||
// func (avs *AvStream) LastDiscardSample() int64 {
|
||||
// func (avs *Stream) LastDiscardSample() int64 {
|
||||
// return int64(avs.last_discard_sample)
|
||||
// }
|
||||
|
||||
func (avs *AvStream) LastDtsForOrderCheck() int64 {
|
||||
func (avs *Stream) LastDtsForOrderCheck() int64 {
|
||||
return int64(avs.last_dts_for_order_check)
|
||||
}
|
||||
|
||||
func (avs *AvStream) LastIpPts() int64 {
|
||||
func (avs *Stream) LastIpPts() int64 {
|
||||
return int64(avs.last_IP_pts)
|
||||
}
|
||||
|
||||
func (avs *AvStream) MuxTsOffset() int64 {
|
||||
func (avs *Stream) MuxTsOffset() int64 {
|
||||
return int64(avs.mux_ts_offset)
|
||||
}
|
||||
|
||||
func (avs *AvStream) NbFrames() int64 {
|
||||
func (avs *Stream) NbFrames() int64 {
|
||||
return int64(avs.nb_frames)
|
||||
}
|
||||
|
||||
func (avs *AvStream) PtsBuffer() int64 {
|
||||
func (avs *Stream) PtsBuffer() int64 {
|
||||
return int64(avs.pts_buffer[0])
|
||||
}
|
||||
|
||||
func (avs *AvStream) PtsReorderError() int64 {
|
||||
func (avs *Stream) PtsReorderError() int64 {
|
||||
return int64(avs.pts_reorder_error[0])
|
||||
}
|
||||
|
||||
func (avs *AvStream) PtsWrapReference() int64 {
|
||||
func (avs *Stream) PtsWrapReference() int64 {
|
||||
return int64(avs.pts_wrap_reference)
|
||||
}
|
||||
|
||||
// func (avs *AvStream) StartSkipSamples() int64 {
|
||||
// func (avs *Stream) StartSkipSamples() int64 {
|
||||
// return int64(avs.start_skip_samples)
|
||||
// }
|
||||
|
||||
func (avs *AvStream) StartTime() int64 {
|
||||
func (avs *Stream) StartTime() int64 {
|
||||
return int64(avs.start_time)
|
||||
}
|
||||
|
||||
func (avs *AvStream) Parser() *AvCodecParserContext {
|
||||
return (*AvCodecParserContext)(unsafe.Pointer(avs.parser))
|
||||
func (avs *Stream) Parser() *CodecParserContext {
|
||||
return (*CodecParserContext)(unsafe.Pointer(avs.parser))
|
||||
}
|
||||
|
||||
func (avs *AvStream) LastInPacketBuffer() *AvPacketList {
|
||||
func (avs *Stream) LastInPacketBuffer() *AvPacketList {
|
||||
return (*AvPacketList)(unsafe.Pointer(avs.last_in_packet_buffer))
|
||||
}
|
||||
|
||||
// func (avs *AvStream) PrivPts() *FFFrac {
|
||||
// func (avs *Stream) PrivPts() *FFFrac {
|
||||
// return (*FFFrac)(unsafe.Pointer(avs.priv_pts))
|
||||
// }
|
||||
|
||||
func (avs *AvStream) DtsMisordered() uint8 {
|
||||
func (avs *Stream) DtsMisordered() uint8 {
|
||||
return uint8(avs.dts_misordered)
|
||||
}
|
||||
|
||||
func (avs *AvStream) DtsOrdered() uint8 {
|
||||
func (avs *Stream) DtsOrdered() uint8 {
|
||||
return uint8(avs.dts_ordered)
|
||||
}
|
||||
|
||||
func (avs *AvStream) PtsReorderErrorCount() uint8 {
|
||||
func (avs *Stream) PtsReorderErrorCount() uint8 {
|
||||
return uint8(avs.pts_reorder_error_count[0])
|
||||
}
|
||||
|
||||
func (avs *AvStream) IndexEntriesAllocatedSize() uint {
|
||||
func (avs *Stream) IndexEntriesAllocatedSize() uint {
|
||||
return uint(avs.index_entries_allocated_size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user