Added SetFrameBuffer for Video and Camera
This commit is contained in:
parent
3f4ae6eb23
commit
2d72a27288
3 changed files with 47 additions and 39 deletions
6
video.go
6
video.go
|
@ -73,6 +73,12 @@ func (video *Video) FrameBuffer() []byte {
|
|||
return video.framebuffer
|
||||
}
|
||||
|
||||
// Sets the framebuffer to the given byte array. Note that "buffer" must be large enough
|
||||
// to store one frame of video data which is width*height*3.
|
||||
func (video *Video) SetFrameBuffer(buffer []byte) {
|
||||
video.framebuffer = buffer
|
||||
}
|
||||
|
||||
// Creates a new Video struct.
|
||||
// Uses ffprobe to get video information and fills in the Video struct with this data.
|
||||
func NewVideo(filename string) (*Video, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue