[asterisk-dev] Fwd: How about to support multi video tracks of the webrtc sfu?

Joshua C. Colp jcolp at digium.com
Tue Dec 4 09:51:39 CST 2018


On Tue, Dec 4, 2018, at 11:48 AM, Xiemin Chen wrote:
> At last I find the root cause and have a path with it, after my test seems
> everything works fine with only a few lines of code change.
> 
>  I want to know your ideas about its correctness and how to commit this
> patch:
> 
> Root Cause:
> 
> Different video streams have the same name(ast_stream_get_name() returns
> "video" for every video stream) which causes the is_video_dest() function
> in bridge_softmix.c fails to distinguish different video streams.
> 
> Solution:
> 
> To use the "MSID:LABEL" metadata in stream instead of its name. For
> example, in append_source_steams() function, change from:
> 
> if (ast_asprintf(&stream_clone_name, "%s_%s_%s",
> SOFTBRIDGE_VIDEO_DEST_PREFIX,
>     channel_name, ast_stream_get_name(stream)) < 0)
> 
> TO:
> 
> if (ast_asprintf(&stream_clone_name, "%s_%s_%s",
> SOFTBRIDGE_VIDEO_DEST_PREFIX,
>     channel_name, ast_stream_get_metadata(stream, "MSID:LABEL")) < 0)

I think this is fine at first glance. As for providing a patch, the process is documented on the wiki[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

-- 
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list