Open mightZhong opened 4 years ago
Were you able to fix it?
After building the main media-server-go
, I executed the command go build
in the webrtc-to-rtmp/
directory and got the following:
$ go build
# github.com/notedit/media-server-go-demo/webrtc-to-rtmp
./server.go:124:30: cannot use func literal (type func([]byte, uint)) as type func([]byte, uint64) in argument to videoTrack.OnMediaFrame
./server.go:139:30: cannot use func literal (type func([]byte, uint)) as type func([]byte, uint64) in argument to audioTrack.OnMediaFrame
@jzvi12 replace uint by uint64 in the server.go file and now it should compile
In commit: f0bcbc9 in the mediaframemultiplexer.go
file the callback logic was disable.
Because in the media-server project (https://github.com/medooze/media-server) not the media-server-go project, some changes where made to media-server/include/media.h
file.
Amongst other things the GetData()
method gets overloaded in a clever way to optimize performance. But this is to much for the SWIG compiler, which then creates 3 functions, one being a switch for the other two, but returning an interface{}
instead of a pointer.
What is to do:
apt install swig
media-server/include/media.h
and remove follow line const BYTE* GetData() const { return buffer->GetData();}
currently at line 166wrapper/mediaserver.i
and add %include "../media-server/include/media.h"
before %include "../media-server/include/acumulator.h"
currently at line 965swig -go -c++ -cgo -intgosize 64 mediaserver.i
mediaframemultiplexer.go
import fmt
and unsafe
and enable the code under OnMediaFrame
@marcelhencke Do you have some free time to support media-server-go developing? I am a bit busy these days.
@marcelhencke Do you have some free time to support media-server-go developing? I am a bit busy these days.
I don't have much free time myself. But since I want to build on this project and I need the GStreamer support, I would be happy to support the project and maintain it's functionality.
Hi , I tested the webrtc-to-rtmp demo, but it can't work. Following is my test steps
I wondering if there is something wrong in my steps, any suggestion is appreciated~