With the booming development of live video broadcasting industry, the application of live video on-demand platform EasyDSS in this field has also been rapidly popularized. EasyDSS Internet video cloud service has video live, on-demand, video pull and push, time shift, video watch and other features, support HTTP, HLS, RTMP and other broadcast protocols, and compatible with multiple terminals, such as Windows, Android, iOS, Mac and so on.

The callback in AvFilter, the new pull and push library used by EasyDSS, returns the CHAR * type of C language, which needs to be converted to the structure defined in C language in GO, and finally converted to GO language structure for use in GO layer. Today we are going to share the technical implementation process.

1) Export GO function as C language function.

2) The parameter that needs to be converted is MSG, of type uintptr. Call the GO function in CGO.

3) Convert the Uintptr to a structure defined in C language.

4) Then convert the types in the C language structure into corresponding GO types using CGO.

5) Finally assign the value to the GO structure, which can be easily used in the GO layer.

EasyDSS video platform is very suitable for OTT TV, IPTV, Internet education, video chat, live broadcast and VOD and other applications, in smart classroom, online education, virtual live broadcast, urban slow live broadcast, scenic spot live broadcast, UAV push flow and other scenes have landing applications. Especially in the uav scene, uav urban aerial photography, forest fire prevention, straw burning, power inspection and other regulatory applications can be realized through EasyDSS+RTMP flow pushing.