I'm in the process of converting this project to a MAC version, but I have a problem。
in SendTransport.mm
-(Producer )produce:(id)listener track:(RTCMediaStreamTrack )track encodings:(NSArray )encodings codecOptions:(NSString )codecOptions appData:(NSString *)appData {
NSUInteger nativeTrack = track.hash;
I'm in the process of converting this project to a MAC version, but I have a problem。 in SendTransport.mm -(Producer )produce:(id)listener track:(RTCMediaStreamTrack )track encodings:(NSArray )encodings codecOptions:(NSString )codecOptions appData:(NSString *)appData { NSUInteger nativeTrack = track.hash;
NSLog(@"kind:%@:%lud",track.kind);//video
Producer *producer = [TransportWrapper nativeProduce:self._nativeTransport listener:listener track:nativeTrack encodings:encodings codecOptions:codecOptions appData:appData];
return producer; }
but in TransportWrapper.mm +(::Producer )nativeProduce:(NSValue )nativeTransport listener:(id)listener track:(NSUInteger)mediaTrack encodings:(NSArray )encodings codecOptions:(NSString )codecOptions appData:(NSString )appData auto mediaStreamTrack = reinterpret_cast<webrtc::MediaStreamTrackInterface >(mediaTrack);
NSLog(@"1111kind:%s",mediaStreamTrack->kind().c_str());// ideo
Kind went from video to IDEO, which is wrong. At the same time, I found that the output conversion of audio fails and crashes directly.
Is there a better way to do this type conversion? what's the problem? Thank you very much.