VLprojects / mediasoup-client-swift

Swift wrapper for libmediasoupclient
MIT License
46 stars 19 forks source link

Crash when setting codec in createProducer #12

Closed papaz0rgl closed 1 year ago

papaz0rgl commented 1 year ago

Hello, I'm trying to set the video codec when creating the producer by passing a json in the codec parameter but it crashes systematically. It works perfectly well when the parameter is nil.

Any idea ? I try to understand the crash and it looks like some memory corruption that leads to a crash later in the matchCodecs method. Maybe something to do with concurrency ?

For info, this is the kind of json I'm using : "{ "kind" : "video", "rtcpFeedback" : [ { "type" : "nack", "parameter" : "" }, { "type" : "nack", "parameter" : "pli" }, { "type" : "ccm", "parameter" : "fir" }, { "type" : "goog-remb", "parameter" : "" }, { "type" : "transport-cc", "parameter" : "" } ], "parameters" : { "packetization-mode" : 1, "level-asymmetry-allowed" : 1, "profile-level-id" : "42e01f" }, "clockRate" : 90000, "preferredPayloadType" : 103, "mimeType" : "video\/H264" }"

fedulvtubudul commented 1 year ago

Fixed in version 0.4.1, please check

papaz0rgl commented 1 year ago

Thanks , it works !! I'm able to select vp8 or h264 now. Unfortunately simulcast still don't work in H264 for me. Have you see it working on your side ?

fedulvtubudul commented 1 year ago

Unfortunately simulcast still don't work in H264 for me. Have you see it working on your side ?

Yes, simulcast works for me on h264. But now I have similar problem. In case I select VP8 (a non-default) over h264 (default, listed on the first place in router capabilities) it works only without simulcast. If I create additional video layers, other clients do not receive any data and see no video. As I use only one layer, outgoing video works with VP8. But now I don't have time to dive deeper into this problem.

papaz0rgl commented 1 year ago

Thanks for your answer, I will make some test to see if changing the default change something.