I want to get some channels the YUV(for video ) and PCM (for audio) data, But
the peerconnection was created one only by libmediasoupclient , so I get the data by the function
in webrtc::AudioTrackSinkInterface OnData
class AudioTrackSinkInterface {
public:
virtual void OnData(const void* audio_data,
int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames) = 0;
Now, I hold the one peerconnection , but I hold some consumers , I can’t indentify the different consumer from the peerconnection.
How to seperate the audio&video data of the diferent channel ?
You are the one that creates the Consumers in your libmediasoupclient based application, so you can access the consumer.track of each Consumer independently.
I don’t know why are you pasting the webrtc::AudioTrackSinkInterface class above, but you are not supposed to need it. Said that, you may need to disable the default audio routing of libwebrtc in OSX or Linux so it does not go directly to the audio output device.