goav | Golang bindings for FFmpeg ( This repository | Video Utils library
kandi X-RAY | goav Summary
kandi X-RAY | goav Summary
Golang binding for FFmpeg. A comprehensive binding to the ffmpeg video/audio manipulation library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of goav
goav Key Features
goav Examples and Code Snippets
Community Discussions
Trending Discussions on goav
QUESTION
I'm writing an app for the windows platform using FFmpeg and it's golang wrapper goav, but I'm having trouble understanding how to use the C pointers to gain access to an array.
I'm trying to get the streams stored in the AVFormatContext class to use in go, and eventually add frames to a texture in OpenGl to make a video player with cool transitions.
I think understanding how to cast and access the C data will make coding this a lot easier.
I've stripped out all the relevant parts of the C code, the wrapper and my code, shown below:
C code - libavformat/avformat.h
...ANSWER
Answered 2018-Apr-24 at 13:12As you noticed, the problem is in the following code:
QUESTION
I'm writing an app for the windows platform using FFmpeg and it's golang wrapper goav, but I'm having trouble understanding how to use the C pointers to gain access to the data array they point to.
I'm trying to get the data stored in the AVFrame class and use Go to write it to a file, and eventually a texture in OpenGl to make a video player with cool transitions.
I think understanding how to cast and access the C data will make coding this a lot easier.
I've stripped out all the relevant parts of the C code, the wrapper and my code, shown below:
C code - libavutil/frame.h
...ANSWER
Answered 2018-Apr-22 at 01:34Since the library author did not construct a slice header for you to work with you will instead need to cast the return value you get to an unsafe.Pointer
and then to a uintptr
this will allow you to perform pointer arithmetic on it to get elements later in memory.
Here's some example code that should run as-is on the go playground.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install goav
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page