mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-08 17:10:08 +08:00
2023-11-05 09:24:57 CST W45D0
This commit is contained in:
@@ -25,7 +25,7 @@ func AvMediacodecDefaultInit(avctx *AVCodecContext, ctx *AVMediaCodecContext, su
|
|||||||
(*C.struct_AVMediaCodecContext)(ctx), VoidPointer(surface)))
|
(*C.struct_AVMediaCodecContext)(ctx), VoidPointer(surface)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvMediacodecDefaultFree frees the MediaCodec context
|
// AvMediacodecDefaultFree frees the MediaCodec context.
|
||||||
func AvMediacodecDefaultFree(avctx *AVCodecContext) {
|
func AvMediacodecDefaultFree(avctx *AVCodecContext) {
|
||||||
C.av_mediacodec_default_free((*C.struct_AVCodecContext)(avctx))
|
C.av_mediacodec_default_free((*C.struct_AVCodecContext)(avctx))
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ func AvutilLicense() string {
|
|||||||
return C.GoString(C.avutil_license())
|
return C.GoString(C.avutil_license())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Media Type
|
// Media Type.
|
||||||
type AVMediaType = C.enum_AVMediaType
|
type AVMediaType = C.enum_AVMediaType
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@@ -27,7 +27,7 @@ func AVUNERROR(e int32) int32 {
|
|||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error handling
|
// Error handling.
|
||||||
const (
|
const (
|
||||||
AVERROR_BSF_NOT_FOUND = int32(C.AVERROR_BSF_NOT_FOUND)
|
AVERROR_BSF_NOT_FOUND = int32(C.AVERROR_BSF_NOT_FOUND)
|
||||||
AVERROR_BUG = int32(C.AVERROR_BUG)
|
AVERROR_BUG = int32(C.AVERROR_BUG)
|
||||||
|
@@ -1361,7 +1361,7 @@ func AvFrameApplyCropping(frame *AVFrame, flags int32) int32 {
|
|||||||
return (int32)(C.av_frame_apply_cropping((*C.struct_AVFrame)(frame), (C.int)(flags)))
|
return (int32)(C.av_frame_apply_cropping((*C.struct_AVFrame)(frame), (C.int)(flags)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvFrameSideDataName returns a string identifying the side data type
|
// AvFrameSideDataName returns a string identifying the side data type.
|
||||||
func AvFrameSideDataName(_type AVFrameSideDataType) string {
|
func AvFrameSideDataName(_type AVFrameSideDataType) string {
|
||||||
return C.GoString(C.av_frame_side_data_name((C.enum_AVFrameSideDataType)(_type)))
|
return C.GoString(C.av_frame_side_data_name((C.enum_AVFrameSideDataType)(_type)))
|
||||||
}
|
}
|
||||||
|
@@ -193,12 +193,12 @@ func AvLogOnce(avcl CVoidPointer, initialLevel, subsequentLevel int32, state *in
|
|||||||
|
|
||||||
// NONEED: av_vlog
|
// NONEED: av_vlog
|
||||||
|
|
||||||
// AvLogGetLevel gets the current log level
|
// AvLogGetLevel gets the current log level.
|
||||||
func AvLogGetLevel() int32 {
|
func AvLogGetLevel() int32 {
|
||||||
return (int32)(C.av_log_get_level())
|
return (int32)(C.av_log_get_level())
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvLogSetLevel sets the log level
|
// AvLogSetLevel sets the log level.
|
||||||
func AvLogSetLevel(level int32) {
|
func AvLogSetLevel(level int32) {
|
||||||
C.av_log_set_level((C.int)(level))
|
C.av_log_set_level((C.int)(level))
|
||||||
}
|
}
|
||||||
@@ -206,14 +206,14 @@ func AvLogSetLevel(level int32) {
|
|||||||
// typedef void (*av_log_callback_func)(void*, int, const char*, va_list);
|
// typedef void (*av_log_callback_func)(void*, int, const char*, va_list);
|
||||||
type AVLogCallbackFunc = C.av_log_callback_func
|
type AVLogCallbackFunc = C.av_log_callback_func
|
||||||
|
|
||||||
// AvLogSetCallback sets the logging callback
|
// AvLogSetCallback sets the logging callback.
|
||||||
func AvLogSetCallback(f AVLogCallbackFunc) {
|
func AvLogSetCallback(f AVLogCallbackFunc) {
|
||||||
C.av_log_set_callback(f)
|
C.av_log_set_callback(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NONEED: av_log_default_callback
|
// NONEED: av_log_default_callback
|
||||||
|
|
||||||
// AvDefaultItemName returns the context name
|
// AvDefaultItemName returns the context name.
|
||||||
func AvDefaultItemName(ctx CVoidPointer) string {
|
func AvDefaultItemName(ctx CVoidPointer) string {
|
||||||
return C.GoString(C.av_default_item_name(VoidPointer(ctx)))
|
return C.GoString(C.av_default_item_name(VoidPointer(ctx)))
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,7 @@ func AvD2Q(d float64, max int32) AVRational {
|
|||||||
// return One of the following values:
|
// return One of the following values:
|
||||||
// 1 if `q1` is nearer to `q` than `q2`
|
// 1 if `q1` is nearer to `q` than `q2`
|
||||||
// -1 if `q2` is nearer to `q` than `q1`
|
// -1 if `q2` is nearer to `q` than `q1`
|
||||||
// 0 if they have the same distance
|
// 0 if they have the same distance.
|
||||||
func AvNearerQ(q, q1, q2 AVRational) int32 {
|
func AvNearerQ(q, q1, q2 AVRational) int32 {
|
||||||
return (int32)(C.av_nearer_q((C.struct_AVRational)(q),
|
return (int32)(C.av_nearer_q((C.struct_AVRational)(q),
|
||||||
(C.struct_AVRational)(q1), (C.struct_AVRational)(q2)))
|
(C.struct_AVRational)(q1), (C.struct_AVRational)(q2)))
|
||||||
|
@@ -130,7 +130,7 @@ func AvTimecodeInitFromString(tc *AVTimecode, rate AVRational, str string, logCt
|
|||||||
(*C.char)(strPtr), VoidPointer(logCtx)))
|
(*C.char)(strPtr), VoidPointer(logCtx)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvTimecodeCheckFrameRate checks if the timecode feature is available for the given frame rate
|
// AvTimecodeCheckFrameRate checks if the timecode feature is available for the given frame rate.
|
||||||
func AvTimecodeCheckFrameRate(rate AVRational) int32 {
|
func AvTimecodeCheckFrameRate(rate AVRational) int32 {
|
||||||
return (int32)(C.av_timecode_check_frame_rate((C.struct_AVRational)(rate)))
|
return (int32)(C.av_timecode_check_frame_rate((C.struct_AVRational)(rate)))
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@ func AvTwofishInit(d *AVTWOFISH, key *uint8, keyBits int32) int32 {
|
|||||||
(*C.uint8_t)(key), (C.int)(keyBits)))
|
(*C.uint8_t)(key), (C.int)(keyBits)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvTwofishCrypt encrypts or decrypts a buffer using a previously initialized context
|
// AvTwofishCrypt encrypts or decrypts a buffer using a previously initialized context.
|
||||||
func AvTwofishCrypt(d *AVTWOFISH, dst, src *uint8, count int32, iv *uint8, decrypt int32) {
|
func AvTwofishCrypt(d *AVTWOFISH, dst, src *uint8, count int32, iv *uint8, decrypt int32) {
|
||||||
C.av_twofish_crypt((*C.struct_AVTWOFISH)(d),
|
C.av_twofish_crypt((*C.struct_AVTWOFISH)(d),
|
||||||
(*C.uint8_t)(dst), (*C.uint8_t)(src),
|
(*C.uint8_t)(dst), (*C.uint8_t)(src),
|
||||||
|
@@ -14,7 +14,7 @@ const (
|
|||||||
SWR_FLAG_RESAMPLE = C.SWR_FLAG_RESAMPLE
|
SWR_FLAG_RESAMPLE = C.SWR_FLAG_RESAMPLE
|
||||||
)
|
)
|
||||||
|
|
||||||
// Dithering algorithms
|
// Dithering algorithms.
|
||||||
type SwrDitherType = C.enum_SwrDitherType
|
type SwrDitherType = C.enum_SwrDitherType
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -33,7 +33,7 @@ const (
|
|||||||
SWR_DITHER_NB = SwrDitherType(C.SWR_DITHER_NB)
|
SWR_DITHER_NB = SwrDitherType(C.SWR_DITHER_NB)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Resampling Engines
|
// Resampling Engines.
|
||||||
type SwrEngine = C.enum_SwrEngine
|
type SwrEngine = C.enum_SwrEngine
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -42,7 +42,7 @@ const (
|
|||||||
SWR_ENGINE_NB = SwrEngine(C.SWR_ENGINE_NB)
|
SWR_ENGINE_NB = SwrEngine(C.SWR_ENGINE_NB)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Resampling Filter Types
|
// Resampling Filter Types.
|
||||||
type SwrFilterType = C.enum_SwrFilterType
|
type SwrFilterType = C.enum_SwrFilterType
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Reference in New Issue
Block a user