@@ -587,6 +587,7 @@ fn wire_microphone_volume_impl(port_: MessagePort) {
587587fn wire_dispose_track_impl (
588588 port_ : MessagePort ,
589589 track_id : impl Wire2Api < String > + UnwindSafe ,
590+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
590591 kind : impl Wire2Api < MediaType > + UnwindSafe ,
591592) {
592593 FLUTTER_RUST_BRIDGE_HANDLER . wrap :: < _ , _ , _ , ( ) > (
@@ -597,14 +598,18 @@ fn wire_dispose_track_impl(
597598 } ,
598599 move || {
599600 let api_track_id = track_id. wire2api ( ) ;
601+ let api_peer_id = peer_id. wire2api ( ) ;
600602 let api_kind = kind. wire2api ( ) ;
601- move |task_callback| Ok ( dispose_track ( api_track_id, api_kind) )
603+ move |task_callback| {
604+ Ok ( dispose_track ( api_track_id, api_peer_id, api_kind) )
605+ }
602606 } ,
603607 )
604608}
605609fn wire_track_state_impl (
606610 port_ : MessagePort ,
607611 track_id : impl Wire2Api < String > + UnwindSafe ,
612+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
608613 kind : impl Wire2Api < MediaType > + UnwindSafe ,
609614) {
610615 FLUTTER_RUST_BRIDGE_HANDLER . wrap :: < _ , _ , _ , TrackState > (
@@ -615,14 +620,18 @@ fn wire_track_state_impl(
615620 } ,
616621 move || {
617622 let api_track_id = track_id. wire2api ( ) ;
623+ let api_peer_id = peer_id. wire2api ( ) ;
618624 let api_kind = kind. wire2api ( ) ;
619- move |task_callback| track_state ( api_track_id, api_kind)
625+ move |task_callback| {
626+ track_state ( api_track_id, api_peer_id, api_kind)
627+ }
620628 } ,
621629 )
622630}
623631fn wire_set_track_enabled_impl (
624632 port_ : MessagePort ,
625633 track_id : impl Wire2Api < String > + UnwindSafe ,
634+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
626635 kind : impl Wire2Api < MediaType > + UnwindSafe ,
627636 enabled : impl Wire2Api < bool > + UnwindSafe ,
628637) {
@@ -634,17 +643,24 @@ fn wire_set_track_enabled_impl(
634643 } ,
635644 move || {
636645 let api_track_id = track_id. wire2api ( ) ;
646+ let api_peer_id = peer_id. wire2api ( ) ;
637647 let api_kind = kind. wire2api ( ) ;
638648 let api_enabled = enabled. wire2api ( ) ;
639649 move |task_callback| {
640- set_track_enabled ( api_track_id, api_kind, api_enabled)
650+ set_track_enabled (
651+ api_track_id,
652+ api_peer_id,
653+ api_kind,
654+ api_enabled,
655+ )
641656 }
642657 } ,
643658 )
644659}
645660fn wire_clone_track_impl (
646661 port_ : MessagePort ,
647662 track_id : impl Wire2Api < String > + UnwindSafe ,
663+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
648664 kind : impl Wire2Api < MediaType > + UnwindSafe ,
649665) {
650666 FLUTTER_RUST_BRIDGE_HANDLER . wrap :: < _ , _ , _ , MediaStreamTrack > (
@@ -655,13 +671,17 @@ fn wire_clone_track_impl(
655671 } ,
656672 move || {
657673 let api_track_id = track_id. wire2api ( ) ;
674+ let api_peer_id = peer_id. wire2api ( ) ;
658675 let api_kind = kind. wire2api ( ) ;
659- move |task_callback| clone_track ( api_track_id, api_kind)
676+ move |task_callback| {
677+ clone_track ( api_track_id, api_peer_id, api_kind)
678+ }
660679 } ,
661680 )
662681}
663682fn wire_register_track_observer_impl (
664683 port_ : MessagePort ,
684+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
665685 track_id : impl Wire2Api < String > + UnwindSafe ,
666686 kind : impl Wire2Api < MediaType > + UnwindSafe ,
667687) {
@@ -672,11 +692,13 @@ fn wire_register_track_observer_impl(
672692 mode : FfiCallMode :: Stream ,
673693 } ,
674694 move || {
695+ let api_peer_id = peer_id. wire2api ( ) ;
675696 let api_track_id = track_id. wire2api ( ) ;
676697 let api_kind = kind. wire2api ( ) ;
677698 move |task_callback| {
678699 register_track_observer (
679700 task_callback. stream_sink :: < _ , TrackEvent > ( ) ,
701+ api_peer_id,
680702 api_track_id,
681703 api_kind,
682704 )
@@ -701,6 +723,7 @@ fn wire_set_on_device_changed_impl(port_: MessagePort) {
701723fn wire_create_video_sink_impl (
702724 port_ : MessagePort ,
703725 sink_id : impl Wire2Api < i64 > + UnwindSafe ,
726+ peer_id : impl Wire2Api < Option < u64 > > + UnwindSafe ,
704727 track_id : impl Wire2Api < String > + UnwindSafe ,
705728 callback_ptr : impl Wire2Api < u64 > + UnwindSafe ,
706729 texture_id : impl Wire2Api < i64 > + UnwindSafe ,
@@ -713,13 +736,15 @@ fn wire_create_video_sink_impl(
713736 } ,
714737 move || {
715738 let api_sink_id = sink_id. wire2api ( ) ;
739+ let api_peer_id = peer_id. wire2api ( ) ;
716740 let api_track_id = track_id. wire2api ( ) ;
717741 let api_callback_ptr = callback_ptr. wire2api ( ) ;
718742 let api_texture_id = texture_id. wire2api ( ) ;
719743 move |task_callback| {
720744 create_video_sink (
721745 task_callback. stream_sink :: < _ , TextureEvent > ( ) ,
722746 api_sink_id,
747+ api_peer_id,
723748 api_track_id,
724749 api_callback_ptr,
725750 api_texture_id,
@@ -1055,6 +1080,7 @@ impl support::IntoDart for MediaStreamTrack {
10551080 fn into_dart ( self ) -> support:: DartAbi {
10561081 vec ! [
10571082 self . id. into_into_dart( ) . into_dart( ) ,
1083+ self . peer_id. into_dart( ) ,
10581084 self . device_id. into_into_dart( ) . into_dart( ) ,
10591085 self . kind. into_into_dart( ) . into_dart( ) ,
10601086 self . enabled. into_into_dart( ) . into_dart( ) ,
@@ -1950,46 +1976,51 @@ mod io {
19501976 pub extern "C" fn wire_dispose_track (
19511977 port_ : i64 ,
19521978 track_id : * mut wire_uint_8_list ,
1979+ peer_id : * mut u64 ,
19531980 kind : i32 ,
19541981 ) {
1955- wire_dispose_track_impl ( port_, track_id, kind)
1982+ wire_dispose_track_impl ( port_, track_id, peer_id , kind)
19561983 }
19571984
19581985 #[ no_mangle]
19591986 pub extern "C" fn wire_track_state (
19601987 port_ : i64 ,
19611988 track_id : * mut wire_uint_8_list ,
1989+ peer_id : * mut u64 ,
19621990 kind : i32 ,
19631991 ) {
1964- wire_track_state_impl ( port_, track_id, kind)
1992+ wire_track_state_impl ( port_, track_id, peer_id , kind)
19651993 }
19661994
19671995 #[ no_mangle]
19681996 pub extern "C" fn wire_set_track_enabled (
19691997 port_ : i64 ,
19701998 track_id : * mut wire_uint_8_list ,
1999+ peer_id : * mut u64 ,
19712000 kind : i32 ,
19722001 enabled : bool ,
19732002 ) {
1974- wire_set_track_enabled_impl ( port_, track_id, kind, enabled)
2003+ wire_set_track_enabled_impl ( port_, track_id, peer_id , kind, enabled)
19752004 }
19762005
19772006 #[ no_mangle]
19782007 pub extern "C" fn wire_clone_track (
19792008 port_ : i64 ,
19802009 track_id : * mut wire_uint_8_list ,
2010+ peer_id : * mut u64 ,
19812011 kind : i32 ,
19822012 ) {
1983- wire_clone_track_impl ( port_, track_id, kind)
2013+ wire_clone_track_impl ( port_, track_id, peer_id , kind)
19842014 }
19852015
19862016 #[ no_mangle]
19872017 pub extern "C" fn wire_register_track_observer (
19882018 port_ : i64 ,
2019+ peer_id : * mut u64 ,
19892020 track_id : * mut wire_uint_8_list ,
19902021 kind : i32 ,
19912022 ) {
1992- wire_register_track_observer_impl ( port_, track_id, kind)
2023+ wire_register_track_observer_impl ( port_, peer_id , track_id, kind)
19932024 }
19942025
19952026 #[ no_mangle]
@@ -2001,13 +2032,15 @@ mod io {
20012032 pub extern "C" fn wire_create_video_sink (
20022033 port_ : i64 ,
20032034 sink_id : i64 ,
2035+ peer_id : * mut u64 ,
20042036 track_id : * mut wire_uint_8_list ,
20052037 callback_ptr : u64 ,
20062038 texture_id : i64 ,
20072039 ) {
20082040 wire_create_video_sink_impl (
20092041 port_,
20102042 sink_id,
2043+ peer_id,
20112044 track_id,
20122045 callback_ptr,
20132046 texture_id,
@@ -2085,6 +2118,11 @@ mod io {
20852118 support:: new_leak_box_ptr ( wire_RtcConfiguration:: new_with_null_ptr ( ) )
20862119 }
20872120
2121+ #[ no_mangle]
2122+ pub extern "C" fn new_box_autoadd_u64_0 ( value : u64 ) -> * mut u64 {
2123+ support:: new_leak_box_ptr ( value)
2124+ }
2125+
20882126 #[ no_mangle]
20892127 pub extern "C" fn new_box_autoadd_video_constraints_0 (
20902128 ) -> * mut wire_VideoConstraints {
@@ -2261,6 +2299,11 @@ mod io {
22612299 Wire2Api :: < RtcConfiguration > :: wire2api ( * wrap) . into ( )
22622300 }
22632301 }
2302+ impl Wire2Api < u64 > for * mut u64 {
2303+ fn wire2api ( self ) -> u64 {
2304+ unsafe { * support:: box_from_leak_ptr ( self ) }
2305+ }
2306+ }
22642307 impl Wire2Api < VideoConstraints > for * mut wire_VideoConstraints {
22652308 fn wire2api ( self ) -> VideoConstraints {
22662309 let wrap = unsafe { support:: box_from_leak_ptr ( self ) } ;
0 commit comments