use datachannel to create proper rtc_track_init (#1117)

* use datachannel to create proper rtc_track_init

* fix lint

* fix lint
This commit is contained in:
Henry Ruhs
2026-05-15 19:14:36 +02:00
committed by GitHub
parent 0019d3ad0f
commit 95435f842c
4 changed files with 61 additions and 48 deletions
+20
View File
@@ -182,6 +182,8 @@ def init_ctypes(library : ctypes.CDLL) -> ctypes.CDLL:
library.rtcAddTrack.argtypes = [ ctypes.c_int, ctypes.c_char_p ]
library.rtcAddTrack.restype = ctypes.c_int
library.rtcAddTrackEx.restype = ctypes.c_int
library.rtcSendMessage.argtypes = [ ctypes.c_int, ctypes.c_void_p, ctypes.c_int ]
library.rtcSendMessage.restype = ctypes.c_int
@@ -246,6 +248,24 @@ def define_rtc_configuration() -> ctypes.Structure:
})()
def define_rtc_track_init() -> ctypes.Structure:
return type('RTC_TRACK_INIT', (ctypes.Structure,),
{
'_fields_':
[
('direction', ctypes.c_int),
('codec', ctypes.c_int),
('payloadType', ctypes.c_int),
('ssrc', ctypes.c_uint32),
('mid', ctypes.c_char_p),
('name', ctypes.c_char_p),
('msid', ctypes.c_char_p),
('trackId', ctypes.c_char_p),
('profile', ctypes.c_char_p)
]
})()
def define_rtc_packetizer_init() -> ctypes.Structure:
return type('RTC_PACKETIZER_INIT', (ctypes.Structure,),
{