mirror of
https://github.com/giorgisio/goav.git
synced 2026-10-19 16:14:41 +00:00
update comment on exported function
This commit is contained in:
@@ -3,6 +3,9 @@ Golang binding for FFmpeg
|
||||
|
||||
A comprehensive binding to the ffmpeg video/audio manipulation library.
|
||||
|
||||
Reviving this project -- if you like to contribute, please email me habtom@giorgis.io
|
||||
|
||||
|
||||
[](https://godoc.org/github.com/giorgisio/goav)
|
||||
|
||||
## Usage
|
||||
|
||||
+2
-2
@@ -60,12 +60,12 @@ func (c *Codec) AvCodecGetMaxLowres() int {
|
||||
return int(C.av_codec_get_max_lowres((*C.struct_AVCodec)(c)))
|
||||
}
|
||||
|
||||
//If c is NULL, returns the first registered codec, if c is non-NULL,
|
||||
// AvCodecNext If c is NULL, returns the first registered codec, if c is non-NULL,
|
||||
func (c *Codec) AvCodecNext() *Codec {
|
||||
return (*Codec)(C.av_codec_next((*C.struct_AVCodec)(c)))
|
||||
}
|
||||
|
||||
//Register the codec codec and initialize libavcodec.
|
||||
// Register the codec codec and initialize libavcodec.
|
||||
func (c *Codec) AvcodecRegister() {
|
||||
C.avcodec_register((*C.struct_AVCodec)(c))
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
|
||||
// Giorgis (habtom@giorgis.io)
|
||||
|
||||
package avcodec
|
||||
|
||||
//#cgo pkg-config: libavcodec
|
||||
@@ -10,41 +9,42 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//Setup the picture fields based on the specified image parameters and the provided image data buffer.
|
||||
// AvpictureFill - Setup the picture fields based on the specified image parameters and the provided image data buffer.
|
||||
func (p *Picture) AvpictureFill(pt *uint8, pf PixelFormat, w, h int) int {
|
||||
return int(C.avpicture_fill((*C.struct_AVPicture)(p), (*C.uint8_t)(pt), (C.enum_AVPixelFormat)(pf), C.int(w), C.int(h)))
|
||||
}
|
||||
|
||||
//Copy pixel data from an Picture into a buffer.
|
||||
// AvpictureLayout copies pixel data from an Picture into a buffer.
|
||||
func (p *Picture) AvpictureLayout(pf PixelFormat, w, h int, d *string, ds int) int {
|
||||
return int(C.avpicture_layout((*C.struct_AVPicture)(p), (C.enum_AVPixelFormat)(pf), C.int(w), C.int(h), (*C.uchar)(unsafe.Pointer(d)), C.int(ds)))
|
||||
}
|
||||
|
||||
//Copy image src to dst.
|
||||
// AvPictureCopy -Copy image src to dst.
|
||||
func (p *Picture) AvPictureCopy(d *Picture, pf PixelFormat, w, h int) {
|
||||
C.av_picture_copy((*C.struct_AVPicture)(d), (*C.struct_AVPicture)(p), (C.enum_AVPixelFormat)(pf), C.int(w), C.int(h))
|
||||
}
|
||||
|
||||
//Crop image top and left side.
|
||||
// AvPictureCrop - Crop image top and left side.
|
||||
func (p *Picture) AvPictureCrop(d *Picture, pf PixelFormat, t, l int) int {
|
||||
return int(C.av_picture_crop((*C.struct_AVPicture)(d), (*C.struct_AVPicture)(p), (C.enum_AVPixelFormat)(pf), C.int(t), C.int(l)))
|
||||
}
|
||||
|
||||
//Pad image.
|
||||
// AvPicturePad - Pad image.
|
||||
func (p *Picture) AvPicturePad(d *Picture, h, w int, pf PixelFormat, t, b, l, r int, c *int) int {
|
||||
return int(C.av_picture_pad((*C.struct_AVPicture)(d), (*C.struct_AVPicture)(p), (C.int)(h), (C.int)(w), (C.enum_AVPixelFormat)(pf), (C.int)(t), (C.int)(b), (C.int)(l), (C.int)(r), (*C.int)(unsafe.Pointer(c))))
|
||||
}
|
||||
|
||||
//Free a picture previously allocated by avpicture_alloc(). Allocate memory for the pixels of a picture and setup the Picture fields for it.
|
||||
// AvpictureAlloc - Free a picture previously allocated by avpicture_alloc(). Allocate memory for the pixels of a picture and setup the Picture fields for it.
|
||||
func (p *Picture) AvpictureAlloc(t PixelFormat, w, h int) int {
|
||||
return int(C.avpicture_alloc((*C.struct_AVPicture)(p), (C.enum_AVPixelFormat)(t), C.int(w), C.int(h)))
|
||||
}
|
||||
|
||||
// AvpictureFree - Free
|
||||
func (p *Picture) AvpictureFree() {
|
||||
C.avpicture_free((*C.struct_AVPicture)(p))
|
||||
}
|
||||
|
||||
//Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format.
|
||||
// AvpictureGetSize - Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format.
|
||||
func AvpictureGetSize(pf PixelFormat, w, h int) int {
|
||||
return int(C.avpicture_get_size((C.enum_AVPixelFormat)(pf), C.int(w), C.int(h)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user